Review evaluation results in SageMaker AI optimizer
The Evals page shows the individual records of an evaluation run. An evaluation run scores one model against the project's evaluation criteria on an evaluation dataset. A record is one row of that dataset: the prompt, the model's response, and its scores.
You set the project's goal and evaluation criteria, including how each output is scored, on the Goal page. For more information, see Goal and evaluation criteria in SageMaker AI optimizer.
What you can do
-
Find where a model fails – See how many records fail each criterion, and break failures down against your baseline.
-
Read every record – Open any record to see its prompt, response, scores, and the judge's reason for each score.
-
Compare two runs – Pair the records of two runs on the same dataset and criteria version to see which records improved or got worse.
Open an evaluation run
-
Open your project.
-
In the project navigation, choose Evals.
-
For Experiment, choose an experiment. The list shows experiments that have at least one evaluation run.
-
For Evaluation run, choose a run. Runs are listed newest first. A run that is still running, failed, or stopped shows the reason.
The page shows the run's summary, the results by criterion, and the records table for the selected run. The summary shows Failing records: how many records failed at least one criterion.
By criterion shows the threshold for each criterion and how many records fail it. A record can fail more than one criterion. The section also names the judge model that scored the run.
See where a model fails
Where it fails breaks the results down so you can see where the model goes wrong. For a classification task, it compares accuracy for each class with the baseline, and lists the classes that the model confuses most. Use Compare with to choose the run to compare against.
For a classification task, the chart shows one pair of bars for each class: the baseline and the selected run. A class where the run's bar is shorter than the baseline's is a class where the new model got worse.
Find records
The records table lists every record in the run, with one column for each scorer in your criteria.
-
Show – Filter to All, Errors, Unscored, Changed since the last run, or Failing records.
-
Find records – Filter by text in the prompt or the output.
-
Export – Download the records as a CSV file.
-
View in MLflow – Open the run in MLflow.
Open a record
Choose a record's prompt to open it. Use Previous and Next to move through the records in the current filter.
A record shows its details (such as the dataset version, tokens, and latency), the prompt, the response, and the criteria. Under Criteria, each scorer shows its Result and the judge's Reason.
Diagnose failures before production
Before you choose a candidate for production, find out why its failing records fail. The cause tells you which fix to try next.
-
Under By criterion, find the criterion with the most failing records.
-
Under Where it fails, look for a pattern, such as one class or one kind of input that fails more often than others, and compare it with the baseline.
-
In the records table, for Show, choose Failing. Open several failing records and read the judge's reason for each failed criterion.
-
Check whether the judge and the data are right. If the judge's reasons don't match what you expect, or the expected answers in the dataset are wrong, the criteria or the dataset need to change, not the model. Ask the agent to propose a new version of the criteria or the dataset.
-
Decide what kind of failure it is, and ask the agent for the matching fix:
-
Knowledge gap – The model lacks facts about your domain. Try retrieval (RAG).
-
Behavior issue – The model knows enough but doesn't follow the expected format, tone, or rules. Try prompt optimization first, then fine-tuning.
-
-
After the agent runs the fix, compare the new run with the earlier one. For more information, see Compare two runs.
For more information about each fix, see Ways to improve a model.
Compare two runs
-
In the records table, choose Compare runs.
-
Choose the run to compare with. You can choose a finished run on the same dataset and criteria version. Other runs are listed with the reason that they can't be chosen.
The comparison view opens. It pairs the records of both runs and shows their scores side by side. Use Show to filter to Flipped, Now incorrect, Quality better, Quality worse, Quality unchanged, or Both failing records.
Next steps
To see the experiment that a run belongs to, see Track experiments in SageMaker AI optimizer. To act on what you found, ask the agent to update the dataset or the criteria, and run the next step.