How It Works
Knowledge Base uses Retrieval-Augmented Generation (RAG) to give your agent access to your documents during conversations. When a caller asks a question, the agent searches your uploaded documents for relevant information and includes it in its response.Setting Up Knowledge Base
Upload Documents
Supported formats:
- PDF (
.pdf) - Word Documents (
.docx) - Text Files (
.txt)
How Retrieval Works
- Uploaded documents are split into chunks and converted to vector embeddings using OpenAI
- Embeddings are stored in a local file-based index (LlamaIndex)
- During a call, when the agent decides it needs information, it:
- Converts the user’s question to an embedding
- Finds the most similar chunks from the index
- Injects the relevant text into the LLM prompt as context
- The LLM uses this context to generate an informed response
Best Practices
Limitations
- Documents are stored on the local filesystem (not S3)
- Index rebuilds when files are added/removed (may take a few seconds for large documents)
- Currently uses OpenAI embeddings — requires
OPENAI_API_KEY - No support for spreadsheets, images, or audio files