https://retellai.com/?utm_source=discord&utm_medium=seo logo
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Knowledge base setup and retrieval tuning](https://docs.retellai.com/build/knowledge-base) [[2] The knowledge base is useless.](https://discord.com/channels/1186424376300679209/1470697086981902513) [[3] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[4] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[5] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[6] GHL + Make + Retell](https://community.retellai.com/t/ghl-make-retell/806) ​
### Answer 1. Runtime retrieval uses semantic similarity search, not structured field lookups At runtime, Retell uses semantic retrieval across chunks. [(1) ]() Before searching, Retell condenses the recent conversation into a short, standalone search query and uses that query to find the most relevant chunks from the knowledge base. The system does not support structured lookups by specific field values like
club_id
. [(2) ]() 2. Chunking happens automatically; you cannot guarantee location-specific chunk isolation When you create a knowledge base, the system chunks the source, embeds them, and stores them into a vector database. [(1) ]() During the call, the agent retrieves the most relevant chunks based on semantic similarity to the conversation. There is no mechanism to guarantee the retriever returns only the chunk for a specific location and excludes others. [(1) ]() [(2) ]() As noted in community discussions, knowledge bases use semantic retrieval, so only a limited number of relevant chunks are surfaced per query, meaning many items may never be seen by the agent. [(2) ]() For complete, finite lists like location-specific data, putting all items directly in the prompt is the recommended approach. 3. Dynamic variables do not filter KB retrieval Dynamic variables like
{{club_id}}
work inside the prompt but do not affect which KB chunks get retrieved. [(1) ]() [(3) ]() [(4) ](
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
i.com/api-references/update-conversation-flow) [(5) ]() The Knowledge Base Instruction setting lets you give extra guidance to shape the search query before retrieval, but it does not filter or rewrite the retrieved chunks. [(1) ]() Variables are injected at call creation under the
variables
field and referenced in prompts, not used for KB filtering. [(6) ]() 4. Retrieval happens in a single pass across all linked KB documents When a knowledge base is linked to an agent, the agent retrieves information from the knowledge base before responding. [(1) ]() Retrieval occurs in one pass across all attached documents at once. The agent cannot retrieve from one file, read a value, and then use that value to look up something in a different KB file sequentially. [(1) ]() [(2) ]() 5. The prompt and retrieved KB content are both fed to the LLM; neither automatically overrides the other Retrieved knowledge base content is appended to the LLM prompt under the header
## Related Knowledge Base Contexts
. [(1) ]() Both the node prompt and the retrieved KB content are provided to the LLM during generation. You can add instructions to your prompt to control behavior, such as "Only answer using the information in ## Related Knowledge Base Contexts." 6. Accepted file formats and recommendations for structured data Supported formats include:
.bmp
,
.csv
,
.doc
,
.docx
,
.eml
,
.epub
,
.heic
,
.html
,
.jpeg
,
.png
,
.md
,
.msg
,
.odt
,
.org
,
.p7s
,
.pdf
,
.png
,
.ppt
,
.pptx
,
.rst
,
.rtf
,
.tiff
,
.txt
,
.tsv
,
.xls
,
.xlsx
,
.xml
. Prefer
.md
(Markdown) files over
.txt
for better chunking and retrieval accuracy. Use clear, descriptive headings and keep each section focused and reasonably short. Write short paragraphs and lists to separate concepts; avoid walls of text. Group related information within the same section so chunks remain cohesive and relevant. For structured per-location data, community members recommend storing certain information in your own database and fetching it via custom tools rather than relying solely on the knowledge base. [(2) ]() One approach is to store all location names in the prompt and fetch details (ingredients, prices, etc.) via backend automations, using the knowledge base only for basic info like opening hours and address. **File limits**: Each knowledge base supports at max 25 files, with each file at max 50MB. [(1) ]() For CSV, TSV, XLS, and XLSX, the row limit is 1000 rows and the column limit is 50 columns. You can create multiple knowledge bases to overcome these limits.