Imagine asking a company assistant a vague question and watching it search, read the results, search again with better wording, and finally stop when it has enough. How do you teach a small AI model to do that reliably in your own environment? The answer AWS describes is to fine-tune a search agent with multi-turn reinforcement learning (MTRL) on Amazon SageMaker AI, a training method that rewards the agent for how a whole search session ends, not for any single step.
This explainer walks through what a search agent is, why common fine-tuning methods struggle with it, how MTRL works in plain terms, and what a realistic workflow looks like. It draws on an AWS Machine Learning blog post and AWS’s SageMaker developer documentation.
What is a search agent, and why is it hard to get right?
AWS explains that a search agent powered by a large language model (LLM) does not wait for the user to craft a perfect query. It decides on its own what to search for, which retrieval strategy to use, and when to stop. It does this over several rounds, adjusting its approach based on what it has already found.
That multi-step behavior is where the difficulty lies. Prompting a small model rarely produces dependable multi-turn behavior. Prompting a frontier model, meaning one of the largest and most capable models, often works but costs more in latency and money.
AWS frames fine-tuning as a third path: teach a small model your tools and environment directly. The stated goal is the speed and cost of a small model with reliability that would otherwise call for a frontier model.
Why do the usual fine-tuning methods fall short here?
AWS points to two familiar approaches and the gap in each.
- Supervised fine-tuning (SFT) trains a model on examples of ideal behavior. For a search agent, that means expert demonstrations of full multi-turn trajectories. AWS says these are costly to collect and usually do not exist for your particular setup.
- Single-turn reinforcement learning, such as RL with verifiable rewards (RLVR), scores one response at a time. AWS notes that a search agent makes interdependent decisions, each building on the context before it, so optimizing one step in isolation misses those dependencies.
A trajectory here simply means the full sequence of steps an agent takes on one task: the searches it runs, what it reads, and the answer it gives. AWS’s argument is that training has to look at the whole trajectory, and that the reward only needs to reflect whether the final outcome was good.
How does multi-turn reinforcement learning work?
AWS’s documentation describes multi-turn RL as training an agent to make good decisions across a sequence of steps rather than in a single moment. The agent observes its environment, takes an action, receives a reward, and moves to a new state, repeating over many timesteps. The aim is a policy, meaning the model’s learned behavior, that maximizes the total reward over the whole sequence. The documentation contrasts this with single-turn methods such as RLHF and RLAIF, where a reward is assigned to one output at a time.
The documentation offers a customer-service analogy. A support agent does not resolve a ticket in one message. They ask clarifying questions, look up the account, try a fix, check whether it worked, and follow up. At the end the customer is either satisfied or not. Over time the agent learns which sequence of steps tends to lead to a good result, and multi-turn RL trains a model the same way, so it learns which earlier decisions actually mattered.
AWS’s documentation also defines the vocabulary that appears in this field:
- Agent: the decision-making system that observes, acts, and improves. The model is the neural network inside it.
- Environment: everything the agent interacts with, including conversation history and available tools.
- State: a snapshot of what the agent knows before choosing its next move.
- Action: what the agent does at a step, such as calling a tool or sending a response.
- Reward: the feedback signal indicating how well things went.
- Episode: one complete run of a task from start to finish.
For a search agent, an episode is one full search session, an action is a query or a decision to stop, and the reward is a judgment of the final result.
What does Amazon SageMaker AI provide for this?
The AWS blog post describes Amazon SageMaker AI MTRL as a way to fine-tune LLMs with reinforcement learning in multi-turn settings. It treats an agentic task as a sequence of decisions, generates training data through multi-turn rollouts (runs where the agent attempts the task), and optimizes the model with policy gradient algorithms.
AWS lists these capabilities:
- A modular agent-environment interface. Integration is described as low-code, with custom rewards, custom tool loops, and custom conversation shapes.
- Serverless execution. AWS says production-scale agentic RL runs at per-token pricing without provisioning or managing GPU clusters.
- Asynchronous rollout and trajectory collection. Generation and gradient updates run in parallel with bounded off-policy staleness, which AWS says keeps training fast without drifting far from the current policy.
- A native algorithm library. Options include Proximal Policy Optimization (PPO), Clipped Importance Sampling Policy Optimization (CISPO), and importance-sampling losses, paired with group-based advantage estimators such as GRPO, GRPO pass@k, and RLOO.
- Resumable training. Long runs can be split across multiple jobs to work past single-job time limits.
- Trajectory and reward observability. The post’s list of features continues past this point, and the details of this item are not shown in the available text.
An advantage estimator, in this context, is the part of the algorithm that judges how much better or worse an action was than expected, which tells the model what to reinforce. Reading the individual algorithm names is optional for a non-programmer; what matters is that the platform offers a menu of established methods rather than a single fixed recipe.
What does a realistic workflow look like?
The AWS post’s own walkthrough covers fine-tuning a search agent and reports the retrieval-quality and reliability gains the team observed. The excerpt available here does not include those measured figures, so this article does not quote any numbers. The outline below is a conceptual workflow built from the capabilities AWS describes, not a step-by-step replica of the post.
Consider a company with an internal knowledge base and a small model that handles employee questions. The workflow would run roughly like this:
- Define the environment. The search tools the agent can call, such as a document search function, become part of the environment, along with the shape of the conversation.
- Define the reward. Because MTRL only needs a signal about the final outcome, the reward can reflect whether the agent ultimately retrieved what was needed, as AWS describes.
- Run rollouts. The agent attempts many search sessions, and the platform records each trajectory and its reward.
- Update the model. The chosen algorithm adjusts the model so that sequences of decisions leading to good outcomes become more likely.
- Inspect and repeat. Trajectory and reward observability, which AWS lists as a feature, lets a team look at how sessions actually unfolded and decide whether to continue training.
The appeal AWS describes is that the result is a small, specialized model, which brings faster and cheaper inference than relying on a frontier model for every query.
How does this compare with other ways to build a search agent?
The AWS post lays out the main alternatives itself, so the comparison can stay within what it states. Prompting a small model is the cheapest to try but, per AWS, rarely gives dependable multi-turn behavior. Prompting a frontier model often works but carries higher latency and cost. Supervised fine-tuning needs demonstrations that AWS says are expensive or unavailable. Single-turn RL scores steps separately and so overlooks how decisions depend on each other.
MTRL sits apart in that it learns from outcomes over a full session instead of from curated examples or isolated step scores. The AWS post does not present this as universally better, and the available text does not compare MTRL against specific competing products or other cloud platforms.
Where to stay cautious in practice
The performance gains reported in the AWS post come from AWS’s own experiment on its own setup, so results on a different knowledge base, toolset, or reward design may differ. Designing a reward that truly reflects a good search outcome is a judgment call, and a poorly chosen reward can steer the agent toward behavior that scores well without being useful. Current public documentation also lists supported models, pricing, and regions, so it is worth checking those pages before planning a project.
The central open question is how well the reported improvements carry over once the reward, the tools, and the data belong to a different organization.