Gen AI
Tock builds conversational assistants that answer from your documents with an LLM (RAG, Retrieval-Augmented Generation), while keeping control over what the assistant says: sensitive journeys stay handled by stories written by your teams, and the quality of the generated answers is measured continuously.
Everything is open source and can run on your own infrastructure, with the LLM, embedding model and vector store of your choice, including local models.
Demo:
What you can do
- Answer from a knowledge base: index your documents, then let the RAG answer the users' questions, with links to the sources.
- Keep control over the answers: combine the RAG with stories and FAQs, define the covered and excluded topics, exclude sentences, and write a robust answering prompt.
- Improve continuously: observe, diagnose, fix and measure the answers, with observability traces, the retrieval diagnostic, and datasets and evaluations.
- Speed up the NLU model: generate training sentences for the FAQs.
Getting started
To try it end to end on your machine, follow the tutorial Build a RAG bot on the Tock documentation (about 30 minutes).
On your own platform:
- Choose your LLM and embedding providers and your vector store.
- Index your documents in the vector store.
- Configure the vector store and the RAG of the bot in Tock Studio.
- Optionally, configure an observability provider to trace the LLM calls, and a document compressor.
- Test and improve the answers.
Architecture
The Gen AI features rely on the Gen AI orchestrator, a Python (FastAPI, LangChain) service deployed alongside the Tock platform. Tock Studio and the bots call it; it calls the LLM, embedding, vector store and observability providers configured for each bot.
flowchart LR
U[User] --> C[Channel] --> B[Bot]
ST[Tock Studio] --> O
B --> O[Gen AI orchestrator]
O --> L[LLM and embedding<br/>providers]
O --> V[(Vector store)]
O -.-> OB[Observability<br/>Langfuse]
I[Indexing tool] --> V
- How the bot answers: how the NLU model, the stories and the RAG work together.
- Gen AI orchestrator API, and its configuration and deployment on your platform.
Tock Studio menus
| I want to... | Tock Studio menu | Page |
|---|---|---|
| Connect the vector store | Gen AI > Vector DB settings | Vector DB settings |
| Check what the knowledge base contains | Gen AI > Vector store exploration | Vector store inspection |
| Activate the RAG, choose the models and the prompts | Gen AI > Rag settings | Rag settings |
| Define the covered topics, excluded topics and business lexicon | Gen AI > Rag prompt context | Rag prompt context |
| Filter the retrieved documents (reranking) | Gen AI > Compressor settings | Compressor settings |
| Prevent the RAG from answering some sentences | Gen AI > Sentences Rag exclusions | Sentences Rag exclusions |
| Try a prompt or a model | Gen AI > Playground | Playground |
| Understand why a document is (or is not) used | Gen AI > Retrieval diagnostic | Vector store inspection |
| Trace the LLM calls | Gen AI > Observability settings | Observability settings |
| Measure the quality of the answers | Answers Quality | Datasets and evaluations |
| Generate training sentences for the FAQs | Gen AI > Sentence generation settings | Sentence generation settings |
