### Answer
When you link a knowledge base to your agent, the system automatically retrieves relevant information during calls without requiring prompt changes. [(1) ](
)
How Knowledge Base Works:
During knowledge base creation, the system chunks your sources, embeds them, and stores them in a vector database. When the agent is about to respond during a call, it uses the transcript so far (prompt not included) to find the most relevant chunks from the knowledge base and feeds them to the LLM as context.
Document Selection Process:
The agent doesn't manually select which document to read from. Instead, it uses semantic search across all documents in the knowledge base. The system retrieves the most relevant chunks based on the conversation context, regardless of which specific document they come from.
Configuration Options:
You can adjust how the system retrieves information through two settings:
- **Chunks to retrieve**: The max number of chunks to retrieve (range 1-10, default: 3)
- **Similarity Threshold**: Controls how strict the matching is when finding relevant chunks (default: 0.60)
Retrieved knowledge base content appears in the LLM prompt under the header "## Related Knowledge Base Contexts".
Best Practices:
For optimal retrieval, prefer well-structured Markdown files with clear headings, short paragraphs, and specific references rather than ambiguous pronouns. Group related information within the same section so chunks remain cohesive and relevant.