Prerequisites
- Complete the cloud evaluation prerequisites and client setup.
- Conversation data with a
messagesarray, or traced production conversations in Application Insights. - Conversation-level evaluators that support the selected evaluation level.
Evaluate conversation datasets
Evaluate complete conversations to assess agent quality across entire user interactions - not just individual responses. Use conversation-level evaluation to identify quality problems like incomplete task resolution, user frustration, and tool-call regressions that turn-level evaluation misses. For example, consider a support agent where the user grows frustrated over multiple turns:Turn 1 — User: “I need to reset my password.” Agent: “I found your account. I’ll send a reset link.” Turn 2 — User: “I didn’t get the email.” Agent: “I’ve resent the link. Please check spam.” Turn 3 — User: “Still nothing. Can you just reset it directly?” Agent: “I’ve sent another reset link.”A turn-level evaluator scores only the last response - which is polite and takes action - so it scores well. A conversation-level evaluator grading customer satisfaction across the conversation flags that the agent repeated the same failing action three times without trying an alternative, leaving the user’s problem unresolved. Conversation-level evaluation differs from turn-level evaluation in several ways:
Conversation-level evaluation supports four data source options:
Choose an evaluation level
Theevaluation_level parameter on the run determines whether evaluators score individual turns or complete conversations:
Evaluator compatibility: Each evaluator supports specific evaluation levels. Check the evaluator’s
supported_evaluation_levels field in the evaluator catalog.- Turn-only evaluators (for example,
fluency,relevance) can’t be used withevaluation_level="conversation". - Currently, all conversation-level evaluators support both
"turn"and"conversation"levels.
Common errors
Prepare conversation data
Create a JSONL file where each line contains a complete conversation in themessages field. Each message should include a role (user, assistant, or system) and content. For a complete example, see the conversation evaluation samples in the SDK.
Define the data schema and evaluators
Specify the schema for your conversation data, “messages”, and select evaluators designed for conversation-level evaluation. Conversation-level evaluators assess the entire interaction rather than individual turns.Create evaluation and run
- Python
- cURL
Prep: download sample_data_multiturn_conversations.jsonl
Evaluate conversations by ID from traces
Evaluate specific conversations from Application Insights by providing their conversation IDs. Use this option to root-cause problems or verify fixes on specific interactions. For example, you can investigate a conversation flagged by an alert or verify a fix for a known issue.Where to find conversation IDs
Find conversation IDs in:- Application Insights trace logs UI — Browse to interesting traces and locate the
conversation_idfield in the trace details. - Your application’s logging output — If you set
conversation_idexplicitly when creating agent responses, retrieve it from your logs. - OpenTelemetry trace context — The
conversation_idmight also be derived from the traceparent header if your agent uses standard trace context propagation.
Tool definitions are automatically retrieved from the traces or queried from the agent registry. You don’t need to provide them in the request.
Parameters for conversation ID lookup
- Application Insights data ingestion can cause a delay between when traces are generated and when they’re available for evaluation. If the query doesn’t find traces, wait a few minutes and retry.
- The maximum lookback is 7 days (168 hours). To access older traces, use
start_timeandend_timewithin your App Insights retention limits.
Evaluate sampled conversations by agent filter
Evaluate a sampled set of conversations from Application Insights by filtering on agent name. Use this option to assess overall agent quality across production traffic. For example, run regular quality assessments or monitor for quality degradation in production. The agent you specify for filtering can be part of a multi-agent conversation. The filter matches any conversation where that agent participated.Tool definitions are automatically retrieved from the traces or queried from the agent registry. You don’t need to provide them in the request.
Agent identity fields
Specify the agent to filter by using one of these formats:Filter strategies
Parameters
The time window (
end_time - start_time) must be at least 15 minutes (900 seconds). This requirement exists because conversation-level queries apply a 5-minute inactivity buffer on each edge to avoid partial conversations.The App Insights query timespan is currently limited to a maximum of 7 days (168 hours). You can’t access traces older than 7 days without explicitly providing
start_time and end_time within App Insights retention limits.Next steps
- To poll for completion and interpret results, see Get cloud evaluation results.
- For a complete runnable example, see sample_multiturn_trace_evaluation_agent_filter.py on GitHub.