Track experiments in SageMaker AI optimizer - Amazon SageMaker AI
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Track experiments in SageMaker AI optimizer

An experiment is the work that the agent does to reach the project's goal, for example, finding a model that meets your quality bars at a lower serving cost than the model that you run today. Every evaluation run is scored against the project's evaluation criteria. The agent launches the runs, such as evaluation, fine-tuning, and synthetic data generation, and records each one on the Experiments page.

When no model meets your criteria, the agent diagnoses each group of failures as a knowledge gap or a behavior issue, and proposes the lowest-cost fix first. Each fix produces a candidate on the same leaderboard. The agent asks for your approval before it prepares training data or starts training jobs.

What you can do

  • Track runs – See every run that the agent launched for the project, with its type, status, model, result, and duration.

  • Check results against your criteria – For each evaluation run, see how many of the project's criteria it met.

  • Compare runs – Select runs and compare them side by side.

  • Inspect a run – Open a run to see its configuration, logs, jobs, and training metrics, such as loss curves for a fine-tuning run.

  • Go deeper in MLflow – Runs are tracked in MLflow, where you can see all of a run's metrics.

Ways to improve a model

The agent lays out improvement options based on which criteria fail and why, and you choose one or more. Each improvement produces a candidate that's scored against the same criteria, so you can compare it with the baseline on the leaderboard.

Prompt optimization

Improves the instructions and examples in the prompt. Use it when the model has the knowledge that it needs but doesn't consistently follow the expected behavior.

Retrieval Augmented Generation (RAG)

Gives the model access to your domain knowledge at inference time. Use it when failures come from missing knowledge.

Fine-tuning

Changes the model's weights when a prompt or retrieval isn't enough. The agent recommends the technique and the training type, and can generate synthetic training data to fill gaps. Supported techniques include supervised fine-tuning (SFT), direct preference optimization (DPO), and reinforcement fine-tuning with verifiable rewards (RLVR) or AI feedback (RLAIF), with either LoRA or full fine-tuning. For more information, see Customization techniques and Training types.

Hyperparameter optimization (HPO)

Tries different training configurations and compares them against an evaluation objective. The agent picks each next trial based on the results of earlier ones.

Supported training options

SageMaker AI optimizer runs fine-tuning on one of the following options. The option determines the infrastructure, capacity, limits, and charges for the job.

Serverless

Fully managed jobs with no instance selection. SageMaker AI provisions and releases the infrastructure for you. For more information, see Infrastructure options.

Serverful

SageMaker AI training jobs, where you choose the instance type and count. Use this option when you need specific instances or want to run on capacity that you reserved. For more information, see SageMaker AI Training Jobs.

SageMaker AI optimizer doesn't support Training session APIs or HyperPod for model improvement jobs.

View the runs in a project

  1. Open your project.

  2. In the project navigation, choose Experiments.

The Runs table lists the runs that the agent launched for the project, grouped under the project's experiment. Each run shows the following:

Run name

The name of the run. Choose it to open the run's details.

Type

The kind of run, such as Evaluation, Fine-tuning, or Synthetic data.

Status

The state of the run, for example Succeeded.

Model

The model that the run used, such as the base model for a fine-tuning run or the evaluated model for an evaluation run.

Result

For an evaluation run, the number of the project's criteria that the model met, for example 1 of 1 criteria met. For a fine-tuning run, the model that the run produced.

Start time and Duration

When the run started and how long it took.

Experiments page with a Runs table of evaluation, fine-tuning, and synthetic data runs.

To compare runs, select two or more runs, and then choose Compare.

View run details

Choose a run name in the Runs table to open its details. The top of the page summarizes the run:

  • Status and Run time

  • Base model and Technique, for example SFT

  • Training dataset and Validation dataset locations

  • Created and Started times

  • ARN of the underlying SageMaker AI job

Below the summary, tabs show more about the run.

Fine-tuning results

For a fine-tuning run, charts of the run's training metrics: training loss, validation loss, learning rate, and gradient norm, by training step. Use them to check that training converged and that validation loss didn't rise, which can signal overfitting.

Configuration

The settings that the run used.

Logs

The run's logs.

Jobs

The SageMaker AI jobs that the run launched.

The charts show some of the run's metrics. To see all of them, choose View in MLflow. To return to the list, choose Experiments in the breadcrumb.

Next steps

To inspect each record of an evaluation run and diagnose failures, see Review evaluation results in SageMaker AI optimizer.