This prompt is for agent infrastructure engineers who manage tool catalogs where multiple tools have overlapping or semantically similar capabilities. The job-to-be-done is producing a structured refusal when the model cannot confidently disambiguate between two or more candidate tools for a given user request. Instead of silently selecting the wrong tool—a failure mode that corrupts downstream state and is hard to detect in logs—the model returns a ranked list of candidates and the specific piece of missing information that would resolve the ambiguity. This turns a potential execution error into a recoverable clarification or review event.
Prompt
Multi-Tool Ambiguity Refusal Prompt Template

When to Use This Prompt
Define the exact job this prompt performs, the operator who should use it, and the production conditions where it is the right tool.
Use this prompt when your system exposes tools that share functional boundaries. Common examples include: a search_knowledge_base tool alongside a query_ticket_history tool when a user asks 'find that thing I asked about last week'; a cancel_subscription tool and a pause_subscription tool when a user says 'stop my account for a while'; or a create_incident tool next to a create_change_request tool when a user reports 'the deployment broke something.' In each case, the user's language is underspecified relative to the tool schema, and guessing breaks the workflow. This prompt is not for cases where the model has zero candidate tools (use an out-of-distribution abstention prompt) or where the model is confident but the arguments are incomplete (use an argument-completeness refusal prompt).
Do not use this prompt when latency constraints require immediate tool execution without a clarification loop, or when the tool catalog is small enough that ambiguity can be resolved through schema design alone. If you can eliminate overlap by tightening tool descriptions, parameter schemas, or capability boundaries, do that first—prompt-based refusal is a safety net, not a substitute for clear tool contracts. Before deploying, pair this prompt with a regression test suite that includes known-ambiguous inputs to verify that refusal behavior doesn't drift across model or prompt changes. In regulated domains, route refusals to a human review queue rather than exposing the ranked candidate list directly to end users.
Use Case Fit
Where the Multi-Tool Ambiguity Refusal Prompt Template delivers value and where it introduces risk. Use these cards to decide if this pattern fits your production context before wiring it into an agent harness.
Good Fit: Overlapping Tool Capabilities
Use when: your agent has multiple tools with similar descriptions (e.g., search_kb vs. search_docs vs. query_faq) and the model must choose without guessing. Guardrail: the refusal with ranked candidates prevents silent wrong-tool execution and gives the upstream orchestrator a structured signal to disambiguate.
Good Fit: Regulated or High-Stakes Tool Execution
Use when: calling the wrong tool carries compliance risk, financial impact, or irreversible side effects. Guardrail: the prompt produces a refusal with explicit disambiguating questions, creating a natural human-review gate before any tool executes.
Bad Fit: Single-Tool or Clearly Dominant Tool Scenarios
Avoid when: only one tool matches the intent or one tool is obviously correct. Guardrail: unnecessary refusal adds latency and user friction. Pair this template with a confidence threshold so it only activates when ambiguity is genuine.
Bad Fit: Real-Time or Low-Latency Paths
Avoid when: the user expects an immediate action and any refusal breaks the experience (e.g., voice assistants, live chat). Guardrail: for latency-sensitive paths, use a fast confidence scoring prompt instead and fall back to this refusal template only when confidence is below threshold.
Required Inputs
Must provide: the user's original request, the full list of available tool schemas with descriptions, and any conversation context that might disambiguate intent. Guardrail: missing tool descriptions or truncated schemas cause false ambiguity. Validate that all candidate tools are present in the prompt context before invoking.
Operational Risk: Refusal Fatigue
Risk: if the prompt refuses too often for inputs that a human would consider clear, users learn to ignore or route around the refusal. Guardrail: track refusal rate and false-refusal rate in production. If refusal rate exceeds 20% of ambiguous inputs, tune the prompt's ambiguity criteria or adjust the confidence threshold upward.
Copy-Ready Prompt Template
A reusable prompt that forces the model to refuse ambiguous tool selection and return a ranked candidate list with the specific information needed to disambiguate.
This template is designed for agent infrastructure engineers who manage tool sets with overlapping capabilities—for example, a search_knowledge_base tool and a query_ticket_system tool that both accept natural-language queries. When user intent could map to multiple tools with equal plausibility, guessing wrong produces silent failures that are hard to detect downstream. This prompt instructs the model to refuse execution, rank the candidate tools by fit, and specify exactly what clarifying information would resolve the ambiguity. The output is structured for programmatic consumption so your harness can route the refusal to a clarification step, a human review queue, or a follow-up prompt with the missing context.
textYou are a tool-selection router in a production AI system. Your job is to decide which tool to call based on the user's request. You must never guess. If multiple tools could satisfy the request equally well, you must refuse to call any tool and instead return a structured ambiguity report. ## AVAILABLE TOOLS [TOOLS] ## USER REQUEST [INPUT] ## CONVERSATION CONTEXT [CONTEXT] ## INSTRUCTIONS 1. Analyze the user request against every available tool's description, parameters, and intended use case. 2. If exactly one tool clearly matches the user's intent, return a tool call with the required arguments. 3. If multiple tools could plausibly satisfy the request and you cannot determine which one the user needs without additional information, do NOT call any tool. Instead, return a refusal with a ranked candidate list. 4. For each candidate tool in the refusal, specify the exact disambiguating question you would need answered to select it confidently. 5. If no tool matches, return a refusal with an empty candidate list and a brief explanation. ## OUTPUT SCHEMA Respond with a JSON object matching this schema: { "decision": "call" | "refuse", "selected_tool": string | null, "arguments": object | null, "refusal": { "reason": string, "candidates": [ { "tool_name": string, "rank": number, "why_candidate": string, "disambiguating_question": string } ] } | null } ## CONSTRAINTS - Never call a tool when confidence is below [CONFIDENCE_THRESHOLD]. - Never fabricate arguments. If a required argument is missing, refuse and request it. - If the user request is ambiguous, prefer refusal over a wrong tool call. - Rank candidates by fit. Ties are acceptable if you cannot break them. - Disambiguating questions must be specific and answerable by the user in one turn. ## EXAMPLES [EXAMPLES]
To adapt this template, replace [TOOLS] with your actual tool definitions in the format your model expects—typically JSON Schema function declarations or a structured description block. The [CONTEXT] placeholder should receive prior conversation turns, user profile data, or session state that might resolve ambiguity without asking the user. Set [CONFIDENCE_THRESHOLD] to a value that matches your risk tolerance; for read-only tools in internal dashboards, 0.7 may be acceptable, while for write operations in customer-facing systems, 0.95 or higher is common. The [EXAMPLES] block is critical for this prompt's reliability. Include at least three few-shot examples: one clear single-tool selection, one multi-tool ambiguity refusal with ranked candidates, and one no-tool-match refusal. Without examples, models tend to default to calling the first plausible tool rather than refusing. After adapting, run the prompt through the evaluation harness described in the Testing and Evaluation section to measure refusal precision and false-positive tool-call rates before deployment.
Prompt Variables
Required inputs for the Multi-Tool Ambiguity Refusal prompt. Each placeholder must be populated before the prompt is sent to the model. Validation notes describe how to verify the input is correctly formed.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[USER_REQUEST] | The raw user input that triggered tool selection ambiguity | Schedule a meeting with the sales team about our Q4 pipeline review | Non-empty string required. Check for prompt injection patterns before passing to model. |
[TOOL_CATALOG] | Complete list of available tools with names, descriptions, and parameter schemas | {"tools": [{"name": "create_calendar_event", "description": "Creates a calendar event with attendees..."}, {"name": "create_crm_task", "description": "Creates a task in CRM for account follow-up..."}]} | Valid JSON array of tool definitions. Each tool must have name, description, and parameters fields. Schema check required. |
[CONVERSATION_HISTORY] | Prior turns in the conversation for context disambiguation | [{"role": "user", "content": "I need to follow up with the Acme account"}, {"role": "assistant", "content": "I can help with that. What kind of follow-up?"}] | Valid JSON array of message objects with role and content. May be empty array if no prior context. Null not allowed. |
[ABSTENTION_POLICY] | Rules defining when the model must refuse to select a tool | Refuse when 2+ tools have overlapping capability descriptions and user intent does not disambiguate. Refuse when confidence below 0.8 for any single tool. | String or structured policy object. Must include explicit refusal criteria. Parse check for policy completeness before prompt assembly. |
[MAX_CANDIDATE_TOOLS] | Upper limit on how many candidate tools to return in the refusal response | 3 | Integer between 1 and 10. Controls refusal verbosity. Default 3 if not specified. |
[OUTPUT_SCHEMA] | Expected structure for the refusal response including ranked candidates and disambiguating questions | {"decision": "refuse", "candidates": [{"tool_name": "string", "confidence": 0.0-1.0, "match_reason": "string"}], "disambiguating_questions": ["string"], "missing_information": ["field_name"]} | Valid JSON Schema object. Must include decision field with refuse enum value, candidates array with tool_name and confidence, and disambiguating_questions array. Schema validation required before prompt assembly. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score required to proceed with a single tool call | 0.85 | Float between 0.0 and 1.0. Values below 0.7 may cause excessive refusal. Values above 0.95 may cause silent wrong-tool selection. Validate range before prompt assembly. |
[DOMAIN_CONSTRAINTS] | Domain-specific rules that override general tool selection logic | In healthcare context: never select a write tool without explicit human approval. In finance: prefer audit-logged tools over non-audited equivalents. | String or structured constraints object. Null allowed if no domain-specific constraints. If present, must not contradict [ABSTENTION_POLICY]. Conflict check required. |
Implementation Harness Notes
How to wire the multi-tool ambiguity refusal prompt into an agent loop with validation, retries, and observability.
The refusal prompt is not a standalone artifact—it is a decision node inside a tool-call pipeline. Wire it after intent detection and before tool execution. When the model returns a refusal, the harness must branch: route to a clarification module, escalate to a human review queue, or log the ambiguity for offline analysis. Do not silently fall through to a default tool. The refusal payload includes a ranked_candidates list and a disambiguating_question; both must be surfaced to the downstream consumer, whether that is a user-facing chat UI or an internal ops dashboard.
Validation is the first integration concern. Before accepting a refusal, confirm that the output matches the expected schema: decision must equal "refuse", confidence_score must be a float between 0.0 and 1.0, and ranked_candidates must contain at least two entries with non-empty tool_name and reason fields. If the model returns "proceed" with a single tool, route to the standard tool execution path and log the decision for eval comparison. If the output fails schema validation, retry once with a repair prompt that includes the validation error. After a second failure, escalate to a human operator with the raw model output and the original user input attached. For high-risk domains, add a mandatory human approval gate before any tool execution that follows a retry-recovered refusal.
Model choice matters. This prompt works best with models that have strong instruction-following and structured output capabilities. For production, prefer gpt-4o or claude-3-5-sonnet with response_format set to json_object and the output schema provided in the system prompt. Avoid smaller models that collapse the ranked_candidates list into a single guess or hallucinate tool names. If you must use a smaller model, add a post-processing check that verifies every tool_name in ranked_candidates exists in the provided [TOOLS] list. Discard any candidate that references a tool not in the schema and re-rank the remainder. Log all discarded candidates for eval analysis—frequent hallucinated tool names signal that the model is too weak for this task.
Observability is non-negotiable. Log every refusal decision with the full input context, the model's output, the validation result, and the downstream action taken (clarification, escalation, or retry). Include a refusal_trace_id that links the refusal to any subsequent tool call or user clarification turn. This trace is essential for computing refusal precision and recall during eval cycles. Without it, you cannot distinguish between a correct refusal, a missed refusal that led to a wrong tool call, and a false refusal that blocked a valid workflow. Wire these logs into your existing monitoring stack and set alerts on sudden changes in refusal rate—a spike often indicates a prompt regression, a tool schema change, or a shift in user input distribution.
Finally, treat the disambiguating_question as a product surface, not just a debug string. In a user-facing system, render it directly to the user along with the top two or three candidate tools as selectable options. This turns an ambiguity refusal into a lightweight clarification UI that keeps the user in control. In an internal agent system, route the question and candidates to a human review queue with a short TTL; if no human responds within the window, fall back to a safe default (such as a read-only tool or a polite user-facing delay message). Never execute a tool selected at random from the ranked list—ambiguity refusal exists precisely because the model cannot safely choose.
Expected Output Contract
Fields, format, and validation rules for the structured refusal payload produced by the Multi-Tool Ambiguity Refusal Prompt Template. Use this contract to build downstream parsers, logging, and human-review queues.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
refusal_reason | string | Must be one of the allowed enum values: 'ambiguous_tool_match', 'overlapping_capabilities', 'insufficient_disambiguation_context'. Reject any other string. | |
candidate_tools | array of objects | Array length must be >= 2. Each object must contain 'tool_name' (string, non-empty), 'match_score' (number, 0.0-1.0), and 'match_rationale' (string, non-empty). Reject if any required field is missing or out of range. | |
candidate_tools[].tool_name | string | Must exactly match a tool name from the provided [TOOL_SCHEMAS] list. Case-sensitive exact match required. Reject unknown tool names. | |
candidate_tools[].match_score | number | Must be a float between 0.0 and 1.0 inclusive. Scores should be normalized so the highest score reflects the best match. Reject values outside range or non-numeric types. | |
candidate_tools[].match_rationale | string | Must be a non-empty string explaining why this tool matched. Must reference specific user intent signals from [USER_INPUT]. Reject empty strings or rationales that only restate the tool description. | |
disambiguation_questions | array of strings | Array length must be >= 1. Each string must be a specific, answerable question that would resolve the ambiguity between the candidate tools. Reject generic questions like 'Can you provide more details?' without specificity. | |
disambiguation_questions[*] | string | Each question must reference at least one distinguishing capability or parameter difference between the candidate tools. Parse check: question must contain a tool-specific term or parameter name from the candidate set. | |
recommended_clarification_prompt | string | Must be a user-facing message that presents the ambiguity clearly and asks the user to choose or clarify. Must not execute any tool call. Must not hallucinate tool capabilities. Reject if the message implies a tool was already called. |
Common Failure Modes
When multiple tools match user intent, ambiguity refusal prompts break in predictable ways. These cards cover the most common failure modes and how to guard against them before they reach production.
Silent Wrong-Tool Selection
What to watch: The model selects a plausible but incorrect tool instead of refusing when multiple tools match. This is the highest-risk failure because it produces side effects or incorrect data with no refusal signal to catch. Guardrail: Add a pre-execution validation step that checks whether the selected tool's description actually matches the user's stated intent, and require explicit refusal when confidence is below threshold.
Over-Refusal on Clear Intent
What to watch: The prompt becomes too conservative and refuses even when one tool is clearly correct, frustrating users and blocking legitimate workflows. This often happens when ambiguity detection thresholds are set too low. Guardrail: Calibrate refusal behavior with a golden dataset of unambiguous inputs, and monitor the refusal rate against expected single-tool-match scenarios. Add a bypass for high-confidence single-tool matches.
Ranked Candidate List Without Disambiguation
What to watch: The model returns a ranked list of candidate tools but fails to specify what information would resolve the ambiguity. The user or upstream system receives a list with no actionable next step. Guardrail: Require the output schema to include a disambiguating_question field that asks for the specific missing information needed to choose between the top candidates.
Hallucinated Tool Capabilities in Refusal
What to watch: The refusal explanation invents tool capabilities, parameter names, or behaviors that don't exist in the actual tool schemas. This misleads the user about what the system can do. Guardrail: Constrain the refusal output to reference only tool names and descriptions that appear verbatim in the provided tool schemas. Validate refusal text against the schema at eval time.
Confidence Score Inflation
What to watch: The model assigns high confidence scores to all candidates even when the input is genuinely ambiguous, making the confidence signal useless for routing or gating decisions. Guardrail: Calibrate confidence scores against a held-out ambiguity dataset and enforce that at least two candidates must have scores within a narrow range for the input to be classified as ambiguous. Monitor score variance in production.
Refusal Drift After Prompt Changes
What to watch: A minor prompt update, tool schema change, or model version bump silently shifts refusal behavior—either refusing more often or stopping refusals entirely. Guardrail: Maintain a regression test suite of known-ambiguous and known-clear inputs, and run it as a gate before every prompt or schema deployment. Alert on any change in refusal decisions.
Evaluation Rubric
Use this rubric to test whether the Multi-Tool Ambiguity Refusal Prompt correctly refuses ambiguous tool calls, ranks candidates, and identifies the specific disambiguating information needed. Run each criterion against a test set containing clear single-tool inputs, genuinely ambiguous inputs, and edge cases where tools share overlapping capabilities.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Correct Refusal Trigger | Prompt refuses when two or more tools match [USER_INTENT] with equivalent confidence and no single tool is clearly superior | Prompt selects a single tool without justification when ambiguity exists; prompt proceeds with a tool call despite equal candidate scores | Run 20 ambiguous inputs where two tools share capability overlap. Measure refusal rate. Pass: refusal rate >= 90% on ambiguous inputs |
Candidate List Completeness | Refusal output includes all tools that could reasonably satisfy [USER_INTENT], with no missing candidates and no hallucinated tools not present in [TOOL_LIST] | Missing a tool that matches the intent; including a tool that does not exist in the provided schema; ranking a clearly irrelevant tool above a relevant one | Parse candidate list from refusal output. Cross-reference against [TOOL_LIST]. Check that every listed candidate exists and that no tool with matching capability is omitted. Pass: 100% precision and >= 95% recall on candidate identification |
Disambiguating Information Specificity | Output identifies the exact missing field, parameter, or constraint that would break the tie between top candidates, using concrete language from [TOOL_LIST] schemas | Vague disambiguation request like 'more details needed'; asking for information already present in [USER_INTENT]; requesting information that doesn't differentiate the candidates | Extract disambiguation request. Verify it references a specific parameter, field, or capability difference between the top two candidates. Check that the requested info is not already in [USER_INTENT]. Pass: >= 90% of refusals contain specific, actionable disambiguation |
Ranking Justification Quality | Each candidate in the ranked list includes a one-sentence justification grounded in the tool's description from [TOOL_LIST] and the user's stated intent | Justifications are generic ('this tool might work'); justifications hallucinate capabilities not in the tool schema; ranking order contradicts the justifications provided | For each candidate, extract justification. Verify it references a capability from the tool's description in [TOOL_LIST]. Check that higher-ranked tools have stronger alignment with [USER_INTENT]. Pass: >= 85% of justifications are schema-grounded and logically consistent with ranking |
No False Refusal on Clear Inputs | Prompt proceeds with a single tool call when [USER_INTENT] clearly maps to one tool with no reasonable alternative | Prompt refuses on unambiguous inputs; prompt returns a candidate list when only one tool matches; prompt requests disambiguation when the intent is clear | Run 20 unambiguous inputs where only one tool in [TOOL_LIST] matches. Measure false refusal rate. Pass: false refusal rate <= 5% |
Output Schema Compliance | Refusal output matches [OUTPUT_SCHEMA] exactly: refusal flag is true, candidate list is an array, each candidate has tool name, confidence score, and justification, and disambiguation field is populated | Missing required fields; confidence scores outside 0-1 range; candidate list is empty when refusal flag is true; disambiguation field is null or empty | Validate refusal output against [OUTPUT_SCHEMA] using JSON Schema validator. Check field types, required fields, and value constraints. Pass: 100% schema compliance on refusal outputs |
Confidence Score Calibration | Confidence scores for top candidates are close to each other (within 0.15) when ambiguity is genuine, and scores reflect the model's actual uncertainty rather than arbitrary values | Top candidates have widely separated scores (difference > 0.3) but prompt still refuses; all candidates assigned identical scores regardless of fit; confidence scores are always 0.5 | For ambiguous test cases, compute absolute difference between top two confidence scores. Pass: mean difference <= 0.15 on ambiguous cases. For clear cases, top candidate score should be >= 0.8. Pass: >= 90% of clear cases meet threshold |
Edge Case: Single Tool with Low Confidence | Prompt refuses when only one tool matches but confidence is below [CONFIDENCE_THRESHOLD], and disambiguation request asks for confirmation or missing arguments rather than tool alternatives | Prompt proceeds with low-confidence single-tool call; prompt invents alternative tools not in [TOOL_LIST]; prompt refuses but provides a candidate list with hallucinated alternatives | Test with inputs that partially match one tool but are missing critical arguments. Verify refusal flag is true, candidate list contains only the matching tool, and disambiguation requests the missing arguments. Pass: >= 90% correct behavior on low-confidence single-tool cases |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base refusal template and a small set of 3-5 overlapping tools. Use a simple string-match check to confirm the model outputs a refusal when multiple tools score equally. Skip structured output enforcement initially; just verify the refusal intent appears.
Add a lightweight post-processing step that checks for the presence of a candidate_tools list and a disambiguation_question field. If missing, log a warning but don't block the pipeline.
Prompt modification
codeYou are a tool selection router. Given the user request [USER_INPUT] and the available tools [TOOL_LIST], if multiple tools match equally, output a JSON refusal with "action": "refuse", "candidate_tools": [...], and "disambiguation_question": "...". Otherwise, select the best tool.
Watch for
- Model selecting a tool anyway when ambiguity is clear
- Missing
disambiguation_questionfield - Overly broad tool descriptions causing false ambiguity

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us