H-16Action & ErgonomicsEngineeringDesign

Calibrated Discovery

Let agents search for each operation separately, and say how well each result fits, including when nothing does, so they stop hunting for tools that don't exist.

Human UXAgent AXInformation scent→Calibrated discovery

How many searches does it take an agent to learn that a payments API can't tell you the weather?

A café owner types into her merchant dashboard: "Will it rain at my Harbor Street location this afternoon? I need to decide about the patio tables." The assistant behind the dashboard is an agent connected to a payments API with about 300 operations. It doesn't see them all. It has one tool, search_tools, which returns the eight best matches for a query.

It searches for "weather forecast". Back come eight tools: get_terminal_location, list_terminal_readers, get_balance and five more. None of them is about weather, but the list is full and the top hit mentions a location. Close, the agent concludes. It tries "location weather", then "terminal latitude", then a guessed tool name, get_weather, then "rain forecast". Every search returns another full list of eight.

After the fifth search, the agent gives the answer it could have given after the first: it can't check the weather. The owner waited through four pointless round trips. The team paid for five responses full of tool schemas. And no log shows an error, because every search succeeded.

Requests your API can't serve are rare per user and constant across all of them. Each one turns into a quiet hunt, and the hunt is paid for in latency, tokens and patience.

Why it happens

Big APIs can't show the agent every tool at once. Three hundred schemas in the context window would cost tens of thousands of tokens before the agent has done anything. That upfront cost has a name: tool-schema bloatLexicon · 38Tool-Schema BloatUpfront context consumption caused by oversized or granular tool catalogs.. So large tool surfaces load tools on demand, the pattern H-07 Local Handles & Progressive Disclosure describes, and search becomes the front door.

A person browsing a website has a good sense for when a page is a dead end. Peter Pirolli and Stuart Card, studying how people forage for information, called the cues that guide this information scent: link labels that smell like the goal, or don't. A person sees the whole page and knows at a glance that nothing on it is about weather, so they back out after one look.

The agent sees a ranked list, and a ranking is relative. Position one means "better than the other seven", which says nothing about whether it's any good. Most tool search is hybrid: keyword matching and embedding similarity, fused into one ranked list. The fused score only orders the hits against each other. A list for a perfect match and a list for no match at all look exactly alike.

What's missing is one more field: a flag, set from a score that has been checked against queries known to have no answer, that says no result fits well, even though results exist. The Guide calls it a weak-match signalLexicon · 56Weak-Match SignalA calibrated flag that no result fits well, even when results exist..

A weak match is an empty result in disguise. An empty result, or a write that quietly says "done", is what the Guide calls a null observationLexicon · 27Null ObservationsEmpty results or silent successes requiring explicit scope confirmation.: an answer of nothing, which the agent can only trust if the tool says where it looked. H-02 Affirmative Null Observations fixes the bare []. A ranked search never returns [], though, so a well-written "nothing found" hint simply never fires.

Without the flag, the agent does the reasonable thing with a near miss: it rephrases. Repeated, near-identical calls that change nothing are a thrash trapLexicon · 49Thrash & Loop TrapsRepeated near-identical failing calls producing zero environment progress., and this one is hard to see because the agent never says the search is failing it. The figure shows the café request both ways.

The callWhat comes backWhat the agent concludesWhat happensPlain ranked listsearch_tools( "weather forecast")8 payments tools, best first:"tools": [ "get_terminal_location", "list_terminal_readers", "get_balance", … 5 more ]“Close. A betterphrasing willfind it.”Rephrases 4 times. Eachsearch returns 8 more tools:2"location weather"3"terminal latitude"4"get_weather"a guess5"rain forecast"5 searches before itadmits the gap.The owner waits throughall of them for a no.List with a weak-match flagsearch_tools( "weather forecast")8 payments tools, best first:"tools": [ "get_terminal_location", "list_terminal_readers", "get_balance", … 5 more ],plus a fit flag and a hint:"match": "weak","hint": "No tool closely matches. If none fits, call report_unmet_need; do not search again."“Nothing here fits.Report it.”Calls it once:report_unmet_need( "weather forecast")Tells the owner:“I can’t check theweather from here.”1 search, 1 report call.The owner gets heranswer straight away.
Fig. 16.1The same weather request on a payments API, two ways. A plain ranked list always looks like a near miss, so the agent rephrases and searches again. With a weak-match flag and a named exit, one search and one report call end the hunt.

