Add a Knowledge Base
Enable RAG so your assistant answers from your own documents.
Add a Knowledge Base
Transform a standard chat assistant into a Knowledge Assistant. By indexing your documents (PDFs, Markdown, etc.), your agent retrieves relevant passages at query time to provide grounded, accurate answers. This technique is known as RAG (Retrieval-Augmented Generation).
How RAG Works
Steps to Enable RAG
Create an Embedding Provider
Go to Providers → Add Provider.
- Category:
Embedding - Type: e.g.,
OpenAI,Ollama,Jina,Cohere - Sub Type:
text-embedding-3-small(Recommended for OpenAI)
Click Save. This provider handles the "translation" of your text into mathematical vectors.
Configure your Store
Edit your existing Store and link the embedding provider:
- Embedding Provider: Select the provider you just created.
- Knowledge Count: Set to
3initially (adjust later based on accuracy).
Upload and Index Documents
Go to Files → Upload.
- Select your files (PDF, Docx, MD, etc.).
- Assign them to your Store.
- Click Upload.
Monitor the Status column. Once it says Finished, the content is indexed and ready for retrieval.
Verify in Chat
Open the Chat UI for your Store. Ask a question specifically about the uploaded content.
"Based on the uploaded manual, what is the procedure for X?"
Tuning for Accuracy
If the agent is missing information or giving vague answers, try these adjustments:
- Increase Knowledge Count: Try raising it to
5or7to give the model more context. - Adjust Split Strategy: If your files are highly structured (like FAQs), switch the Store's Split Provider to
QAand re-upload. - Refine System Prompt: Tell the agent explicitly: "Always prioritize information from the knowledge base. If the answer is not in the documents, say you don't know."