Returns detailed information about context failures detected in a conversation.
Path Parameters
Query Parameters
Filter by severity: low, medium, high
Filter by failure type: forgotten_preference, repeated_question, contradicted_fact, violated_constraint, lost_context
Response
Array of context failure objects:
id: Unique failure identifier
type: Type of context failure
severity: low, medium, or high
description: Human-readable description
trace_id: Associated trace ID
detected_at: When the failure was detected
Summary of context failures:
total: Total number of failures
by_type: Count by failure type
by_severity: Count by severity level
Context Failure Types
| Type | Description |
|---|
forgotten_preference | User preference from earlier in conversation was not respected |
repeated_question | Agent asked a question the user already answered |
contradicted_fact | Agent stated something that contradicts earlier information |
violated_constraint | Agent violated a constraint specified by the user |
lost_context | Agent lost track of important context from the conversation |
Example
curl -X GET "https://api.tracelm.ai/api/v1/conversations/conv_456/context-failures?severity=high" \
-H "X-API-Key: $TRACELM_API_KEY"
Response
{
"failures": [
{
"id": "cf_001",
"type": "forgotten_preference",
"severity": "high",
"description": "User specified budget constraint of $500, but agent suggested options exceeding $800",
"trace_id": "trace_12",
"detected_at": "2024-01-15T10:35:00Z"
},
{
"id": "cf_002",
"type": "repeated_question",
"severity": "medium",
"description": "Agent asked for destination city again after user already specified 'New York'",
"trace_id": "trace_8",
"detected_at": "2024-01-15T10:20:00Z"
}
],
"summary": {
"total": 2,
"by_type": {
"forgotten_preference": 1,
"repeated_question": 1
},
"by_severity": {
"high": 1,
"medium": 1
}
}
}
High severity context failures often indicate significant issues with the agent’s ability to maintain state across turns. Consider reviewing your conversation context management.