https://retellai.com/?utm_source=discord&utm_medium=seo logo
for knowledge base retrieval, how many characters ...
# ❓・ai-evy-support
h
@AI Evy for knowledge base retrieval, how many characters are included in each chunk? is there a way to increase the amount of characters per chunk, as i am finding the agent is fetching from the correct knowledge base, but sometimes the last few lines/rows of the knowledge base file is cut off and not included in the retrieval
a
Thanks for tagging me @hyphn_56025. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Agent fails to read the whole database](https://discord.com/channels/1186424376300679209/1435243420053540997) ​
### Answer Based on the available documentation, the specific character count per chunk in Retell AI's knowledge base is not explicitly stated [(1) ]() . However, you can adjust retrieval behavior through the "Chunks to retrieve" and "Similarity Threshold" settings . The "Chunks to retrieve" setting allows you to set the maximum number of chunks retrieved from the knowledge base, with a range of 1-10 (default is 3) . The "Similarity Threshold" setting adjusts how strict the system is when matching chunks to context, with higher settings giving fewer but more similar matches (default is 0.6) . If you're experiencing issues with incomplete retrieval, you can try: 1. Increasing "Chunks to retrieve" to pull more chunks per query 2. Decreasing "Similarity Threshold" to allow more chunks to be considered relevant [(1) ]() [(2) ]() Note that increasing chunks gives the LLM more context but also increases prompt length, which can affect generation quality [(1) ]() . For best results with knowledge bases, the documentation recommends using well-structured Markdown files with clear headings and short, focused sections to ensure better chunking and retrieval .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.