https://retellai.com/?utm_source=discord&utm_medium=seo logo
global prompt instructions advice and limit
# ❓・ai-evy-support
v
@AI Evy global prompt instructions advice and limit?
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[2] Prompt exceeds the limit of 32768 tokens, please contact support if you need longer context.](https://discord.com/channels/1186424376300679209/1432544872421789789) [[3] Prompt-Based vs. Conversational Pathway | Retell AI](https://www.retellai.com/blog/prompt-based-vs-conversational-pathways-choosing-the-right-approach) [[4] no_response_needed](https://discord.com/channels/1186424376300679209/1433483896179261480) ​
### Answer The Global Prompt is where you specify the agent's persona, identity, guardrails, etc. This text will be available in every node and will influence all response generation. [(1) ]() Prompt Limit: The prompt token limit is 32,768 tokens. [(2) ]() Best Practices: - Generally, the prompt size should remain below 8,000 tokens to ensure optimal performance. - Using over 33,000 tokens can significantly reduce stability, causing the LLM to become confused and respond inaccurately. - Larger prompts also increase latency and costs. - The main prompt should focus on style guardrails and conversation flow. - For extensive reference material (like call dialogue examples) , consider using a Knowledge Base instead of loading everything into the prompt. Prompt Writing Tips: - Be clear and specific about what you want the AI to do. [(3) ]() - Provide context when necessary. - For silence/pause handling, be explicit—e.g., instruct the agent to output only
NO_RESPONSE_NEEDED
with nothing before or after it. [(4) ]() If you need a longer context window beyond 32,768 tokens, you would need to contact Retell support. [(2) ]()
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
v
@AI Evy 300-1800ms latency • 1831-2071 tokens obverall. is this good?
a
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
### Answer Your token usage (1831-2071 tokens) is well within healthy limits—the prompt token limit is 32,768 tokens, and best practices suggest staying below 8,000 tokens for optimal performance. For latency, Retell AI typically targets sub-800 ms end-to-end latency for voice interactions. Your range of 300-1800ms shows: - 300ms is excellent - 1800ms is on the higher end and may feel sluggish in real-time conversation Factors that can affect latency: - LLM model choice (e.g., GPT-4.1 nano and GPT-4o mini are faster/cheaper; GPT-4o is slower/more expensive) [(1) ]() - TTS provider—if you notice higher-than-usual TTS latency, you can switch to another TTS provider - Knowledge Base retrieval generally adds under 100ms of latency impact [(2) ]() - Voice speed adjustments previously added ~100ms but have been reduced to ~5ms [(1) ]() Recommendations: - If you're seeing frequent spikes toward 1800ms, consider switching to a faster LLM model or checking your TTS provider settings - Your token count is good—no concerns there Would you like suggestions on how to diagnose what's causing the higher latency spikes?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy check the log
a
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
### Answer To check logs for diagnosing latency or call issues, here are your options: Via API: - Use the Get Call API to retrieve detailed information about a call, including transcript, recording, and latency tracking. [(1) ]() - Set up webhooks to receive real-time updates when calls are initiated, ended, or analyzed. For Custom LLM debugging: - Add logging in your websocket code to verify the websocket is connected. [(2) ]() - Add logging in your websocket message code to check if you receive messages from the Retell server. Via Dashboard: - The detailed logs section in the call history UI provides additional information (like webhook delivery status) that may not be fully available via API. [(1) ]() If you're seeing latency spikes toward 1800ms, the logs can help identify whether the delay is occurring at the LLM, TTS, or webhook stage.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Detailed Logs API](https://discord.com/channels/1186424376300679209/1349493976046112849) [[2] Troubleshooting Guide](https://docs.retellai.com/integrate-llm/troubleshooting) ​