Notice that the list is the same in both rows. Only the flag and its hint differ, and they change the agent's conclusion from "close, try again" to "nothing fits, report it".

The second failure needs no missing tool at all. "Cancel Dana's subscription and refund her last invoice" sent as one query returns the tools for whichever half dominates the wording. All eight slots fill with subscription tools, and refund_invoice misses the cut. The agent cancels the subscription, then either searches again or tells Dana that refunds aren't possible. The cure is a per-operation queryLexicon · 57Per-Operation QueryA discovery request split into one query per operation the task needs.: the request split into one query for each operation the task needs, with results grouped per query.

What it costs

Turns on the requests you can't serve. In a Research diary experiment on tool search, an agent asked for the weather through a payments API searched 5, 8 and 5 times over three attempts before reporting the gap. Each search is a round trip the user waits through.

Wrong "I can't" answers on requests you can serve. The compound request is worse than the missing tool, because the tool exists. An agent that sees only the louder half may tell a customer the API can't do something it can.

Tokens on every search. In the same experiment, a fixed top 8 of tools cost 818 tokens per response, paid again on every rephrase.

The expensive wrong fix. Hunts look like a model problem, so teams reach for inference. The diary team tried a small local model that reads the hits and keeps only the needed tools. It reached 0.74–0.76 exact on 107 answerable queries and took 1.4–2.8 s on two cloud CPUs, against a 100 ms budget. Changing only the query shape to one query per operation, with a free rule that keeps each query's top hit, reached 0.84 at no added latency. Change the interface before you add inference.

The fix

In plain words: let the agent ask for each operation separately, and make every search say how well its results fit, including when nothing does. Five changes do it.

  1. Accept one query per operation. Take a list of query strings and return one group of results per query. Put a copy-ready example of a split request in the tool description.
  2. Cut each group where the scores drop off. Stop at the first clear gap instead of a fixed eight, and report shown, total_matches and the call that gets the rest.
  3. Flag weak matches from a calibrated signal. Calibrate it on queries you know no tool can answer. Raw embedding similarity works better than a rank-fused score, which has no absolute meaning. Recalibrate whenever the embedding model changes.
  4. On a weak match, name the exit. Point to the call that reports an unmet need, so stopping is one obvious move.
  5. Show near-ties only when tools differ by scope. Two tools that do the same thing for a user and for an organization deserve a note. A list tool and a get tool don't.

Here is the weather search from the hook, before and after.

Beforesearch_tools → 45 tok
{
  "tools": [ 1
    { "name": "get_terminal_location", "score": 0.031 },
    { "name": "list_terminal_readers", "score": 0.029 },
    { "name": "get_balance", "score": 0.027 },
    "… 5 more"
  ]
}
  1. 1A full ranked list with scores that only order the hits against each other. Nothing says whether the top hit is any good, so the agent reads it as a near miss and rephrases.
Tokens45
Searches before answering (illustrative)5 searches
Aftersearch_tools → 100 tok
{
  "tools": [
    { "name": "get_terminal_location", "score": 0.031 },
    { "name": "list_terminal_readers", "score": 0.029 }
  ],
  "shown": 2, 1
  "total_matches": 8,
  "more": "search_tools(queries=[\"weather forecast\"], offset=2)",
  "match": "weak", 2
  "hint": "No tool fits this query well. If none fits, call report_unmet_need(text=\"…\"). Do not search again." 3
}
  1. 1The list stops at the score gap and says how many more matched and how to get them. Shorter lists pay for the new fields.
  2. 2The weak flag comes from raw similarity to the query, checked against queries known to have no tool. It says what the fused scores can't: the best hit is far from the request.
  3. 3The hint names the exit and asks the agent to stop. That is a request, and an agent convinced a tool exists may still ignore it, as the caveats below show.
