Get started with SageMaker AI optimizer
In SageMaker AI optimizer, you describe what you want to build or improve, and an agent works with you to reach a model that meets your criteria. The agent proposes each step, and you approve it. Everything the agent creates is saved in a project.
You can complete this procedure in about 15 minutes, not including the time that your administrator needs to give you access.
What you get
-
Start in plain language – Describe your use case in your own words, or pick a common starting point, such as setting a baseline or fine-tuning a smaller model to cut cost.
-
Choose your agent – Work with the SageMaker agent, Claude, or Codex. The agent you choose for a conversation stays with that conversation.
-
One project per use case – A project holds the goal, evaluation criteria, datasets, experiments, evaluation runs, leaderboard, deployments, and monitoring for one use case, backed by a Git repository.
-
Pick up where you left off – Your conversations are saved. You can step away, come back later, see what happened, and change an earlier decision.
-
Guidance that you control – The agent recommends what to do next and keeps you moving toward your goal. You can change the overall plan or any single decision at any time.
-
Results in one place – The agent shows results as tables and charts in the conversation. The same results are saved in the project, so you can find them later on pages such as Leaderboard and Evals.
Prerequisites
Before you begin, make sure that you have the following:
-
An AWS account.
-
A SageMaker AI domain in a supported AWS Region. If you don't have one, the one-click setup creates the domain, IAM roles, and an Amazon Simple Storage Service (Amazon S3) bucket.
-
An IAM role that SageMaker AI optimizer uses to create resources for you, with the managed policies in Set up permissions attached.
-
Access to the Amazon Bedrock, Amazon SageMaker JumpStart, or custom models that you plan to evaluate.
Set up permissions
SageMaker AI optimizer acts on your resources through an IAM role that you choose. New domains include the following core managed policies by default. To use SageMaker AI optimizer with an existing domain, ask your administrator to attach the following AWS managed policies to that role.
| Policy | What it allows |
|---|---|
Full access to SageMaker AI resources, such as domains, training jobs, models, and endpoints. |
|
Model customization workflows, including serverless training, custom reward functions for reinforcement learning, model evaluation, and deployment to SageMaker AI or Amazon Bedrock endpoints. |
|
The core features of SageMaker AI optimizer, such as projects, conversations with the agent, and evaluation criteria. |
Some features need an add-on managed policy. Add-on policies are named AmazonSageMakerAI. Attach the add-on policy for each feature that you plan to use.FeatureAccess
For more information, see AWS managed policies in the IAM User Guide.
Open SageMaker AI optimizer
-
Open Amazon SageMaker Studio.
-
Under Applications, choose SageMaker AI optimizer.
The SageMaker AI optimizer home page opens and asks What do you want to build or improve?
The home page has the following areas:
- Prompt box
-
Describe what you want to work on. You can upload files, or type
/to work directly with a specific skill. - Agent choice
-
Choose SageMaker agent, Claude, or Codex. When you send your prompt, the conversation is locked to that agent. To use a different agent, start a new conversation.
- Starter menus
-
Set a baseline, Prepare data, Customize a model, Evaluate models, and Deploy and improve. Each menu lists common requests, such as Define how I'll measure success.
- Updates and Recent projects
-
After you start working, the home page shows recent activity and action items across your projects, such as a finished job or an endpoint alarm, and links to your recent projects.
Create a project
The agent creates a project when you start work on a new use case.
-
In the prompt box, describe your use case and your goal. For example:
I have a model running in production for a complaint classification and routing system at our bank. Can you help improve my performance and costs? -
Choose an agent, and then choose Submit.
-
The agent sets up a project and tells you its name. Every dataset, experiment, and decision from the conversation is saved in the project.
Your new project appears on the Projects page, and its Goal page shows the objective and the evaluation criteria that the agent drafted. You can also choose Projects in the navigation pane, and then choose Create project.
From the Actions column, you can open the project's Git repository in JupyterLab.
Explore a project
A project shows its pages on the left and your conversation with the agent on the right.
- Goal
-
The project's objective and its evaluation criteria. The criteria are locked, so every run is judged against the same thresholds. To change a criterion, ask the agent in the conversation. For more information, see Goal and evaluation criteria in SageMaker AI optimizer.
- Repository
-
The project's Git repository, with the code and files that the agent produced. For more information, see Project repository in SageMaker AI optimizer.
- Datasets
-
The project's datasets and their versions. For more information, see Datasets.
- Experiments
-
The runs that the agent launched, with their results, metrics, and jobs. For more information, see Track experiments in SageMaker AI optimizer.
- Evals
-
The records of each evaluation run, and where the model fails. For more information, see Review evaluation results in SageMaker AI optimizer.
- Leaderboard
-
Every candidate ranked against your criteria on quality, cost, and latency. For more information, see Leaderboard.
- Monitoring
-
Scores over time for deployed models. For more information, see Monitoring.
- Activity
-
The project's recent activity. For more information, see Project activity in SageMaker AI optimizer.
- Catalog
-
The data and AI assets in your account, such as tables, Amazon S3 buckets, and base models, that you can bring into the project. For more information, see Catalog.
Work with the agent
The agent recommends each next step. It asks for your approval before it creates resources or starts work that costs money, such as training or deployment.
-
Decisions – When the agent needs your input, it shows a card, such as Select a deployment. Choose an option to continue. Expand Decision details to see why the agent proposed it.
-
Results – The agent shows results as tables and charts, such as candidate evaluation results.
-
Files – When the agent writes a file, such as a grader, it shows the file with an Open button.
-
Agent activity – Expand an entry such as Ran 2 tool calls to see what the agent did.
Conversations are private to you. The resources that a conversation creates belong to the project, so everyone with access to the project can see them.
Optional setup for later stages
-
Monitor models in production – Turn on CloudWatch Transaction Search. For Amazon Bedrock models, also turn on Amazon Bedrock model invocation logging.
-
Host models – Make sure that you have SageMaker AI endpoint capacity through Supported Regions and Quotas. Optionally, use a Capacity Reservation or a Reserve Flexible Training Plans for ML workloads to make sure that you get capacity when you need it.
Next steps
-
To see how the agent plans and runs work toward your goal, see Track experiments in SageMaker AI optimizer.
-
To inspect the records of an evaluation run, see Review evaluation results in SageMaker AI optimizer.