What you will be able to do
- Pull per-scorer mean metrics for several evaluation runs with mlflow.search_runs and compare them metric by metric
- Spot a regression on the metric a task depends on, even when the overall average improves
- Compare traces from several evaluation runs side by side in the Evaluation runs tab and read judge rationales
- Use chart view, Group by and parallel coordinates plots to relate configuration parameters to scores across many runs
1.Pull per-scorer metrics for each evaluation run
Each call to mlflow.genai.evaluate() records an evaluation run in your experiment, and each scorer adds an aggregate metric to that run. In the Databricks "Evaluate and improve an agent" tutorial, two versions of a RAG email app were evaluated on the same dataset with the same judges. Their runs are compared using mlflow.search_runs(). Two details from that code matter. First, the runs are fetched one at a time, because the filter syntax doesn't support IN or OR. Second, only some columns are kept: quality metrics end in /mean, and anything under agent/ (latency and token counts) is excluded from the quality comparison.
# Fetch runs separately since mlflow.search_runs doesn't support IN or OR operators
run_v1_df = mlflow.search_runs(
filter_string=f"run_id = '{eval_results_v1.run_id}'"
)
run_v2_df = mlflow.search_runs(
filter_string=f"run_id = '{eval_results_v2.run_id}'"
)
# Extract metric columns (they end with /mean, not .aggregate_score)
# Skip the agent metrics (latency, token counts) for quality comparison
metric_cols = [col for col in run_v1_df.columns
if col.startswith('metrics.') and col.endswith('/mean')
and 'agent/' not in col]Checkpoint 1 of 5· Check yourself
You are writing code to compare quality scorers across evaluation runs. Which run columns should you select?
Scorer metrics are stored with a /mean suffix. The agent/ metrics record latency and token counts, which are not quality scores, so they are left out of a quality comparison.
“Extract metric columns (they end with /mean, not .aggregate_score)”Source: docs.databricks.com
Sources1
2.A higher average can hide a regression on the metric your task needs
| Metric | V1 Score | V2 Score | Improvement |
|---|---|---|---|
| safety | 1.000 | 1.000 | +0.000 |
| professional_tone | 1.000 | 1.000 | +0.000 |
| follows_instructions | 0.571 | 0.714 | +0.143 |
| includes_next_steps | 0.286 | 0.571 | +0.286 |
| mentions_contact_name | 1.000 | 1.000 | +0.000 |
| retrieval_groundedness | 0.857 | 0.571 | -0.286 |
| concise_communication | 0.286 | 1.000 | +0.714 |
| relevance_to_query | 0.714 | 1.000 | +0.286 |
The tutorial reports an overall average improvement of +0.143 (+20.0%), and on most dimensions V2 really is better. It is much more concise and more relevant. But retrieval_groundedness, which checks whether the response is supported by the retrieved context, regressed. A per-trace drill-down in the tutorial shows why. On one customer request, V1 passed and V2 failed. The judge's rationale for V2 notes a promised status update "which is not directly supported by the retrieved context." Which configuration is "most reliable" therefore depends on the task you were given. Work out which scorers measure that task, then compare the runs on those scorers first. The overall average is a secondary signal. The sources define reliability through scorer results on a shared dataset. They don't describe a method for measuring variance across repeated runs of the same configuration, so don't assume one exists.
Checkpoint 2 of 5· Exam question
A team is comparing two retrieval-context configurations for a support agent and has an evaluation dataset where each example includes an expected answer. They want a scorer that checks whether each configuration's generated answer actually matches the expected answer, so they can identify which configuration is factually accurate. Which predefined MLflow 3 scorer best fits this comparison?
Correct answer: C — Correctness(), since it evaluates outputs against the dataset's expectations
Sources1
3.Compare traces side by side in the Evaluation runs tab
Aggregate numbers tell you where to look. The traces tell you why a score changed. The tutorial calls the UI comparison view "the primary way to verify that a new prompt version outperforms the previous one." You open the experiment, go to its evaluation runs, select the runs you want and compare them. The right pane then shows each trace from the selected runs side by side. Clicking a request identifier opens the full trace from each run. From there, See details shows each assessment and See detailed trace view shows the trace itself, which is where you read rationales like the one quoted above.
Checkpoint 3 of 5· Put it in order
Put these steps for comparing evaluation runs in the MLflow UI in order
- 1.Check the boxes for the runs you want to compare
- 2.Click Experiments in the sidebar
- 3.Click the name of your experiment to open it
- 4.In the left sidebar, click Evaluation runs
- 5.From the Actions drop-down menu, select Compare
You go from the experiment list to the experiment, then to its Evaluation runs. You select the runs there, and Compare appears in the Actions menu.
“From the Actions drop-down menu, select Compare.”Source: docs.databricks.com
Sources1
4.Scanning many runs: chart view and parallel coordinates
When you are comparing more than two configurations, a table comparing two runs isn't enough. The experiment's chart view compares runs visually. By default, "charts on this page show the most recent 10 runs," so if your configuration sweep produced more than that, change the number of runs displayed. You can filter runs by parameter, metric or tag, sort them by a parameter, and group them by parameter value with the Group by menu. If each run logged its context settings as parameters, grouping by those settings lets you see how each setting relates to the scores. A parallel coordinates plot goes further: you choose the parameters and metrics, and it draws how each run's settings line up with its scores. Experiment and run metadata is also available in MLflow system tables, if you would rather query it with Databricks SQL.
Checkpoint 4 of 5· Check yourself
You ran twelve context configurations that vary retrieved-chunk count and temperature, and logged both as parameters. Which chart-view feature is designed to show how these settings relate to a quality metric?
Parallel coordinates plots exist to show how parameter settings affect performance. The default view would also show only the most recent 10 runs, so some of the twelve would be missing.
“A parallel coordinates plot is useful in understanding the effect of parameter settings on model performance”Source: docs.databricks.com
Checkpoint 5 of 5· Exam question
Two context configurations are evaluated with both Correctness() and Safety() scorers. Configuration X scores highest on Correctness but noticeably lower on Safety than configuration Y, which scores slightly lower on Correctness but highest on Safety. A reviewer wants to pick the configuration that produced the most reliable outcomes overall for the task. What approach should they take?
Correct answer: C — Weigh both scorer results together against the task's requirements rather than deciding from either scorer alone
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.The configuration with the higher overall average score is the most reliable for any given task.Why is that wrong?
An average can rise while the metric the task depends on regresses. In the tutorial, V2 gained 20% overall but lost on retrieval_groundedness. Look at the regressed metrics first.
Covered in A higher average can hide a regression on the metric your task needs
2.You can fetch all the runs to compare in one mlflow.search_runs call with an IN or OR filter on run_id.Why is that wrong?
mlflow.search_runs doesn't support IN or OR operators, so the tutorial fetches each run separately and compares the resulting DataFrames.
3.The chart view automatically shows every run in the experiment.Why is that wrong?
By default the charts show only the 10 most recent runs. You have to change the number of runs displayed to see a larger configuration sweep.
Covered in Scanning many runs: chart view and parallel coordinates
Practise it for real
Evaluate two context configurations of the same agent on one dataset and decide which one is more reliable for a grounding-sensitive task
1.Wrap each configuration as its own function decorated with @mlflow.trace (for example, two prompt or retrieval variants)
Why: Direct evaluation calls predict_fn and captures traces, so each configuration needs an entry point MLflow can call
You should see: Two callables that take the same inputs keys as your evaluation dataset
2.Run mlflow.genai.evaluate() for the first configuration inside mlflow.start_run(run_name="v1"), passing your evaluation dataset and a scorer list that includes RetrievalGroundedness
Why: A named run is easy to find later, and the scorer list defines what reliable means for this task
You should see: An evaluation run named v1 in your experiment, with per-scorer /mean metrics
3.Repeat with run_name="v2" and the second configuration, keeping data and scorers exactly the same
Why: Only predict_fn should change, so that score differences come from the configuration
You should see: A second evaluation run whose metrics can be compared with v1 column by column
4.Fetch each run with mlflow.search_runs(filter_string=f"run_id = '...'") and select metrics.* columns ending in /mean, excluding agent/
Why: search_runs doesn't support IN or OR, and the agent/ columns are latency and token counts, not quality
You should see: A side-by-side table of per-scorer means for v1 and v2
5.In Evaluation runs, select both runs, choose Actions > Compare, and open the traces where the grounding metric regressed
Why: Judge rationales explain why a trace failed, which tells you whether the regression matters for the task
You should see: Per-trace assessments with rationales for each version
Stuck? Get a nudge
If the overall average and the task-critical scorer point to different versions, base the decision on the task-critical scorer.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Skip the agent metrics (latency, token counts) for quality comparison”
↩︎ Pull per-scorer metrics for each evaluation run“Fetch runs separately since mlflow.search_runs doesn't support IN or OR operators”
↩︎ Pull per-scorer metrics for each evaluation run“Look for specific examples where the evaluation metrics regressed so you can focus on those.”
↩︎ A higher average can hide a regression on the metric your task needs“which is not directly supported by the retrieved context”
↩︎ A higher average can hide a regression on the metric your task needs“This comparison view is the primary way to verify that a new prompt version outperforms the previous one.”
↩︎ Compare traces side by side in the Evaluation runs tab“The right pane displays a comparison of each trace in the selected runs.”
↩︎ Compare traces side by side in the Evaluation runs tab“Look for specific examples where the evaluation metrics regressed so you can focus on those.”
↩︎ Exam trap 1“Fetch runs separately since mlflow.search_runs doesn't support IN or OR operators”
↩︎ Exam trap 2“Extract metric columns (they end with /mean, not .aggregate_score)”
↩︎ Checkpoint“From the Actions drop-down menu, select Compare.”
↩︎ Checkpoint - 2.
“By default, charts on this page show the most recent 10 runs.”
↩︎ Scanning many runs: chart view and parallel coordinates“To group runs by parameter value, select one or more parameters from the Group by dropdown menu.”
↩︎ Scanning many runs: chart view and parallel coordinates“MLflow metadata for experiments and runs is also available in system tables”
↩︎ Scanning many runs: chart view and parallel coordinates“By default, charts on this page show the most recent 10 runs.”
↩︎ Exam trap 3“A parallel coordinates plot is useful in understanding the effect of parameter settings on model performance”
↩︎ Checkpoint - 3.https://docs.databricks.com/aws/en/mlflow3/genai/prompt-version-mgmt/prompt-registry/evaluate-promptsOfficial docs
“Monitor production: Continue evaluating prompts after deployment to catch degradation.”
↩︎ Scanning many runs: chart view and parallel coordinates - 4.
“You can use the same scorer for evaluation in development and monitoring in production”
↩︎ Scanning many runs: chart view and parallel coordinates