https://retellai.com/?utm_source=discord&utm_medium=seo logo
Is it normal for a conversational flow to have est...
# ❓・ai-evy-support
c
@AI Evy Is it normal for a conversational flow to have estimated token usage of around 5000?
a
Thanks for tagging me @Ciaran. I'll look through relevant sources and get back to you shortly.
### Answer Yes, 5000 tokens is within normal range for conversation flows, but it's important to understand the implications. Token Usage Context: The LLM prompt token limit is set to 32,768 tokens [(1) ]() , so 5000 tokens is well within the maximum allowed. However, there are important cost considerations. Cost Impact: When using Flex Mode (where all nodes are compiled into a single prompt) , token counts can become significantly higher than rigid mode [(2) ]() . When the combined prompt exceeds 3,500 tokens, the token scaling billing rule applies, which can multiply your costs several times over . For prompts exceeding 3,500 tokens, billing scales proportionally. For example, with a 5000-token prompt using OpenAI GPT-4.1, the calculation would be: 0.07 + (5000 / 3500 × 0.045) = 0.1343 per minute [(1) ]() . Recommendations: To control costs with a 5000-token flow, consider: - Using rigid mode instead of flex mode [(2) ]() - Breaking your flow into smaller components so fewer nodes are compiled into a single prompt - Keeping node instructions concise to minimize token usage
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] 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.
c
@AI Evy Its in Rigid Mode System Prompt 607 Node Prompt 255 Tool Definitions 420 Conversation History 878–3,100 Agent Handbook 910
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Based on your breakdown, your token usage appears normal for a conversation flow agent in Rigid Mode. Let me explain what's contributing to your ~5000 token estimate: Agent Handbook (910 tokens) : The Agent Handbook presets you've enabled are adding 910 tokens [(1) ]() . According to the documentation, the Speech Normalization preset alone adds approximately 910 tokens . If you have multiple presets enabled, they stack - for example, Default Personality adds ~480 tokens, Natural Filler Words adds ~100 tokens, and so on . Tool Definitions (420 tokens) : This is reasonable if you have multiple tools/functions attached to your subagent nodes [(2) ]() . Tools can be custom API integrations, built-in utilities, or external service connections . Conversation History (878–3,100 tokens) : This is expected to grow during the conversation as the agent maintains context. System + Node Prompts (607 + 255 = 862 tokens) : Your global prompt and node-specific instructions are contributing this amount . To optimize if needed: 1. Review Agent Handbook presets - Disable any presets you don't need. Each one adds tokens to every interaction [(1) ]() . 2. Keep prompts concise - Use sectional prompts with focused sections for better organization without unnecessary verbosity [(3) ]() . 3. Minimize tool descriptions - Keep tool descriptions clear but brief . Your current setup totals around 5000 tokens, which is well within normal range and won't trigger the token scaling billing rule (which applies above 3,500 tokens for the combined prompt in certain modes) .
​ To learn more, see the sources I considered: [[1] Agent Handbook](https://docs.retellai.com/build/agent-handbook) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[3] 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.
c
@AI Evy I've made sure majority are using knowledge bases where I can. I obviously can't use a knowledge base on something like Greet the user -> User says they want help -> Go to cell with a knowledge base Conversation History (878–3,100 tokens) : This is expected to grow during the conversation as the agent maintains context. This is basically the agent keeping context of the conversation? Is there anything else I can do. I've took off 'Professional Rep' which cost 480.
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer I don't have specific documentation about conversation history token management in the available sources. However, I can address your knowledge base question. Knowledge Base Usage: You're correct that knowledge bases work best for information retrieval rather than conversation flow logic [(1) ]() . Knowledge bases are designed to provide context when the agent needs to retrieve relevant information during the call . The system automatically retrieves information from the knowledge base before responding, using the transcript so far to find the most relevant chunks . Knowledge Base Configuration: You can configure how many chunks are retrieved via "Adjust KB Retrieval Chunks and Similarity" : - Chunks to retrieve: The max number of chunks to retrieve from the KB, range 1-10. Default: 3 - Similarity Threshold: Adjust how strict the system is when matching chunks to the context. Default: 0.6 Note that increasing "Chunks to retrieve" gives the LLM more context, but also increases the prompt length and can interfere with generation quality . For most cases, the recommended settings are 3 chunks and a 0.60 similarity threshold . Node-Level Knowledge Base: For Conversation Flow agents, you can configure knowledge base at both Conversation Node level and Subagent Node level . Node-level knowledge base will be combined with the agent-level knowledge base to provide more accurate context for a specific topic . However, note that in Flex Mode, node level KB will be ignored [(2) ]() . You would need to configure the KB at agent level . For more specific guidance on optimizing token usage beyond what you've already done (removing the Professional Rep preset) , I'd need to see documentation that isn't currently available in my sources.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] 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.