All ten LLMs tested under-ask, so build an agent that asks back
Adding "ask if unclear" to the prompt barely helps; build asking into the agent's infrastructure, then use a small eval to see whether asking pays off.
In brief
- Models tend to assume a single reading of an ambiguous request, and prompting tricks such as chain-of-thought or few-shot barely fix this.
- In the Agent SDK, the agent asks back through AskUserQuestion; if you restrict the tools list and forget to add this tool, the agent cannot ask.
- Measure under-asking and over-asking separately, then compare against a guessing version that cannot ask: asking is only worth it when results improve.
A client types “build this month’s revenue report”, and your agent runs straight away. It picks gross revenue, uses the server’s time zone, rolls up every region and returns a confident-looking number. The person asking wanted net revenue for a single branch.
The failure is common. The team behind the paper “Modeling Future Conversation Turns” (with authors from Google) observes that today’s LLMs often respond by assuming an ambiguous request has only one reading. ClarifyMT-Bench, a benchmark of 6,120 multi-turn conversations, found that all ten LLMs tested tended to under-ask.
For an FDE this is a daily problem, not a research curiosity. Requests at a client site almost always arrive short of context. This guide shows how to build an agent that asks back, then how to build a small eval that answers the harder question: is the asking worth it?
Why a prompt fix is not enough
Most people’s first reflex is to add “if anything is unclear, ask” to the system prompt. The CLAMBER benchmark (ACL 2024) tested techniques such as chain-of-thought and few-shot prompting. The ability to spot ambiguous questions barely improved, and sometimes the model became overconfident.
CLAMBER also found that LLMs write poor clarifying questions, because they fail to handle the points where readings conflict. That makes two separate skills: knowing when to ask, and asking the right thing. DiscoBench, a benchmark for search agents, likewise concluded that detecting ambiguity and asking effective clarifying questions are different capabilities.
The right approach, then, is to build the asking mechanism into the agent’s infrastructure and measure each capability on its own. A better prompt alone will not do it.
What you will build, and what you need
You will build two things. The first is an agent written with the Claude Agent SDK that asks back through the AskUserQuestion tool, with a cap on rounds of questions. The second is an eval script that scores the agent on a labeled set of requests.
You need a project with the Agent SDK installed, an existing agent (a read-only agent is enough) and 20 sample requests. The code below is a trimmed sketch meant to show the structure. Before running it, check function names and types against the “Handle approvals and user input” page of the SDK docs.
Steps 1–3: let the agent ask, and intercept it when it does
Step 1. Add AskUserQuestion to the tools list. According to the SDK docs, Claude calls AskUserQuestion when it needs more direction on a task with several valid approaches. If you have restricted the tools, for example to keep the agent read-only, you must add this tool to that array. Leave it out and the agent cannot ask back.
// Sketch — simplified
const options = {
allowedTools: [...READ_ONLY_TOOLS, "AskUserQuestion"],
canUseTool: handleTool,
};
Check: give the agent a deliberately ambiguous request, such as “summarize this month’s figures”, and look for an AskUserQuestion call in the log.
Step 2. Intercept the call in canUseTool. Each time the agent calls AskUserQuestion, the SDK fires your application’s canUseTool callback. This is where you show the question to the user, collect the answer and log it for the eval later.
// Sketch — simplified
let asks = 0;
const MAX_ASKS = 2;
async function handleTool(toolName, input) {
if (toolName !== "AskUserQuestion") return allow(input);
asks += 1;
log({ type: "ask", round: asks, input });
if (asks > MAX_ASKS) return answerWith(input, "Choose the most reasonable option yourself and state your assumptions");
const answers = await showToUser(input);
return answerWith(input, answers);
}
Step 3. Set a stopping condition. Anthropic’s “Building effective agents” recommends stopping conditions, such as a maximum number of iterations, to keep control of an agent. The clarification loop needs one too. The two-round limit above is your design choice, not an SDK default.
Once the rounds run out, the agent must decide for itself and record its assumptions so the user can still check them.
Check: try a request that is ambiguous in three different places. The agent should stop asking after the second round, and the output should include a section listing its assumptions.
Three easy mistakes when you turn on asking
The easiest mistake is letting a subagent ask. The SDK docs state plainly that AskUserQuestion is not yet available in subagents. Every question has to go through the main agent, so design your subagents to pass their need for clarification back up to it.
The next is cramming too much into one question. Each call allows only 1–4 questions, each with 2–4 options. The limit actually helps, because it forces the agent to offer a few concrete readings, such as “gross or net revenue?”, rather than a vague “what do you want?”.
The last is leaving the callback hanging. The SDK docs say the callback can wait indefinitely and the agent stays idle until it returns. A client may answer half a day later; for that case the docs recommend a PreToolUse hook with a defer decision, so the process exits and resumes once the answer arrives.
Steps 4–5: measure under-asking and over-asking separately
Counting how often the agent asks tells you nothing. ClarifyMT-Bench found that models under-ask, yet the same study also recorded the opposite: models often over-ask on inputs they should have refused. To know which way your agent leans, you have to measure both.
Step 4. Label the data. Each case holds a request, a should_ask label and an intent: the real intention a simulated user will draw on to answer when asked.
cases = [
{"prompt": "This month's revenue report", "should_ask": True,
"intent": "net revenue, North branch"},
{"prompt": "Count cancelled orders on Nov 3 in the orders table", "should_ask": False,
"intent": None},
]
Step 5. Compute the two rates.
def score(results):
amb = [r for r in results if r["should_ask"]]
clear = [r for r in results if not r["should_ask"]]
under = sum(not r["asked"] for r in amb) / len(amb)
over = sum(r["asked"] for r in clear) / len(clear)
return under, over
Take a hypothetical set of 20 cases split evenly: 10 ambiguous, 10 clear. The agent asks on 6 of the ambiguous cases, missing 4, so the under-asking rate is 40%.
It also asks on 2 clear cases, an over-asking rate of 20%. The two numbers point to two different fixes, but if you only count the total you see 8 questions and no idea what to change.
Is asking worth it? Compare with an agent that can only guess
This is the step many teams skip. DiscoBench did not compare asking with guessing; it compared searching further instead of asking back with guessing outright, and found that searching further usually did worse: an average success rate of 51.9% against 56.5%. The lesson is that behavior which looks careful does not necessarily produce better results.
No benchmark will run the asking-versus-guessing comparison on your client’s data for you. You have to measure it yourself.
Step 6. Run the comparison. Run the same 20 cases under two configurations: one with AskUserQuestion, and one with it removed from allowedTools. The second forces the agent to guess. Score both with the same pass/fail criterion, based on intent.
Continuing the same example, the results table might look like this:
| Metric (20 cases, illustrative numbers) | With AskUserQuestion | Guessing outright |
|---|---|---|
| Passed on 10 ambiguous cases | 7/10 | 3/10 |
| Passed on 10 clear cases | 9/10 | 9/10 |
| Total passed | 16/20 | 12/20 |
| Times the user had to answer | 8 | 0 |
How to read it: the asking version trades 8 interruptions for 4 extra passes, all of them in the ambiguous group.
But 2 of the 8 questions landed on clear cases without raising the pass rate there, so the first thing to fix is over-asking.
If the left-hand column does not pass clearly more often, the cost of making users answer is not worth paying.
Step 7. Score question quality. A good question is one where each option leads to a different course of action, and at least one option matches the real intent. A simple check: for each logged question, have the simulated user pick each option in turn, rerun the agent and compare the outputs.
# Sketch — simplified; normalize() depends on your data
def question_quality(case, ask, run_with_answer, matches):
outputs = {opt: normalize(run_with_answer(case, opt))
for opt in ask["options"]}
branches = len(set(outputs.values())) > 1 # do the options change the result?
on_target = any(matches(opt, case["intent"]) for opt in ask["options"])
return {"branches": branches, "on_target": on_target}
For “gross or net revenue?”, the two options produce two different numbers and one of them matches intent, so the question passes both tests. If the agent does exactly the same thing whichever option is chosen, branches is False: the question only slows the user down.
What this skill looks like at a client site
This eval is something you can bring to a review with the client. Instead of saying “the agent now asks back”, put the comparison table above on screen, with the client’s real numbers in place of the illustrative ones.
The best case set comes from the client’s own real tickets, because every company’s ambiguity sits in different terms. A final exercise: run all seven steps on 20 of those tickets, fill in the table, then write one sentence concluding whether to keep or drop AskUserQuestion.
For your career, put the way you measured in your CV and describe it in interviews, rather than just listing features. A line such as “reduced the over-asking rate on the client’s real request set, benchmarked against a guessing baseline” shows a hiring manager that you know how to evaluate agents.
When reading job descriptions, look for passages that mention agent evaluation or human review mid-task. Those are the places to bring up this eval.
Anthropic describes agents as working on their own but able to return to a human when they need more information or human judgment. When to return should not be left to the model’s instinct: let measurements on the client’s data decide.
Was this article useful?
Thanks for the feedback!
6 sources
- Building effective AI agents (Anthropic) · 2024-12-19
- CLAMBER: A Benchmark of Identifying and Clarifying Ambiguous Information Needs in Large Language Models · 2024-05-20
- Modeling Future Conversation Turns to Teach LLMs to Ask Clarifying Questions · 2024-10-17
- ClarifyMT-Bench: Benchmarking and Improving Multi-Turn Clarification for Conversational Large Language Models · 2025-12-24
- When Search Agents Should Ask: DiscoBench for Clarification-Aware Deep Search
- Handle approvals and user input (Claude Agent SDK docs)