Tokens100
Searches before answering (illustrative)1 searches
Illustrative example

Pin 1 is H-03 Token Hygiene & High Observation Yield at work: return what changes the next decision, plus a pointer to the rest. Pin 2 is the new part. The tool already knew how far the request was from every tool, and now it says so. Pin 3 turns the flag into a next move, so the agent's cheapest action is the right one.

The split request looks like this. The query shape is a plain list of strings, which every model has seen countless times. That is H-05 Align with Interface Priors working in your favor: nothing to learn but one field name.

{ "queries": ["cancel a subscription", "refund an invoice"] }
{
  "results": [
    { "query": "cancel a subscription", "tools": ["cancel_subscription"], "shown": 1, "total_matches": 4, "match": "strong" },
    { "query": "refund an invoice", "tools": ["refund_invoice", "create_credit_note"], "shown": 2, "total_matches": 5, "match": "strong" }
  ]
}

Each operation gets its own ranking, so the quiet half of the request can't be crowded out. Agents split only when they've seen it done, so the example belongs in the description itself, the way H-09 Executable, Just-in-Time Micro-Docs recommends.

The diary evidence is promising and small. Across 19 tasks run 3 times each, the flag and its companion changes cut searches per task from 1.44 to 0.95, all of the saving on tasks no tool could do. Success didn't improve: it dipped from 0.91 to 0.88, within the noise. One query per operation lifted exact top hits from 0.59 to 0.82 on 107 answerable queries, at about 1.29 searches per request. Cutting at a score gap trimmed responses from 818 to 490 tokens while still returning 0.99 of the needed tools. For spotting "nothing fits", raw similarity scored an AUC of 0.99 against 0.96 for the fused score. That last result rests on only 12 no-tool queries, one embedding model, and a threshold chosen on the same set.

Where the pattern applies

Any ranked retrieval an agent depends on has the same blind spot: documentation search, playbook or skill lookup, code search by similarity, product catalog search. If the result is always a full list, the response needs a fit signal and a named exit. If agents bundle several needs into one query, the tool should accept several queries.

What the flag can't do

It can't beat a belief. In the diary's full-catalog run, a broken response from an earlier tool convinced the agent it needed a "repository by ID" tool that doesn't exist. It searched 5–6 times through 3–4 weak flags. A flag informs a plan. It doesn't overrule one. When an agent ignores the signal, look upstream for the tool that misled it.

It may not transfer to long prompts. The calibrated signal separated short queries well. On long task prompts over a 1,281-tool catalog, prompts no tool could serve scored 0.86–0.89, and answerable ones scored as low as 0.84. Calibrate on the short queries agents actually send.

Some models misuse the split. One model split requests by operation, as intended. A weaker one, gemini-3.5-flash-lite, sent synonym lists such as ["terminal", "location"], which multiplied output and added nothing. Same interface, different users. The Guide calls this persona = modelLexicon · 12Persona = ModelTreating model family, scale and training as the user persona.: the model's family, scale and training are the user persona you design for. Test the description with the smallest model you support.

Spot it in your traces

Here is the café session from the hook as a trace. Every turn returned success, and the agent never mentioned that the search wasn't working.

TraceA merchant assistant looking for a weather tool
  1. T1
    search_tools("weather forecast")→ 8 tools: get_terminal_location, list_terminal_readers, …A location tool is close. A better phrasing will find the forecast.A full list with no fit signal reads as a near miss.
  2. T2
    search_tools("location weather")→ 8 tools: get_terminal_location, update_terminal_location, …Still not it. Try the coordinates.The rephrase changes nothing. This is the thrash trap starting.
  3. T3
    search_tools("get_weather")→ 8 tools: get_balance, get_payout, …Maybe the tool has that exact name.Guessing a tool name is the clearest sign the agent believes the tool must exist.
  4. T4
    report_unmet_need(text="weather at a location")→ { "status": "logged" }There is no weather tool. Tell the owner.The right ending, after five searches (two are left out here). A weak flag on the first search would have led here directly.

