https://retellai.com/?utm_source=discord&utm_medium=seo logo
I have this problem: The problem: Retell fires KB ...
# ❓・ai-evy-support
e
@AI Evy I have this problem: The problem: Retell fires KB retrieval on every single turn, even when the parent asks "what days do you have available?" — a question that needs zero KB content. The agent already knows the answer (check availability tool). But Retell still retrieves 2 chunks (~1500 tokens), the LLM reads them, and then responds. That read time is the 3-4 second tax on every turn. How do I fix this?
a
Thanks for tagging me @Ezekyle44. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, when a knowledge base is linked to an agent, the agent will always try to retrieve information from the knowledge base before responding [(1) ]() . This is automatic behavior and happens for every response generation . Current behavior you're experiencing: - KB retrieval triggers on every turn regardless of whether the question needs KB content - This adds latency even when tools (like check availability) already have the answer Options to reduce unnecessary retrieval: 1. Adjust retrieval settings - You can configure how many chunks are retrieved via "Adjust KB Retrieval Chunks and Similarity" : - **Chunks to retrieve**: Set to 1-3 (default is 3) to reduce token overhead - **Similarity Threshold**: Increase from 0.6 to a higher value (like 0.7-0.8) so only highly relevant chunks match 2. Use Node-level KB (Conversation Flow only) - If you're using Conversation Flow agents, you can configure knowledge base at the node level . This means: - Only specific nodes that need KB access will retrieve from it - Nodes handling tool-based questions (like availability checks) can have no KB attached 3. Prompt engineering - Add instructions to your prompt telling the agent to prioritize tools over KB for specific question types. While this won't prevent retrieval, it may help the LLM process faster. Note: The documentation states retrieval latency is "generally under 100ms" , so if you're seeing 3-4 seconds, the delay may be coming from LLM processing of the retrieved chunks rather than retrieval itself. For Conversation Flow agents, node-level KB configuration is your best option to prevent retrieval on turns where it's not needed .
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.