Skip to main content
Evaluate complete production conversations captured in Application Insights to investigate specific interactions or sample deployed agent traffic.

Prerequisites

The examples use the SDK client configured in Set up the SDK client.

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_id field in the trace details.
  • Your application’s logging output — If you set conversation_id explicitly when creating agent responses, retrieve it from your logs.
  • OpenTelemetry trace context — The conversation_id might 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_time and end_time within your App Insights retention limits.
For a complete runnable example, see sample_multiturn_trace_evaluation_by_id.py on GitHub.

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