Conversation Intelligence troubleshooting
To view detailed logs of Conversation Intelligence executions, you can use the Twilio Console Debugger.
- Log in to Twilio Console and navigate to Develop > Troubleshoot > Debugger.
- 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.
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.
1{2"type": "object",3"properties": {4"response": {5"type": "string"6}7}8}
1{2"type": "object",3"properties": {4"response": {5"type": "string"6}7},8"required": ["response"]9}10
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:
- The prompt tells the language operator to return
null. - The language operator correctly returns
{ "response": null }. - The schema expects a
string. Becausenullisn't astring, 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.
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:
1{2"type": "object",3"properties": {4"response": {5"type": ["string", "null"]6}7}8}