https://retellai.com/?utm_source=discord&utm_medium=seo logo
The KB is being recalled every single call- why is...
# ❓・ai-evy-support
c
@AI Evy The KB is being recalled every single call- why is that? There are few scenarios where the model would need to access the KB, but it's doing it once or even twice during a call- and retreiving chunks that are not relevant to the call.
a
Thanks for tagging me @Codyx. I'll look through relevant sources and get back to you shortly.
### Answer The knowledge base retrieval behavior you're describing can be tuned using the
kb_config
settings. You can adjust two key parameters to control when and how chunks are retrieved: [(1) ]() [(2) ]() - **`filter_score`**: This sets a minimum relevance threshold (0 to 1) . Chunks scoring below this value won't be returned. Increasing this value will filter out less relevant chunks. - **`top_k`**: This controls how many chunks are retrieved. Reducing this number limits the amount of KB content pulled per query. Example configuration:
Copy code
javascript
kb_config: {
  top_k: 3,
  filter_score: 0.6
}
[(1) ]() Additionally, the Knowledge Base 2.0 update introduced smarter recall where agents focus on the most relevant parts of each conversation to retrieve accurate answers, and improved ranking so irrelevant chunks no longer show up ahead of correct information. [(3) ]() If your agent is still retrieving KB content when it shouldn't, consider: 1. Raising the
filter_score
to require higher relevance before chunks are returned 2. Lowering
top_k
to reduce the number of chunks retrieved 3. Using Node KB (if using Conversation Flow) to assign a specific knowledge base only to nodes that actually need it, rather than having it available globally Node KB allows you to retrieve more accurate answers based on context and respond with lower latency by narrowing the search space.
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
Where can i find the kb_config settings?
Where can i find the kb_config settings?
a
Thanks for the follow-up, @Codyx. I'll get back to you soon.
### Answer The
kb_config
settings are part of the Retell LLM configuration. You can find and modify them via the API when creating or updating a Retell LLM. [(1) ]() [(2) ]() The configuration includes: [(1) ]() - **`top_k`**: Number of chunks to retrieve (e.g.,
3
) - **`filter_score`**: Minimum relevance threshold from 0 to 1 (e.g.,
0.6
) Example from the API response/request:
Copy code
json
"kb_config": {
  "top_k": 3,
  "filter_score": 0.6
}
To update these settings programmatically, use the [Update Retell LLM]() endpoint. [(2) ]() If you're using the dashboard, these settings should be accessible within your agent's LLM configuration where you attach knowledge bases.
​ To learn more, see the sources I considered: [[1] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.