https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hey we are using the knowledge base search to ans...
# ❓・ai-evy-support
d
Hey @AI Evy we are using the knowledge base search to answer general questions. We also have processed that do not require the knowledge base search. How do we update the prompt to specify when to search the knowledge base? The LLM response seem to be much slower since introducing the KB
a
Thanks for tagging me @Dan. I'll look through relevant sources and get back to you shortly.
### Answer When a knowledge base is linked to an agent, the agent will always try to retrieve information from the knowledge base before responding [(1) ]() . There's no built-in mechanism to selectively trigger KB retrieval—it happens automatically for every response generation . However, you can restrict KB usage through your prompt. According to community discussions, adding explicit instructions in your general prompt is usually enough to control when the agent should or shouldn't use KB information [(2) ]() . For example, you could instruct the agent to only reference KB content for specific types of questions. Regarding the slower responses: the KB retrieval process uses the transcript to find relevant chunks and feeds them to the LLM as context [(1) ]() . You can adjust the KB retrieval settings to potentially improve performance by configuring the "Chunks to retrieve" (range 1-10, default 3) and "Similarity Threshold" (default 0.6) . Increasing chunks gives more context but also increases prompt length, which can affect generation quality and speed . If you need more granular control, consider using node-level knowledge bases in Conversation Flow agents, where you can configure KB at the conversation node level for specific topics . **
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Most of the times KB is invoked and the agent does not follow the node transitions](https://discord.com/channels/1186424376300679209/1407282116802252892) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.