This prompt is a binary decision gate for interactive triage flows. Its job is to decide whether the system should interrupt the user with a clarifying question or proceed to route the request using the information already available. It is designed for system architects and platform engineers who need a deterministic, auditable decision point when a classification confidence score falls into a gray zone—where the cost of a wrong route (e.g., sending a billing dispute to a general FAQ queue) exceeds the cost of a brief user interruption. The prompt does not perform initial classification, generate the clarification question, or execute the final route; it only makes the 'ask vs. act' decision based on pre-computed inputs.
Prompt
Clarify-vs-Route Decision Prompt Template

When to Use This Prompt
Defines the precise conditions for deploying the Clarify-vs-Route decision prompt in a production triage system.
You should use this prompt when you have already classified the user's input and scored its confidence, but that confidence sits between your 'auto-route' and 'auto-reject' thresholds. The prompt requires a structured input containing the top classification label, its confidence score, the cost of a misroute, the cost of asking for clarification, and the downstream error impact. It is not suitable for initial intent detection, for generating the clarification question itself, or for making routing decisions when confidence is very high or very low—those cases should be handled by deterministic threshold rules in your application code. Pair this prompt with a Classification Confidence Scoring Prompt and a Clarification Question Generation Prompt to build a complete triage loop.
Before deploying, define your cost parameters rigorously. The 'misroute cost' should reflect the real operational impact (e.g., time wasted, customer escalation risk, SLA breach), not an abstract number. The 'clarification cost' should account for user friction, session abandonment risk, and latency. If these costs are not calibrated against your production data, the prompt will default to always asking or always routing, defeating its purpose. Implement a human review sampling step for decisions made near the boundary, and log every decision with its inputs for audit and threshold tuning. Do not use this prompt in asynchronous or batch processing pipelines where user interruption is impossible; in those cases, route to a fallback queue instead.
Use Case Fit
Where the Clarify-vs-Route decision prompt works well and where it introduces risk. Use these cards to decide if this template fits your triage architecture before you integrate it.
Good Fit: High-Cost Downstream Errors
Use when: routing an ambiguous input to the wrong queue causes a measurable business cost, such as a misrouted high-priority support ticket or a compliance-sensitive document sent to an unapproved handler. Guardrail: define a cost matrix for misclassification per intent and only invoke the clarify path when the expected cost of silence exceeds the cost of interruption.
Bad Fit: Real-Time, Low-Latency Streams
Avoid when: the system must process inputs in under 200ms with no blocking I/O. A clarification question introduces a full round-trip delay and breaks streaming architectures. Guardrail: for latency-sensitive paths, precompute a static fallback route and log ambiguity for offline review instead of blocking the hot path.
Required Inputs: Ambiguity Cost and Context
What to watch: the prompt needs more than raw user input. It requires a structured ambiguity signal, a cost estimate for wrong routing, and enough conversation context to decide if clarification is safe. Guardrail: wire the prompt to receive output from an upstream ambiguity detector and a cost config object. Do not call it on raw text alone.
Operational Risk: Clarification Loop Exhaustion
What to watch: a user stuck in a clarify loop because each answer produces new ambiguity. Without a maximum turn count, the system burns tokens and user patience. Guardrail: enforce a hard limit of two clarification turns before forcing a route decision or escalating to a human. Log every forced exit for review.
Operational Risk: Over-Clarification on Simple Inputs
Avoid when: the input is only mildly ambiguous and a default route would satisfy the user 95% of the time. Asking a clarifying question for low-stakes ambiguity annoys users and increases handle time. Guardrail: set a minimum ambiguity severity threshold below which the system routes with available information and appends a low-confidence flag.
Eval Requirement: Decision Optimality
What to watch: it is hard to know if the model chose the right action without ground truth. A clarify decision that feels reasonable may still be suboptimal. Guardrail: build a golden dataset of ambiguous inputs with labeled optimal actions and run this prompt against it. Measure precision and recall on the clarify decision separately from the route decision.
Copy-Ready Prompt Template
A reusable prompt template that makes the binary decision to ask a clarifying question or route with available information.
This prompt template implements the core clarify-vs-route decision logic. It forces the model to choose between two actions—asking a targeted clarifying question or proceeding with routing—based on a structured assessment of ambiguity cost, clarification cost, and downstream error impact. The template is designed to be called at the decision boundary after classification confidence has been scored but before the input is dispatched to a handler, queue, or human reviewer.
codeSYSTEM: You are a triage decision engine. Your only job is to decide whether an ambiguous or low-confidence input should be clarified with the user or routed with the available information. You must choose exactly one action and justify it with the cost analysis provided. INPUT: - User request: [USER_INPUT] - Classification result: [CLASSIFICATION_LABEL] - Confidence score: [CONFIDENCE_SCORE] (0.0 to 1.0) - Top alternative classifications: [TOP_K_ALTERNATIVES] - Ambiguity severity: [AMBIGUITY_SEVERITY] (none | low | medium | high | critical) - Ambiguous spans: [AMBIGUOUS_SPANS] COST PARAMETERS: - Cost of wrong routing: [WRONG_ROUTE_COST] (low | medium | high | critical) - Cost of asking user: [CLARIFICATION_COST] (low | medium | high) - User tolerance for clarification: [USER_TOLERANCE] (low | medium | high) - Available clarification budget: [CLARIFICATION_BUDGET] (remaining questions allowed) CONSTRAINTS: - If confidence >= [HIGH_CONFIDENCE_THRESHOLD], route immediately without clarification. - If confidence < [LOW_CONFIDENCE_THRESHOLD] and wrong_route_cost is high or critical, clarify. - If clarification_budget is 0, route with best available classification and flag uncertainty. - If ambiguity_severity is critical and wrong_route_cost is critical, escalate to human; do not clarify or route. - If multiple spans are ambiguous and they point to different intents, clarify before routing. OUTPUT_SCHEMA: { "decision": "clarify" | "route" | "escalate", "confidence": 0.0, "reasoning": "string explaining the cost trade-off that drove the decision", "clarification_question": "string | null (required if decision is clarify, must target the specific ambiguous span)", "route_target": "string | null (required if decision is route, the queue, handler, or model to route to)", "fallback_action": "string | null (required if decision is escalate, the escalation path)", "uncertainty_flags": ["string"] } EXAMPLES: [FEW_SHOT_EXAMPLES] Now decide: clarify, route, or escalate.
Adapt this template by replacing each square-bracket placeholder with runtime values from your classification pipeline. The cost parameters—wrong_route_cost, clarification_cost, and user_tolerance—should be configured per use case and ideally sourced from a policy configuration rather than hardcoded. The few-shot examples should cover at least three scenarios: a clear route decision, a clear clarify decision, and a boundary case where escalation is correct. Test the template against a golden set of decisions before deployment, and log every decision with its reasoning for audit and threshold calibration.
Prompt Variables
Inputs the Clarify-vs-Route Decision Prompt needs to work reliably. Validate each before calling the model to prevent silent misclassification and broken triage flows.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[USER_INPUT] | The raw user message or request that needs a routing decision | I can't access my account and I need this fixed before my meeting in 10 minutes | Required. Must be non-empty string. Check for null, whitespace-only, or prompt injection patterns before passing to model. |
[CLASSIFICATION_RESULT] | The top predicted intent or category from the upstream classifier | account_access_issue | Required. Must be non-empty string. Validate against allowed intent taxonomy. If confidence is below threshold, this field may be null. |
[CONFIDENCE_SCORE] | The calibrated confidence score from the upstream classifier, normalized to 0.0-1.0 | 0.42 | Required. Must be float between 0.0 and 1.0 inclusive. Reject if NaN, negative, or >1.0. Null only allowed if classification failed entirely. |
[AMBIGUITY_FLAGS] | Structured object indicating detected ambiguity types and their severity | {"underspecified": true, "conflicting_signals": false, "severity": "medium"} | Required. Must be valid JSON object. Validate schema: boolean fields for each ambiguity type, severity enum of low, medium, high, critical. Null allowed if no ambiguity detected. |
[CLARIFICATION_COST] | Estimated cost of asking a clarifying question, measured in user friction, latency, or abandonment risk | high | Required. Must be one of low, medium, high, critical. Represents operational cost of clarification loop. Default to medium if unknown. |
[DOWNSTREAM_ERROR_IMPACT] | Severity of consequences if this input is routed incorrectly | critical | Required. Must be one of low, medium, high, critical. Critical means regulatory, safety, or irreversible action risk. Validate against risk taxonomy before model call. |
[AVAILABLE_CONTEXT] | Additional context available from conversation history, user profile, or session state that could resolve ambiguity without asking | {"recent_failed_login": true, "account_tier": "enterprise", "sla_minutes": 15} | Optional. Must be valid JSON object if present. Validate that context fields match expected schema. Null allowed when no additional context exists. |
[ROUTING_OPTIONS] | List of available downstream queues, handlers, or escalation paths with their capabilities and constraints | [{"queue": "account_recovery", "sla": "15min", "auto_resolve": true}, {"queue": "general_support", "sla": "4hr", "auto_resolve": false}] | Required. Must be non-empty array of valid routing option objects. Each option must have queue name and SLA. Validate against active queue registry before model call. |
Implementation Harness Notes
How to wire the Clarify-vs-Route decision prompt into a production triage system with validation, retries, and audit logging.
The Clarify-vs-Route prompt is a binary decision point in a larger triage pipeline. It should be called only after upstream classification has returned a label and a confidence score, and only when that confidence falls below your system's auto-route threshold. The prompt's job is narrow: given the original input, the top classification candidate, its confidence, and the cost context, decide whether to ask a clarifying question or route with the available information. Do not use this prompt as a standalone classifier or as a replacement for upstream intent detection. It is a guardrail, not a router.
Wire the prompt into your application as a synchronous decision step with a strict timeout (500ms–2s depending on model and latency budget). The input payload must include: [USER_INPUT], [TOP_INTENT], [CONFIDENCE_SCORE], [ALTERNATIVE_INTENTS] (top 3 with scores), [CLARIFICATION_COST] (a numeric estimate of user friction, e.g., 1–10), [MISROUTE_COST] (a numeric estimate of downstream error impact, e.g., 1–10), and [CONTEXT] (any relevant conversation history or user profile signals). The output must conform to a strict JSON schema: { "decision": "clarify" | "route", "reasoning": "string", "clarification_question": "string | null", "routing_target": "string | null" }. Validate the output before acting on it. If decision is clarify but clarification_question is null or empty, treat it as a routing decision with a warning log. If decision is route but routing_target is null, fall back to the top intent from the upstream classifier. Use a JSON schema validator in your application layer—do not rely on the model to always produce valid JSON, even with strong format instructions.
Implement a retry policy with a maximum of 2 retries on validation failure. On the first failure, append the validation error message to the prompt and retry. On the second failure, log the full input and partial output, then default to a safe fallback: if [MISROUTE_COST] is greater than [CLARIFICATION_COST], clarify; otherwise, route to the top intent. This fallback logic should be hardcoded in your application, not left to the model. Log every decision with the full input payload, output payload, model used, latency, and retry count. These logs are essential for evaluating decision optimality over time and for tuning the [CLARIFICATION_COST] and [MISROUTE_COST] parameters against real user outcomes.
For model selection, use a fast, instruction-following model (GPT-4o-mini, Claude 3.5 Haiku, or equivalent) rather than a large reasoning model. This prompt requires structured decision-making, not deep reasoning, and latency matters in interactive triage flows. If you are operating in a regulated domain (healthcare, finance, legal), add a human review step when both [CLARIFICATION_COST] and [MISROUTE_COST] are above a defined threshold (e.g., both ≥7). The review step should present the original input, the model's decision, and the reasoning to a human operator before the clarification question is shown to the user or the routing decision is executed. Do not use this prompt to make decisions about safety-critical content without human-in-the-loop approval.
To evaluate the prompt's performance, build a test harness with 50–100 labeled examples covering clear-routing cases, clear-clarification cases, and ambiguous boundary cases. For each example, define the expected decision and acceptable clarification questions. Run the prompt against this test set on every change and measure decision accuracy, clarification question relevance (using a separate LLM judge), and schema compliance rate. Track these metrics over time and set alert thresholds: if decision accuracy drops below 90% or schema compliance drops below 99%, block the deployment and investigate. The most common failure mode is the model choosing to clarify when routing would have been sufficient, which increases user friction without improving outcomes. Monitor the ratio of clarify-to-route decisions in production and investigate spikes.
Expected Output Contract
The model must return a single JSON object with the fields below. Use this contract to validate the response before the routing decision takes effect.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
decision | enum: clarify | route | Must be exactly one of the two allowed values. Reject any other string. | |
confidence | number (0.0–1.0) | Must be a float between 0 and 1 inclusive. Reject if missing or out of range. | |
reasoning | string | Must be non-empty and reference at least one factor from [AMBIGUITY_COST], [CLARIFICATION_COST], or [ERROR_IMPACT]. Reject if empty or purely generic. | |
clarification_question | string | null | true if decision=clarify, null if decision=route | If decision=clarify, must be a single non-empty question targeting the specific ambiguity. If decision=route, must be null. |
routing_target | string | null | true if decision=route, null if decision=clarify | If decision=route, must match a valid target from [ROUTING_TARGETS]. If decision=clarify, must be null. |
ambiguity_factors | array of strings | Must contain at least one entry. Each entry must be a short label describing a specific ambiguity source. Reject empty array. | |
estimated_clarification_turns | integer >= 0 | Must be a non-negative integer. If decision=route, value must be 0. If decision=clarify, value must be >= 1. | |
fallback_action | string | Must describe the concrete next step if the primary decision fails, e.g., escalate to human, route to general queue, or reject. Reject if missing. |
Common Failure Modes
The Clarify-vs-Route decision prompt fails in predictable ways. Each failure mode below represents a pattern observed in production triage systems, along with the specific guardrail that prevents it.
Over-Clarification on Trivial Ambiguity
What to watch: The prompt asks a clarifying question for every minor ambiguity, creating unnecessary friction and slowing down the user. This happens when the clarification cost is underestimated or the ambiguity threshold is set too low. Guardrail: Add a minimum ambiguity severity threshold in the prompt. Require the model to quantify the downstream error impact before deciding to clarify. Test with a set of inputs that have acceptable minor ambiguities and verify the prompt routes them without clarification.
Silent Misroute on High-Stakes Ambiguity
What to watch: The prompt routes an ambiguous input to a downstream handler without clarification, but the ambiguity carries high error impact. The model underestimates the cost of being wrong. Guardrail: Include explicit risk weighting in the decision criteria. Require the prompt to identify the worst-case outcome of a misroute before deciding. Implement a post-hoc audit check that flags any routing decision where ambiguity was present but clarification was skipped for high-severity domains.
Clarification Question Misses the Blocking Uncertainty
What to watch: The prompt correctly decides to clarify but generates a question that does not resolve the specific ambiguity blocking classification. The user answers, and the system remains stuck. Guardrail: Require the clarification question to explicitly reference the ambiguous span or missing information. Add a validator that checks whether answering the generated question would actually change the classification confidence. Test with simulated user responses to verify resolution.
Cost-Benefit Miscalibration Across Domains
What to watch: The prompt applies the same clarify-vs-route logic to all domains, but the cost of a wrong route varies dramatically. Routing a misclassified billing issue is worse than routing a misclassified FAQ lookup. Guardrail: Parameterize the decision prompt with domain-specific error cost weights. Pass a [DOMAIN_IMPACT_MAP] that quantifies the cost of misclassification per downstream handler. Test with cross-domain inputs to verify the prompt adjusts its threshold accordingly.
Clarification Loop Without Escape Hatch
What to watch: The prompt enters a clarification loop where each user response triggers another clarifying question, never reaching a routing decision. This exhausts user patience and looks like a broken system. Guardrail: Include a maximum clarification round limit in the prompt context. After [MAX_CLARIFICATION_ROUNDS], force a routing decision with a confidence note. Add an eval that simulates multi-turn clarification scenarios and checks for loop termination.
Ignoring Available Context That Could Resolve Ambiguity
What to watch: The prompt asks for clarification when the answer already exists in session history, user profile, or account data. The model fails to weigh available context before deciding to clarify. Guardrail: Structure the prompt to require an explicit check of provided context before generating a clarification question. Include a [RESOLVABLE_FROM_CONTEXT] flag in the output schema. Test with inputs that are ambiguous in isolation but clear given the surrounding context payload.
Evaluation Rubric
How to test output quality before shipping. Run these checks against a golden dataset of 50+ labeled cases.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Decision Optimality | Decision matches ground-truth label in ≥90% of cases | Clarify chosen when route was correct, or vice versa | Compare [DECISION] field to golden label; compute precision/recall per class |
Clarification Question Relevance | Generated question directly addresses the specific ambiguity blocking routing | Question is generic, asks for already-known info, or misses the ambiguity | LLM-as-judge with 3-point rubric; human audit on 20 random samples |
Route Target Validity | [ROUTE_TARGET] is a valid, active queue or workflow ID from the system registry | Route target is null, hallucinated, or references a deprecated queue | Validate [ROUTE_TARGET] against live system registry; flag any mismatch |
Confidence-Action Alignment | High confidence (>0.85) always routes; low confidence (<0.6) always clarifies or escalates | High-confidence clarify or low-confidence route without explicit override reason | Assert [CONFIDENCE_SCORE] threshold rules; count violations per confidence band |
Cost-Benefit Reasoning Quality | [RATIONALE] cites specific ambiguity cost, clarification cost, or downstream error impact | Rationale is missing, circular, or uses generic phrases like 'best option' | Check [RATIONALE] for presence of cost/impact terms; flag empty or template strings |
Escalation Appropriateness | Escalation triggered only when [ESCALATION_FLAG] is true AND ambiguity severity is high | Escalation on low-severity ambiguity or no escalation on high-severity cases | Cross-tabulate [ESCALATION_FLAG] with [AMBIGUITY_SEVERITY]; flag mismatches |
Output Schema Compliance | Response parses as valid JSON matching the output contract exactly | Missing required fields, extra fields, or type mismatches in any field | Schema validation against output contract; reject any non-conforming response |
Latency Budget Adherence | Decision returned within 500ms for 95th percentile of requests | P95 latency exceeds 500ms or timeout errors occur | Load test with 50 concurrent requests; measure P50, P95, P99 latency |
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 template and remove the structured output schema. Use a simple text completion with a single decision line: DECISION: clarify | route. Replace [AMBIGUITY_COST] and [DOWNSTREAM_ERROR_IMPACT] with hardcoded example values to test behavior before wiring real cost functions.
Watch for
- The model defaulting to
clarifywhen routing would be faster - Missing the distinction between resolvable and unresolvable ambiguity
- No logging of decision rationale for later tuning

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