Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Conversation Intelligence troubleshooting


View debugger logs in Twilio Console

view-debugger-logs-in-twilio-console page anchor

To view detailed logs of Conversation Intelligence executions, you can use the Twilio Console Debugger.

  1. Log in to Twilio Console(link takes you to an external page) and navigate to Develop > Troubleshoot > Debugger.
  2. To see Conversation Intelligence-related logs, filter by event source. For example, conversation-intelligence, conversation-memory.

The log information includes the Log SID, Resource SID, source, log level, timestamp (local), event type, and a log body with detailed error messages and execution metadata. This information can help you identify and troubleshoot issues with your language operators and understand their execution in the context of your conversations.


Troubleshooting: Response schema validation

troubleshooting-response-schema-validation page anchor

Conversation Intelligence strictly enforces your output schema and always modifies it before sending it to the LLM by marking all object properties as required. If a response doesn't match the schema, the language operator execution fails.

How the system modifies your schema

how-the-system-modifies-your-schema page anchor

Example: Original schema (user-provided)

example-original-schema-user-provided page anchor
1
{
2
"type": "object",
3
"properties": {
4
"response": {
5
"type": "string"
6
}
7
}
8
}

Example: Modified schema (system-generated)

example-modified-schema-system-generated page anchor
1
{
2
"type": "object",
3
"properties": {
4
"response": {
5
"type": "string"
6
}
7
},
8
"required": ["response"]
9
}
10

Language operator failure scenario

language-operator-failure-scenario page anchor

A common cause of language operator failure is a conflict between the prompt and the output schema.

For example, if you have a real-time language operator with the on communication trigger, there might be moments in a conversation where the language operator can't find a valid answer. You might then instruct it in the prompt: "If no information is found, return null."

This creates a failure chain:

  1. The prompt tells the language operator to return null.
  2. The language operator correctly returns { "response": null }.
  3. The schema expects a string. Because null isn't a string, validation fails and the language operator execution errors out.

Even if the language operator's logic is correct based on your prompt, Conversation Intelligence rejects any response that violates the data types defined in your schema.

Aligning prompt and schema

aligning-prompt-and-schema page anchor

To prevent language operators from failing, your output schema must account for all possible LLM responses mentioned in your prompt. If you want the ability to return a null or an empty state, you must use a union type in your schema.

If your prompt allows for a null response, update your schema to accept both string and null:

Example: Updated schema to allow null response

example-updated-schema-to-allow-null-response page anchor
1
{
2
"type": "object",
3
"properties": {
4
"response": {
5
"type": ["string", "null"]
6
}
7
}
8
}