Skip to content
Sandworld

Search the docs and guides

    Evaluation

    Simulated users in agent evaluation: when and how to use them

    A simulated user holds details the agent wasn’t told and answers when asked. How to build one that doesn’t leak, and how to grade whether the agent asked.

    By the Sandworld teamUpdated 6 min read

    A simulated user is a stand-in for the person an agent works for: a script or a language model that holds facts the agent needs but wasn’t told, and answers when asked. It tests whether an agent asks instead of guessing. Keep it from volunteering answers, make its replies replayable, and grade the episode on the app’s final state and on whether the agent asked before it acted.

    Why do agent evaluations need a user?

    Real requests leave things out. “Send my order somewhere else.” “Bill the hours from last week.” A good agent finds the missing detail in the app when it’s there, and asks when only the person knows it. A benchmark whose instructions spell out every detail can’t tell that agent from one that guesses, and the guesser is the one that ships an order to the wrong address.

    τ-bench made simulated users standard in agent evaluation: an agent with domain tools and a policy talks to a user simulated by a language model, and success is judged by comparing the database at the end with an annotated goal state (Yao et al., 2024). Its successor, τ²-bench, adds “dual control”, where the simulated user can also act through tools in a shared environment (Barres et al., 2025). Commercial environment builders now describe simulated users as part of their products too, for example Collinear and Veris AI.

    What kinds of simulated user are there?

    KindHow it answersStrengthsWeaknesses
    ScriptedFixed facts, matched to the topic of the questionDeterministic, free, replayable; can’t reveal what it doesn’t holdStiff; an unexpected question gets a fallback reply
    LLM-playedA model plays a persona, given the request and the hidden factsNatural replies to any phrasingCosts tokens; can drift, volunteer or contradict itself
    Dual-controlThe user also acts with tools in a shared environmentTests guiding a person through stepsHarder to build and to grade
    Real peopleLiveThe ground truthSlow, expensive and not reproducible

    What does a simulated-user task look like?

    Here is one from Quickbasket, Sandworld’s grocery-delivery twin. The request: “I won’t be home this evening. Can you send my order that hasn’t been packed yet somewhere else?” The account has more than one saved address, and nothing in the request says which one is meant. The simulated user is a busy customer who answers briefly and politely, and holds a single fact, unlocked by questions about where to deliver: “Please send it to my studio on Harbor Lane.” The verifier has three checks:

    1. The agent asked the customer where to send the order before changing anything.
    2. The unpacked order now goes to the studio.
    3. No other order changed.

    An agent that guesses fails the first check even if it happens to pick the studio, because a lucky guess isn’t the behaviour you want to reward. An agent that asks, then redirects the wrong order, fails the third. Only the agent that asks, listens and changes exactly one thing passes.

    How do you stop a simulated user giving the answer away?

    • Hold facts back by topic. The user answers the question asked, and only that. Sandworld’s LLM-played users are told to reveal only what they’re asked and never to volunteer.
    • Keep the user ignorant of the app. A user knows what they want (the studio address, the hours they worked) but not the order id, the policy or which tool to call. Otherwise the user solves the task.
    • Keep the persona consistent across seeds of the same task, so every run tests the same gap.
    • Make replies replayable. Cache each LLM reply with the episode, so a replay produces exactly the same conversation and the same verdict.
    • Pin the simulator. When you compare agents, use the same simulator model and settings for all of them, and report it.

    How do you grade a clarification?

    Grade it like everything else: by what the agent did, not by what it said.

    • The outcome uses the answer. The order went to the address the user named, the invoice carries the hours the user gave.
    • The question came first. The agent asked before its first state-changing call. An agent that books something, then asks, then books again has already done damage; a verifier can require the order.
    • Asking isn’t free. Pair ask-the-user tasks with tasks where the detail is findable in the app, so an agent that asks about everything doesn’t look careful by default.
    • Report it separately. “Didn’t ask when it should have” is a failure reason of its own, distinct from a wrong result, and worth tracking across model and prompt changes.

    Scripted or LLM-played: which should you use?

    Use scripted users where determinism matters most: CI gates and training rewards. Every run gets the same reply to the same question, so a change in the score comes from the agent. Use LLM-played users to check that the agent copes with natural, varied replies, with a pinned model and cached replies. A useful habit is to run a subset both ways; if pass rates differ a lot, your agent depends on exact phrasing.

    In Sandworld, a task with a user adds an ask_user tool to that episode. By default a scripted user answers from the task’s hidden facts by topic. With "user_simulator": "llm", an LLM plays the person instead, conditioned on the task’s persona, the original request and the same facts, and each reply is cached with the episode; the verifier is the same either way (API docs, environment spec).

    To test how an agent copes with people who aren’t cooperative, start the episode with a user_style: impatient, vague (answers one thing at a time and needs follow-ups) or skeptical (questions the agent’s claims), which the scripted user plays deterministically, or terse and non-native, which reword the facts themselves and so need an LLM user. A style changes wording or adds an exchange, never the facts the verifier depends on, and leaderboard runs always use the default (user styles).

    What are the limits of simulated users?

    • They’re too cooperative. Simulated users rarely get impatient, change their mind or misremember unless you design them to.
    • They share the agent’s blind spots when the same model family plays both sides.
    • They’re mostly text. Voice is starting to appear (τ-bench’s repository has added full-duplex voice), but most environments are chat.
    • They don’t replace real transcripts. Review real conversations regularly and turn the questions people actually leave out into new hidden facts.

    A checklist for simulated users

    1. Write the hidden facts first, each with the topics that unlock it.
    2. Give the user a persona and a goal, not knowledge of the app.
    3. Tell an LLM-played user to answer only what it’s asked; test that it doesn’t volunteer.
    4. Cache replies with the episode, and pin the simulator model.
    5. Verify the outcome uses the answer, and that the question came before the first change.
    6. Pair every ask-the-user task with one where asking is unnecessary.
    7. Report “didn’t ask” as its own failure reason.

    To see one, open the sandbox and play a task where the request leaves something out, or read how to design tasks with policy traps, the other half of testing judgment.

    Frequently asked questions

    What is a simulated user in AI agent evaluation?

    A script or language model that plays the person an agent works for. It holds facts the agent needs but wasn’t told, such as which address to use, and answers when asked, so the evaluation can test whether the agent asks instead of guessing.

    Should a simulated user be played by an LLM?

    Use scripted users where determinism matters, such as CI gates and training rewards, and LLM-played users to test natural, varied replies. Pin the simulator model and cache its replies so episodes replay exactly.

    How do you grade whether an agent asked a clarifying question?

    By state and order: the final state uses the user’s answer, and the agent asked before its first state-changing call. Pair these tasks with ones where the detail is in the app, so asking about everything isn’t rewarded.

    What is τ-bench?

    A 2024 benchmark in which an agent with domain tools and a policy talks to a user simulated by a language model; success is judged by comparing the final database with a goal state. It also introduced the pass^k reliability metric. τ²-bench added a user who can act with tools too.

    Try it

    See every idea here in a working environment.

    The examples come from real Sandworld tasks. Play one in your browser — every tap is the tool call an agent would make — then read the verifier’s check-by-check verdict.