https://retellai.com/?utm_source=discord&utm_medium=seo logo
my assistant running on GPT 4
# ❓・ai-evy-support
h
my assistant running on GPT 4.1 is hallucinating the hell out of what tomorrow is despite me giving explicit instructions I'm literally saying today's date equals the current date from and then I've got the variable from the users current time zone that's supposed to reference their current date and then I've got it and then I've got a prompt saying like any days, one full calendar day ahead of this is considered tomorrow, but it's still hallucinating the hell out of it like it's literally I've got like a lot of parameters in my life description that should be prohibiting it against this, but it just does not work I don't know if it's the model or what but I'm literally getting absolutely slammed with hallucinations so I don't know what to do. Is there anything I can do that can actually make a reference the current dlike I already know the current date but it's just more so like hallucinating the hell out of what tomorrow is it's literally saying tomorrow but tomorrow there is no 8:30 AM or 9 AM slot. It's just hallucinate the hell out of it. What do I do? I've tried everything. @AI Evy
a
Thanks for tagging me @hans_70884. I'll look through relevant sources and get back to you shortly.
### Answer --- Here are several strategies to reduce date/time hallucinations with your GPT-4.1 agent: 1. Move Critical Date Information to the Main Prompt [(1) ]() Put your date logic directly in the
general_prompt
field rather than relying solely on dynamic variables . When important information like addresses was moved to the main prompt, hallucinations decreased significantly . 2. Use Conversation Flow for Structured Date Handling [(2) ]() Retell AI's Conversation Flow feature provides a more constrained framework that helps mitigate hallucinations . By creating specific nodes for date-related interactions with transition conditions, you can reduce the likelihood of irrelevant or incorrect responses . 3. Implement Grounding Techniques Grounding aligns AI outputs with verified and factual information . Consider integrating your agent with verified databases or using Retrieval-Augmented Generation (RAG) to provide real-time, context-aware responses about available time slots . 4. Try Alternative Models [(3) ]() [(4) ]() If GPT-4.1 continues to hallucinate, consider testing with other supported models : -
gpt-4o
-
gpt-4o-mini
-
claude-3.7-sonnet
-
gemini-2.0-flash
5. Enable Strict Mode for Tool Calls Set
tool_call_strict_mode
to
true
when using supported models to improve reliability . 6. Use Custom Functions for Date Calculations [(1) ]() Instead of having the LLM calculate dates, implement a custom function that the agent calls to get accurate "tomorrow
" dates and available slots . This approach worked for address lookups and should help with date logic .
​ To learn more, see the sources I considered: [[1] Address hallucinations](https://discord.com/channels/1186424376300679209/1372400167025639606) [[2] Guide to AI Hallucinations & How to Fix Them | Retell AI](https://www.retellai.com/blog/the-ultimate-guide-to-ai-hallucinations-in-voice-agents-and-how-to-mitigate-them) [[3] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[4] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.