https://retellai.com/?utm_source=discord&utm_medium=seo logo
Here is my transcript of my last call, I need help...
# ❓・ai-evy-support
j
@AI Evy Here is my transcript of my last call, I need help fixing this issue. User: Hello? 0:02 Knowledge Base Retrieval Agent: { "say": "Hey, is this Jim from Test Company?", "data": { "name": "Jim", "businessName": 0:06 User: It is. 0:12 Knowledge Base Retrieval Agent: "Test Company", "phone": "", "email": "jimfine95@gmail.com", "demoStart": "", "demoEnd": "", "meetingType": "", "location": "", "callVolumeRaw": "", "leadSourceRaw": "", "notes": "" } } 0:11 Agent: { "say": "Hey Jim, I'm Emma, Jason’s AI assistant with Fine AI Solutions. I’m calling about the form you just filled out on our website to schedule a demo. I just have a few quick questions first. 0:35 User: Okay. 0:50 Agent: What’s your estimated monthly call volume?", "data": { "name": "Jim", "businessName": "Test Company", "phone": "", "email": "jimfine95@gmail.com", "demoStart": "", "demoEnd": "", "meetingType": "", "location": "", "callVolumeRaw": "", "leadSourceRaw": "", "notes": "" } } It says everything in the brackets verbatim.
a
Thanks for tagging me @jasonthefine. I'll look through relevant sources and get back to you shortly.
### Answer When the agent is saying the entire bracketed JSON (e.g.,
{ "say": ..., "data": ... }
) verbatim instead of just speaking the intended message, it usually means the response formatting or prompt structure is not set up correctly in your agent or conversation flow. The agent should only be speaking the value of the "say" field, not the full object. Here are some steps and checks to help resolve this: 1. Check Your Prompt and Response Handling Make sure your agent or conversation node is extracting and returning only the intended string (the "say" property) , not the entire object. If your tool or function returns an object, ensure your prompt or post-processing logic is set to have the agent say only the part you want spoken [(1) ]() . 2. Review Conversation Flow and Tool Configuration If you are using custom tools or the Conversation Flow builder, check how the tool's return value is mapped to agent speech. The agent should be configured to use something like
{{tool_output.say}}
instead of the whole object . 3. Format of Returned Data If your tool or knowledge base returns a response as a JSON object, you may need to update the agent's parsing logic or prompt so that only the
say
value is spoken aloud . 4. Prompt Suggestion If you want to strictly control what the agent says, you can add a prompt like:
Copy code
Only speak the value in the "say" field of the tool response. Do not read any other fields or the whole object.
This can be set in the agent's prompt or in the node's instruction . 5. Debugging You can use the "Test LLM" feature in the dashboard to see exactly what is being retrieved from the knowledge base and how the agent is processing it [(2) ]() . If the above does not resolve the issue, please check your tool output format and how you integrate its results into the agent's spoken response. If you want, I can try to answer generally based on my knowledge of agent design patterns.
​ To learn more, see the sources I considered: [[1] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) [[2] Important Pricing Adjustments, New Voice Models, and More!](https://www.retellai.com/changelog/important-pricing-adjustments-new-voice-models-and-more) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.