To find the same pattern in your logs, look for these signals:

  • Search streaks. Three or more discovery calls in a row with no other tool called in between.
  • Guessed tool names. Search queries that look like identifiers (get_weather, fetchForecast) after natural-language queries failed.
  • Late unmet-need reports. Count the searches before each report_unmet_need call. Anything above one is time the user waited for nothing.
  • Half-done compound tasks. Requests with "and" or "then" where the agent called only tools for the first operation, or told the user part of the task is impossible.
  • Flags followed by more searches. If agents keep searching after a weak flag, check the earlier tool responses for something that convinced them the tool exists.

Review checklist

Run these against every search or discovery tool an agent uses to find tools, documents or records. Each check takes a few calls.

Review checklist · 7 items
  1. Accept a list of queries, one per operation, and return the results grouped per query.How to check Send {"queries": ["cancel a subscription", "refund an invoice"]}. The response should contain two groups, each with its best tool first.
  2. Show one copy-ready example of a split request in the tool description.How to check Give a fresh agent only the tool definition and a two-step request. It should send two queries, one per operation, not a list of synonyms.
  3. Cut each group at a score gap and report shown, total_matches and the call that returns the rest.How to check Run a narrow query. The response should hold a few hits plus the counts and a working call for the remainder.
  4. Flag weak matches from a signal calibrated on known no-tool queries, such as raw embedding similarity, never a rank-fused score.How to check Run a labelled set of queries no tool can answer and a set that tools can. The flag should fire on most of the first set and almost none of the second.
  5. Store the weak-match threshold per embedding model and recalibrate it when the model changes.How to check Look up where the threshold lives. It should be keyed to the embedder, with the date and data set it was calibrated on.
  6. On a weak match, name the call that reports an unmet need and ask the agent to stop searching.How to check Search a payments tool index for "weather forecast". The response should say match: "weak" and name the report call.
  7. Show near-tie notes only when tools differ by scope, such as user, organization or repository.How to check Search for a list-and-get pair of the same resource. No tie note should appear.

When laws collide

Calibrated discovery adds fields to every search, which pulls against economy and leans on two neighbors.

  • Where they clash
    Groups, counts, flags and hints add tokens to every search, and Token Hygiene asks every response to carry only what helps the next decision. An agent that searches 30 times a session pays for those fields 30 times.
    How to have both
    Let the adaptive cut pay for them. Stopping at the score gap removes far more tokens than the new fields add. Send the hint and exit only on weak matches, where they replace whole rounds of searching.
  • How they combine
    A weak match is a null observation that arrives looking like a full list. Affirmative Null Observations says every empty answer must say where it looked and what to try next.
    What you get
    Treat "nothing fits well" as an empty result with the same duties: state it as a field, say what was searched, and name the next move. The agent then handles a missing tool the way it handles a missing record.
  • How they combine
    Agents rarely split a request on their own, because nothing tells them the tool accepts several queries. One inline example in the description is the cheapest documentation there is.
    What you get
    Ship the split together with a copy-ready example of it. The interface change only pays off when the description shows it.

Terms from this page

38Tool-Schema Bloat
Upfront context consumption caused by oversized or granular tool catalogs.
56Weak-Match Signal
A calibrated flag that no result fits well, even when results exist.
27Null Observations
Empty results or silent successes requiring explicit scope confirmation.
49Thrash & Loop Traps
Repeated near-identical failing calls producing zero environment progress.
57Per-Operation Query
A discovery request split into one query per operation the task needs.
12Persona = Model
Treating model family, scale and training as the user persona.
esc

Try “tokens”, “errors”, “stale”, “handoff” or “blast radius”.