Creating a Knowledge Base
Knowledge bases give your agents access to company documents, FAQs, and product information using RAG (Retrieval-Augmented Generation).
What is a Knowledge Base?
A knowledge base is a collection of documents that your agent can search and reference during conversations. This is powered by RAG, which retrieves relevant information and augments the LLM's responses with accurate, up-to-date data.
Creating a Knowledge Base
- Go to Knowledge Base in the sidebar
- Click Create Knowledge Base
- Enter a name and description
- Click Create
Uploading Documents
After creating a knowledge base:
-
Click Add Documents
-
Drag and drop files or click to browse
-
Supported formats:
- TXT
- DOCX
- CSV
- Markdown
-
Wait for processing to complete
Best Practices
Document Organization
- One topic per document: Makes retrieval more accurate
- Clear headings: Helps with chunking
- Consistent formatting: Improves extraction
Content Quality
Good for Knowledge Base:
- Product specifications
- FAQ documents
- Policy documents
- Training materials
- Process guides
Not Ideal:
- Images without text
- Complex tables
- Scanned documents (OCR needed)
- Very long documents (>50 pages)
Naming Conventions
Use descriptive names:
return-policy-2024.pdf- Gooddoc1.pdf- Bad
Attaching to an Agent
- Open your agent settings
- Find Knowledge Base section
- Select your knowledge base
- Configure RAG settings:
{
"knowledgeBaseId": "kb_abc123",
"ragConfig": {
"topK": 5,
"minScore": 0.7
}
}
| Setting | Description |
|---|---|
topK |
Number of relevant chunks to retrieve |
minScore |
Minimum relevance score (0-1) |