Reading results

Each score is a gen_ai.evaluation.result OTLP log event, written to the telemetry platform next to the span it scored. You read them back through four endpoints, the same ones AI Studio uses.

The examples assume MISTRAL_API_KEY and MISTRAL_BASE_URL (for example https://api.mistral.ai) are set, as in the Quickstart.

The result record

The result record

FieldContent
trace_id, span_idThe scored span.
timestampWhen the evaluation was emitted, not when the span was created.
evaluation_namejudge:<pipeline-config-slug>.
score_valueSet for numeric scorers.
score_labelSet for categorical and boolean scorers.
explanationThe judge's reason.
response_id, conversation_idCopied from the source span when present.
metadataString map of the remaining event attributes. The worker sets mistral.obs.judge.slug and mistral.obs.scorer.slug on every judge event.

To find the evaluation_name of a live eval, read pipeline_configs[].slug from GET /v1/observability/pipelines/{id}.

Time windows

Time windows

Every results endpoint takes the window as query parameters, not in the body:

  • from and to are ISO 8601 timestamps with a timezone.
  • to defaults to now, and from to one hour before to.
  • The window is capped at 750 hours (about 31 days). Longer windows return 422 with the limit in the message.

POST /v1/observability/spans/evaluations/search returns every evaluation event, newest first.

curl -s -X POST "$MISTRAL_BASE_URL/v1/observability/spans/evaluations/search?from=2026-10-20T00:00:00Z&to=2026-10-21T00:00:00Z&page_size=50" \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "search_expression": "evaluation_name = '\''judge:helpfulness-1a2b3c4d-7b04d1aa'\'' AND score_value <= 2" }'

Results are in span_evaluations.results. To fetch the next page, follow span_evaluations.next, or pass span_evaluations.cursor back as cursor. GET /v1/observability/spans/evaluations/fields lists the fields that search_expression accepts, and …/fields/{field_name}/options lists the known values of one field.

Latest per span

Latest per span

POST /v1/observability/spans/evaluations/search/latest takes the same request and returns at most one result per span and evaluation_name: the most recent one. Use it if a span was scored more than once, for example when the same span is sent more than once.

One row per span

One row per span

POST /v1/observability/pipeline-results/search pivots results so that each row is one span with all of its scores:

curl -s -X POST "$MISTRAL_BASE_URL/v1/observability/pipeline-results/search?page_size=50" \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "pipeline_config_slugs": ["helpfulness-1a2b3c4d-7b04d1aa", "tone-5e6f7a8b-0c1d2e3f"] }'

Pass pipeline config slugs without the judge: prefix, at most 100. Each row has trace_id, span_id, span_name, duration_ns, evaluated_at, and three maps keyed by evaluation_name: judge_scores, judge_labels, and judge_explanations. This is the shape behind the results table of a live eval in AI Studio.

Aggregate

Aggregate

POST /v1/observability/spans/evaluations/aggregate computes one metric, optionally grouped and bucketed in time.

curl -s -X POST "$MISTRAL_BASE_URL/v1/observability/spans/evaluations/aggregate?from=2026-10-20T00:00:00Z&to=2026-10-21T00:00:00Z" \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "metric": { "measure": "score_value", "aggregation": "avg" },
    "dimensions": ["evaluation_name"],
    "time_dimension": { "granularity": "hour" },
    "search_expression": "evaluation_name = '\''judge:helpfulness-1a2b3c4d-7b04d1aa'\''"
  }'
FieldValues
metric.aggregationcount, count_distinct, sum, avg, min, max, p50, p90, p95, p99
dimensionsFields to group by, for example evaluation_name or score_label.
time_dimension.granularityauto, second, minute, hour, day, week, month. Omit time_dimension for a single total.
limit1–10,000, default 1,000.

The response has data rows (time_bucket, dimensions, metric_name, metric_value) and meta with the resolved window and bucket size.

For categorical and boolean scorers, use "aggregation": "count" with "dimensions": ["score_label"] to get the label distribution.

In AI Studio

In AI Studio

  • Evaluate → Evaluations → Live → (a live eval): trend, distribution, and coverage charts, plus the per-span results table.
  • Trace view: the evaluations of each span appear on the span.