https://retellai.com/?utm_source=discord&utm_medium=seo logo
How do I build the perfect knowledge base for my c...
# ❓・ai-evy-support
e
@AI Evy How do I build the perfect knowledge base for my conversation flow agent?
a
Thanks for tagging me @enes (ekkovoice). I'll look through relevant sources and get back to you shortly.
nformation, respond: 'There is no related information in knowledge base.'" [(1) ]()
### Answer Building an effective knowledge base for your Conversation Flow agent involves following these best practices: ## Content Formatting - Prefer
.md
(Markdown) files over
.txt
— well-structured Markdown is chunked and retrieved more accurately [(1) ]() - 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 ## Writing Style - Use specificity in references — include names, dates, units, and avoid ambiguous pronouns like "it" or "this" because prior chunks may not be present - Use the knowledge base to supply supporting information, not agent instructions or prompts — put instructions in the agent's prompt instead ## Configuration Settings After connecting a knowledge base to your agent, configure retrieval settings : - **Chunks to retrieve**: Max number of chunks (1-10) . Default: 3 - **Similarity Threshold**: Higher = fewer but more similar matches. Default: 0.6 For most cases, 3 chunks and a 0.60 similarity threshold are recommended ## Node-Level Knowledge Base For Conversation Flow agents specifically, you can configure knowledge base at the Conversation Node level — this combines with the agent's global knowledge base to provide more accurate context for specific topics ## Preventing Unwanted Behavior If your agent is pulling from the knowledge base too often and overriding your conversation flow, add this to your general prompt to restrict usage [(2) ]() : > "Only answer using the information in ## Related Knowledge Base Contexts. If ## Related Knowledge Base Contexts is missing or does not contain relevant i
​ 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.
e
@AI Evy is a single long .md file better for the knowledge base or multiple .md's?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Master The Future of Voice AI - Conversation Design & Agent Persona](

