https://retellai.com/?utm_source=discord&utm_medium=seo logo
a
Thanks for tagging me @gk. I'll look through relevant sources and get back to you shortly.
### Answer Based on the sources, here are strategies to reduce hallucinations and ensure your agent passes the correct parameters: ## Use Structured Conversation Flow Conversation Flow helps minimize hallucinations by creating structured pathways. [(1) ]() This keeps the agent focused on specific tasks without drifting off course. ## Lower Model Temperature Set
model_temperature
to 0 or a very low value (closer to 0 = more deterministic, less random) . [(2) ]() [(3) ]() [(4) ]() This is especially important for tool calling scenarios where precision matters.
Copy code
json
{
  "model_temperature": 0
}
## Enable Tool Call Strict Mode Use
tool_call_strict_mode
when supported by your model to enforce stricter parameter validation.
Copy code
json
{
  "tool_call_strict_mode": true
}
## Improve Your Prompt Structure Based on best practices for preventing hallucinations: [(1) ]() In your state_prompt or general_prompt, be extremely explicit: - Clearly define what parameters are REQUIRED (employeeName, employeeId, startTime) - Specify that the agent MUST NOT proceed without these values - Use validation logic that checks for correct data before confirming actions - Include source-grounded prompting - only pull from verified data Example prompt structure:
​ To learn more, see the sources I considered: [[1] 2025 B2B Guide to AI Phone Calls & Voice Agents | Retell AI | Retell AI](https://www.retellai.com/blog/b2b-guide-to-ai-phone-calls) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[4] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[5] Discord message from @nitss21 on 2025-08-25](https://discord.com/channels/1186424376300679209/1186462578310910112/1409465956849422346) ​
Copy code
REQUIRED PARAMETERS - DO NOT PROCEED WITHOUT:
- employeeName: [exact name from availability data]
- employeeId: [exact ID from availability data]  
- startTime: [exact time confirmed by user]

RULES:
1. Present available time slots to user
2. Get user's time selection
3. ONLY pass the tool call when you have ALL three parameters
4. If any parameter is missing, ask clarifying questions
5. Do NOT invent or guess employeeName or employeeId values
## Use Dynamic Variables Correctly If you're passing employee data into the call, use dynamic variables in your prompt like
{{employeeName}}
and
{{employeeId}}
. [(2) ]() [(3) ]() [(4) ]() These must be set when the call starts (through the inbound webhook or call creation) . [(5) ]() If you're trying to COLLECT these during the call, set them up in Post Call Analysis instead. ## Additional Resources For more detailed guidance on preventing hallucinations, check out the structured conversation flow approach [(1) ]() and ensure your tool descriptions are clear and specific about required parameters.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
g
@AI Evy REQUIRED PARAMETERS - DO NOT PROCEED WITHOUT: - employeeName: [exact name from availability data] - employeeId: [exact ID from availability data] - startTime: [exact time confirmed by user] RULES: 1. Present available time slots to user 2. Get user's time selection 3. ONLY pass the tool call when you have ALL three parameters 4. If any parameter is missing, ask clarifying questions 5. Do NOT invent or guess employeeName or employeeId values I do not want AI to employee name to members
a
Thanks for the follow-up, @gk. I'll get back to you soon.
Important configuration settings: [(2) ]() [(3) ]() [(4) ]() - Set
model_temperature
to
0
for more deterministic behavior - Enable
tool_call_strict_mode: true
if your model supports it For dynamic variables: [(5) ]() If you're extracting
employeeName
and
employeeId
from availability data during the call, use the variable name directly like
{{employeeName}}
and
{{employeeId}}
in your tool parameters, not nested notation like
scheduling_info_extraction.employeeName
. This approach keeps employee information internal while ensuring all required parameters are captured before the tool call executes.
### Answer Based on your requirement to hide employee names from members, here's the updated prompt structure: [(1) ]()
Copy code
REQUIRED PARAMETERS - DO NOT PROCEED WITHOUT:
- employeeName: [exact name from availability data - INTERNAL USE ONLY]
- employeeId: [exact ID from availability data - INTERNAL USE ONLY]
- startTime: [exact time confirmed by user]

RULES:
1. Present available time slots to user WITHOUT mentioning employee names
2. Get user's time selection
3. ONLY pass the tool call when you have ALL three parameters
4. If any parameter is missing, ask clarifying questions
5. Do NOT invent or guess employeeName or employeeId values
6. Do NOT share employee names with the member in conversation
7. Refer to slots generically (e.g., "I have an opening at 2 PM on Monday")
## Additional Steps to Prevent Hallucination Use explicit tool calling instructions:
Copy code
## Tool Usage Instructions
1. After presenting available time slots (without employee names) :
   - Wait for user to select a specific time
   - Confirm the exact date and time with the user
   
2. ONLY call the scheduling function when:
   - You have the employeeName from the availability data
   - You have the employeeId from the availability data
   - User has confirmed a specific startTime
   
3. Do NOT call the function if any parameter is undefined or missing
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[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] Extracted Dynamic Variables not sending through custom function in Conversation Flow Prompt](https://discord.com/channels/1186424376300679209/1442542149546803312) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.