https://retellai.com/?utm_source=discord&utm_medium=seo logo
the agent is not properly retreiving the knowledge...
# ❓・ai-evy-support
y
@AI Evy the agent is not properly retreiving the knowledge base
a
Thanks for tagging me @Yash. I'll look through relevant sources and get back to you shortly.
### Answer Here are some things to check when the agent isn't properly retrieving from the knowledge base: 1. Publish the Agent If you're testing via phone calls (not webcall) , make sure you've clicked the Publish button in the top right of the agent editor. [(1) ]() 2. Check File Format Use the correct file extension for your documents. For example, if your content is XML, use
.xml
— not
.md
. Mismatched extensions can cause processing issues. [(2) ]() Prefer
.md
(Markdown) files over
.txt
for best results. Use clear, descriptive headings and keep sections focused and reasonably short. [(3) ]() 3. Adjust KB Retrieval Settings In the agent editor under "Knowledge Base," you can configure: - **Chunks to retrieve**: Max number of chunks (1–10, default: 3) - **Similarity Threshold**: How strict matching is (default: 0.6) 4. Verify KB is Connected Open the agent editor, locate the "Knowledge Base" section, and confirm your knowledge bases are selected. 5. Test in Playground Test by asking related questions in the LLM testing area — the agent automatically integrates KB content without prompt changes. [(4) ]() If issues persist, could you share the agent ID and call ID so the team can investigate further?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Inbound Calls Not Accessing Knowledge Base (Urgent)](https://discord.com/channels/1186424376300679209/1440295109286428713) [[2] Knowledge base bug](https://discord.com/channels/1186424376300679209/1395139321622958160) [[3] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[4] Empower AI with Dynamic Knowledge Bases | Retell AI](https://www.retellai.com/features/knowledge-base) ​
y
@AI Evy explain me more about KB Retrieval Settings
a
Thanks for the follow-up, @Yash. I'll get back to you soon.
### Answer ### KB Retrieval Settings After connecting a knowledge base to your agent, you can configure how retrieval works via **"Adjust KB Retrieval Chunks and Similarity"**: [(1) ]() Chunks to retrieve The maximum number of chunks to retrieve from the KB, ranging from 1–10. Default is 3. Similarity Threshold Adjusts how strict the system is when matching chunks to the conversation context. A higher setting gives you fewer, but more similar, matches. Default is 0.6. Important note: Increasing "Chunks to retrieve" gives the LLM more context, but also increases the prompt length and can interfere with generation quality. For most cases, the recommended settings are 3 chunks and a 0.60 similarity threshold. Retrieved knowledge base content will be appended to the LLM prompt under the header
## Related Knowledge Base Contexts
. --- Via API: You can also configure KB settings programmatically using the
kb_config
object, which includes: [(2) ]() , [(3) ]() - `top_k`: Number of chunks to retrieve - `filter_score`: Similarity threshold
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.