### 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