https://retellai.com/?utm_source=discord&utm_medium=seo logo
- would it increase hallucination risk
# ❓・ai-evy-support
q
@AI Evy - would it increase hallucination risk? llm input token length calculated { tokenLength: 24781 }
a
Thanks for tagging me @Q4. I'll look through relevant sources and get back to you shortly.
### Answer --- Yes, a token length of 24,781 does increase hallucination risk and will also impact your billing [(1) ]() . Hallucination Risk: According to the documentation, states are designed to "help reduce prompt length and tool choices when the call can be broken into distinct states. With shorter prompts and less tools, the LLM can better focus and follow the rules, minimizing hallucination" [(2) ]() [(3) ]() [(4) ]() . Your current token count of 24,781 is significantly higher than the recommended threshold. Billing Impact: You'll incur additional charges due to LLM Price Scaling. When agents use more than 3,500 LLM tokens in their prompts, "Duration is scaled proportionally based on token usage" [(1) ]() . The calculation is: - Scaling Factor = 24,781 ÷ 3,500 = 7.08 - Billed Duration = Original Duration × 7.08 What's included in token calculation: - global prompt - functions (tool descriptions) - state/node prompt - transcript between agent and user - tool call history and results Flex mode is noted as "a common trigger for this rule. It compiles all node prompts, transitions, and tool descriptions into a single LLM context, which can push the token count well above 3,500" . Recommendations: 1. Break your conversation into distinct states to reduce prompt length per state [(2) ]() [(3) ]() [(4) ]() 2. Consider using custom functions/webhooks for address lookups instead of embedding all addre
sses in the prompt [(5) ]() 3. Use knowledge bases for large datasets rather than main prompts
​ To learn more, see the sources I considered: [[1] Exceptions to Our Per-Minute Pricing](https://docs.retellai.com/accounts/billing-exceptions) [[2] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[3] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[4] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[5] Address hallucinations](https://discord.com/channels/1186424376300679209/1372400167025639606) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
q
@AI Evy if my System Prompt is already 5,270–5,460 token long that means its already hitting 3500 token limit right?
a
Thanks for the follow-up, @Q4. I'll get back to you soon.
### Answer Yes, a system prompt of 5,270–5,460 tokens exceeds the 3,500 token threshold and will trigger LLM Price Scaling [(1) ]() . Billing Impact: When your prompt exceeds 3,500 tokens, billing is scaled proportionally . For your prompt size: - Scaling Factor = 5,270 ÷ 3,500 = 1.51 (or 5,460 ÷ 3,500 = 1.56) - Billed Duration = Original Duration × 1.51–1.56 What's Included in Token Calculation: The token count includes : - global prompt - functions (tool descriptions) - state/node prompt - transcript between agent and user - tool call history and results So your 5,270–5,460 tokens is just your system prompt portion. The total token count will be higher once you add function descriptions, transcripts, and tool call history . Maximum Limit: The maximum prompt token length is 32,768 tokens by default [(2) ]() . Prompts over 3,500 tokens incur extra charges [(1) ]() [(2) ]() . Recommendations to Reduce Tokens: - Break your conversation into distinct states with separate state prompts [(3) ]() [(4) ]() [(5) ]() - Use knowledge bases for static information instead of embedding it in prompts - Offload large datasets to external storage or retrieval calls [(6) ]() [(7) ]()
​ To learn more, see the sources I considered: [[1] Exceptions to Our Per-Minute Pricing](https://docs.retellai.com/accounts/billing-exceptions) [[2] Understand concurrency & limits](https://docs.retellai.com/deploy/concurrency) [[3] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[4] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[5] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[6] Discord message from @heritagemaxwell on 2026-04-09](https://discord.com/channels/1186424376300679209/1186462578310910112/1491800024928227430) [[7] Discord message from @lizretell on 2026-04-08](https://discord.com/channels/1186424376300679209/1186462578310910112/1491570768738517145) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.