https://www.youtube.com/watch?v=42V0bDQIsb0▾

) ​
### Answer The documentation doesn't explicitly state whether a single long
.md
file or multiple
.md
files is better. [(1) ]() However, based on the best practices provided, splitting into multiple knowledge bases is the recommended approach: - "Group related information within the same section so chunks remain cohesive and relevant" - You can create multiple knowledge bases to overcome limits, and an agent can have more than one knowledge base linked to it A community member who works extensively with knowledge bases shared their approach: "I always split my knowledge base and I always use markdown... I break down everything as much as possible so that it's easier for the knowledge to be retrieved" [(2) ](

▾

) Their example shows breaking content into separate knowledge base files by topic (e.g., "insurance information", "services offered", "salon info", "policies") rather than one large file. **Recommendation**: Split your content into multiple focused
.md
files organized by topic/category. This helps ensure: - Each chunk stays cohesive and contextually relevant - Retrieval is more accurate for specific queries - You stay within file limits (max 25 files per knowledge base, 50MB each) [(1) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
e
@AI Evy what if you want to a multilangual agent (english and dutch), does the knowledge base language matter? or should i combine them inside? or only use english?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
### Answer The available documentation doesn't explicitly address whether knowledge base content should be in the same language as the user, or how to handle multilingual knowledge bases (English and Dutch combined vs. separate) . Here's what is documented: For the agent's language understanding, you can select what language the agent will understand (the language of user audio) in the global settings. [(1) ]() - If the user audio can be in multiple languages, you can select the
multi
option to allow the agent to understand both. - You need to write something like "respond in Spanish" in your prompt for the agent to respond in a specific language. For the knowledge base, retrieval uses semantic search based on the transcript so far. [(2) ]() Since the documentation doesn't specify best practices for multilingual knowledge bases, I'd suggest: Check out these potentially useful sources: - [Knowledge Base]() - [Step 1: Configure global settings]() Would you like me to try to answer generally based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Step 1: Configure global settings](https://docs.retellai.com/build/conversation-flow/global-setting) [[2] 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.
e
@AI Evy yes answer what you know
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
### Answer Based on my general knowledge, here's what typically works well for multilingual knowledge bases: Language in Knowledge Base Content Since Retell AI's knowledge base uses semantic retrieval based on the conversation transcript [(1) ]() , the language of your knowledge base content can affect retrieval accuracy. Here are general recommendations: 1. Match the user's language when possible — If a user asks a question in Dutch, semantic search will likely retrieve Dutch content more accurately than English content for that query. 2. Consider separate knowledge bases by language — You can link multiple knowledge bases to a single agent , so you could create: - One knowledge base with English content - One knowledge base with Dutch content 3. Bilingual content in the same file — If your content is short enough, you could include both languages in the same document (e.g., English section followed by Dutch translation) . This ensures relevant chunks exist in both languages. Practical Approach For a multilingual English/Dutch agent, I'd suggest: - Create separate
.md
files or knowledge bases per language - Keep the structure/topics parallel between languages - This way, when a user speaks Dutch, the semantic search is more likely to pull Dutch chunks Since the knowledge base retrieval happens automatically based on the transcript , having content in the user's language should improve retrieval relevance. Keep in mind this is general guidance — the official documentation doesn't explicitly cover multilingual knowledge base strategies.
​ 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.
e
@AI Evy so multiple .md's inside 1 knowledge base is best? not seperating them into different knowledge bases like 2-3 that are connected to the agent?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Both approaches are valid — the documentation doesn't explicitly state one is better than the other. Here's what's documented: Multiple knowledge bases are supported: - "You can create multiple knowledge bases to overcome these limits. An agent can have more than one knowledge bases linked to it." [(1) ]() For Conversation Flow agents specifically: - You can configure knowledge base at the Conversation Node level, which combines with the agent's global knowledge base to provide more accurate context for specific topics. Key consideration — billing is the same either way: - "It does not matter if your agent is using 1 or many knowledge bases, the billing is the same." Practical guidance: - Multiple
.md
files in 1 knowledge base
works well when content is related and you want unified retrieval across all of it - *Separate knowledge bases (2-3 connected to agent) * is useful when: - You want to assign specific knowledge bases to specific conversation nodes (node-level KB) - You have distinct topic areas that shouldn't cross-contaminate retrieval - You're approaching file limits (max 25 files per KB) For your multilingual use case (English + Dutch) , separate knowledge bases by language could make sense — then you could potentially assign language-specific KBs at the node level if your flow has language-specific paths.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
e
@AI Evy how do i make the ultimate global prompt for the conversation flow using the knowledge base information?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Step 1: Configure global settings](https://docs.retellai.com/build/conversation-flow/global-setting) [[2] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) [[3] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
### Answer The global prompt is where you specify the agent's persona, identity, guardrails, etc. — this text will be available in every node and influence all response generation. [(1) ]() ## How to Structure Your Global Prompt Use the global prompt for: - Your agent's overall personality, tone, and universal rules [(2) ]() Use conversation flow nodes for: - Step-by-step logic, questions, and transitions ## Integrating Knowledge Base with Your Global Prompt The knowledge base automatically retrieves relevant information during calls — you don't need to change your prompt to trigger it. [(3) ]() However, if you want to control how the agent uses knowledge base information, add this to your global prompt:
Copy code
Only answer using the information in ## Related Knowledge Base Contexts.
If ## Related Knowledge Base Contexts is missing or does not contain relevant information, respond:
"There is no related information in knowledge base."
This prevents the agent from generating information not found in the knowledge base. ## Key Points - Retrieved knowledge base content is automatically appended to the LLM prompt under the header
## Related Knowledge Base Contexts
- The knowledge base supplies supporting information — put instructions and persona in your prompt, not the knowledge base - Global settings also include voice, language, LLM model selection, and speech settings that complement your global prompt [(1) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
e
@AI Evy what are the best practices for the global prompt with a conversation flow agent? i use multiple make.com automations to trigger functions for example
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
### Answer Here are best practices for structuring your global prompt in a Conversation Flow agent, especially when using Make.com automations: ## Recommended Prompt Structure Break your prompt into focused sections for better LLM comprehension: [(1) ]()
Copy code
## Identity
You are a friendly AI assistant for [Company Name].
Your role is to [specific purpose].
You have expertise in [relevant domains].

## Style Guardrails
Be concise: Keep responses under 2 sentences unless explaining complex topics.
Be conversational: Use natural language, contractions, and acknowledge what the caller says.
Be empathetic: Show understanding for the caller's situation.

## Response Guidelines
Return dates in spoken form: Say "January fifteenth" not "1/15".
Ask one question at a time: Avoid overwhelming the caller with multiple questions.
Confirm understanding: Paraphrase important information back to the caller.

## Task Instructions
[Specific steps the agent should follow]

## Objection Handling
If the caller says they're not interested: "I understand. Is there anything specific..."
If the caller is frustrated: "I hear your frustration, let me help resolve this..."
## What Goes Where - **Global prompt**: Your agent's overall personality, tone, and universal rules [(2) ]() - **Conversation flow nodes**: Step-by-step logic, questions, and transitions - **Global nodes**: Only for actions available anytime (e.g., "transfer to human") ## Tool/Function Calling with Make.com Since you're using Make.com automations, define explicit triggers for when tools should be called: [(1) ]()
Copy code
## Tool Usage Instructions
1. Gather initial information about the customer's issue.
2. Determine the type of request:
   - If customer mentions "refund" or "money back":
     → Call function `transfer_to_support` immediately
   - If customer needs order status:
     → Call function `check_order_status` with order_id
Key practices for tool instructions: - Use trigger words: List specific words/phrases that should trigger tool calls - Define sequences: Specify when tools should be called in order - Set boundaries: Clarify when NOT to call certain tools ## Additional Tips - Write node instructions concisely so the LLM can better focus on each task [(3) ]() - If using Flex Mode with more than 20 nodes, performance may degrade and hallucination risk increases — split into smaller components
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) [[3] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
e
@AI Evy how long should this global prompt be?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
### Answer The available documentation doesn't specify an exact character or word limit for the global prompt in Conversation Flow agents. However, based on related guidance: - The global prompt is described as where you specify "the agent's persona, identity, guardrails, etc." and "this text will be available in every node." [(1) ]() - For Conversation Flow agents, node instructions should be written "concisely so the LLM can better focus on each task." - The Conversation Flow feature is designed to "replace prompt engineering with an intuitive, graphical input system" — meaning much of the complexity that would traditionally go into a long prompt can instead be handled through nodes and transitions. [(2) ]() **General recommendation**: Keep your global prompt focused on universal elements (identity, tone, guardrails) and move task-specific logic into your conversation flow nodes. This follows the principle of using the global prompt for "overall personality, tone, and universal rules" while nodes handle "step-by-step logic, questions, and transitions." [(3) ]() Check out these potentially useful sources for more prompt engineering guidance: - [Prompt Engineering Guide]() - [Step 1: Configure global settings]() Would you like a general answer based on my knowledge about typical prompt length best practices?
​ To learn more, see the sources I considered: [[1] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
e
@AI Evy can you give me like a indication for how many words/characters inside the prompt or does it not matter?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
### Answer The documentation doesn't specify an exact word or character limit for the global prompt in Conversation Flow agents. What is documented: - For Retell LLM (single/multi-prompt agents) , there's a token length limit of 8192 tokens. For multi-state prompts, this includes the longest state plus the general prompt. [(1) ]() - The global prompt field accepts a
string | null
value with no explicit length constraint mentioned in the API. [(2) ]() Practical guidance based on documented principles: - Conversation Flow is designed to "replace prompt engineering with an intuitive, graphical input system" — so much of what would traditionally go in a long prompt should instead be handled through nodes. [(1) ]() - The global prompt should contain "overall personality, tone, and universal rules" while nodes handle "step-by-step logic, questions, and transitions." [(3) ]() - Write instructions "concisely so the LLM can better focus on each task." [(4) ]() Since there's no explicit character/word limit documented for Conversation Flow global prompts, the key is quality over quantity — keep it focused on universal elements (identity, tone, guardrails) and let your nodes handle the task-specific logic. Would you like a general answer based on my knowledge about typical prompt length best practices?
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[3] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) [[4] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
e
@AI Evy I’m building a Retell flow connected to Clinicminds. After the request_appointment tool (CM_2), the caller receives a 6-digit SMS code. How do I configure the Digit Input Node (or Collect Input Node) exactly to capture these 6 digits via DTMF into the variable verification_code, with the caller finishing by pressing the hash key (#)? Besides digit_limit: 6 and termination_key: # in the Agent JSON, is there anything else I should account for to ensure a smooth transition to the next Function Node?
a
Thanks for the follow-up, @enes (ekkovoice). I'll get back to you soon.
- Ensure the node allows barge-in so the system stops speaking when a digit is pressed. [(3) ]() - Avoid using "Skip Response" as this delays recognition until the end of playback.
### Answer To capture a 6-digit SMS verification code via DTMF, configure the Call Settings with these DTMF options: [(1) ]() ## DTMF Configuration Set up your
user_dtmf_options
in the agent's Call Settings: - Digit Limit (
user_dtmf_options.digit_limit
) : Set to
6
— input completes once 6 digits are entered - Termination Key (
user_dtmf_options.termination_key
) : Set to
#
— allows caller to press pound to finish early - Timeout (
user_dtmf_options.timeout_ms
) : Time in milliseconds to wait after the last digit before timing out; the timer resets with each new digit ## Capturing the Input as a Variable DTMF input is captured automatically and added to the call transcript. To store it in
{{verification_code}}
, use an Extract Dynamic Variable node after the caller enters digits. [(2) ]() This node lets you capture the DTMF input (e.g., an account number or verification code) and save it for reuse anywhere in the conversation using
{{variable_name}}
. ## Transitioning to the Next Node Use a Logic Split Node to check whether
{{verification_code}}
has the expected value before transitioning to your next Function Node. The Logic Split Node evaluates conditions immediately when the agent enters it and branches to the corresponding destination. ## Additional Considerations - Prompt the agent to ask for the code via keypad. Example prompt: [(1) ]()
Copy code
Please enter your 6-digit verification code using the keypad. You can finish by pressing the pound key.
​ To learn more, see the sources I considered: [[1] Capture DTMF input from user](https://docs.retellai.com/build/user-dtmf) [[2] Solution Found — DTMF Keypad Input Workaround (Detailed Steps for Others)](https://community.retellai.com/t/solution-found-dtmf-keypad-input-workaround-detailed-steps-for-others/376) [[3] User dtmf input issue / IIssue with IVR Node Keypress Handling](https://discord.com/channels/1186424376300679209/1397608688734175293) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.