This prompt is designed for the agent frontend pre-processing layer—the moment after a user submits an instruction but before any planning, tool selection, or execution begins. Its job is to detect ambiguity that would cause downstream errors and generate a minimal, ranked set of clarification questions. The ideal user is an AI engineer or product developer building an agent that interacts with end-users through a chat or command interface. You need this prompt when the cost of a wrong assumption is high: destructive actions, paid API calls, irreversible data mutations, or multi-step workflows where an early misunderstanding corrupts every subsequent step.
Prompt
Clarification Question Generation Prompt Template

When to Use This Prompt
Define the job, reader, and constraints for generating clarification questions from ambiguous user instructions.
Use this prompt when the user's objective is underspecified in ways that matter for execution. Concrete triggers include: missing parameters for a function call, conflicting constraints in the same request, vague success criteria ('make it better'), ambiguous resource targets ('the production database' when multiple exist), or instructions that assume context the system does not have. Do not use this prompt for simple, fully-specified commands ('add 2+2'), for workflows where the system should make a reasonable default choice and proceed, or when the user has explicitly opted into autonomous mode with pre-authorized ambiguity resolution. Over-clarification creates friction; this prompt is for high-stakes ambiguity, not conversational completeness.
Before wiring this into your application, define your ambiguity budget: how many questions you are willing to ask per turn, and which ambiguity categories (missing parameters, conflicting constraints, vague success criteria, unverified resource targets) are in scope. The prompt produces ranked questions, but your application should enforce a hard cap on questions displayed to the user—typically 2–4. If the prompt returns more, your harness should select the top-ranked subset and log the rest for product improvement. Pair this prompt with the Assumption Inventory Generation and Pre-Flight Assumption Check playbooks to create a complete pre-execution gate: extract assumptions, flag low-confidence ones, and only then generate clarification questions for the critical unknowns.
Use Case Fit
When to deploy this clarification prompt and when to choose a different approach. The prompt excels at resolving critical ambiguities before planning begins, but it is not a substitute for structured input forms or real-time validation.
Good Fit: Ambiguous User Instructions
Use when: The user provides a goal with multiple valid interpretations, and the agent must commit to a plan. The prompt generates ranked questions that target the highest-impact ambiguities first. Guardrail: Set a maximum question limit (e.g., 3-5) to avoid overwhelming the user with low-impact clarifications.
Bad Fit: Well-Structured API Inputs
Avoid when: The system already receives structured input with required fields, enums, and validation. Adding clarification questions here creates unnecessary friction. Guardrail: Route structured inputs directly to plan generation and reserve this prompt for free-text or conversational entry points.
Required Inputs
What you need: A user goal statement, available tool definitions, and any existing context or constraints. Without tool definitions, the prompt cannot assess which ambiguities impact executability. Guardrail: Validate that tool schemas are current and complete before invoking the prompt; stale tool lists produce irrelevant questions.
Operational Risk: Question Fatigue
What to watch: Users abandon workflows when faced with too many clarification questions, especially if some appear obvious or redundant. Guardrail: Implement a question budget per session and track abandonment rates. If abandonment exceeds a threshold, reduce the default question count or add a 'skip all' option.
Operational Risk: Missed Critical Ambiguities
What to watch: The prompt may fail to identify an ambiguity that later causes plan failure, especially when the ambiguity spans multiple steps or involves tool-specific constraints. Guardrail: Run post-execution eval comparing plan outcomes against clarified intent. Feed missed ambiguities back as few-shot examples in future prompt versions.
When to Escalate Instead
What to watch: Some ambiguities cannot be resolved by asking the user because the user lacks the technical knowledge to answer. Guardrail: Classify questions by required expertise. If a question requires system-internal knowledge (e.g., API rate limits, schema details), resolve it programmatically rather than asking the user.
Copy-Ready Prompt Template
A reusable prompt template for generating targeted clarification questions that resolve critical ambiguities in user instructions before agent planning begins.
This template generates a minimal set of clarification questions ranked by their impact on plan correctness. It is designed for agent frontends that receive ambiguous user instructions and must resolve uncertainty before committing to irreversible actions or expensive multi-step execution. The prompt forces the model to identify what is ambiguous, explain why it matters for downstream planning, and produce questions that are specific, answerable, and non-redundant. Use this template when user input is underspecified and the cost of wrong execution exceeds the cost of asking.
textYou are a clarification specialist for an AI agent system. Your job is to analyze an ambiguous user instruction and generate the smallest set of targeted questions needed to resolve critical uncertainties before planning begins. ## INPUT User Instruction: [USER_INSTRUCTION] Available Context: [CONTEXT] Available Tools and Capabilities: [TOOLS] Operational Constraints: [CONSTRAINTS] Risk Level: [RISK_LEVEL] ## INSTRUCTIONS 1. Identify every ambiguity in the user instruction that could cause the agent to produce a materially wrong plan. Consider: - Missing parameters required by available tools - Underspecified scope, boundaries, or success criteria - Implicit assumptions about data, permissions, or environment state - Ambiguous terms that have multiple valid interpretations in this domain - Missing constraints on cost, time, or resource usage 2. For each ambiguity, explain why it matters: what plan step would be affected and how a wrong assumption would manifest as an error. 3. Formulate one clear, specific question per ambiguity. Each question must: - Be answerable by the user without requiring technical knowledge of the agent's internals - Offer concrete options when the choice space is bounded - Avoid leading the user toward a particular answer - Not duplicate information already present in the context 4. Rank questions by impact: how much plan correctness depends on resolving this ambiguity. Use three tiers: - BLOCKING: Cannot produce any valid plan without this answer - HIGH_IMPACT: Plan would be structurally different depending on the answer - MEDIUM_IMPACT: Plan structure is stable but execution details would change 5. Eliminate any question that can be answered by inspecting the available context or tool outputs. 6. Limit output to at most [MAX_QUESTIONS] questions. If more ambiguities exist, include only the highest-impact ones and note how many were deferred. ## OUTPUT SCHEMA Return a JSON object with this exact structure: { "total_ambiguities_found": <integer>, "questions_generated": <integer>, "questions_deferred": <integer>, "questions": [ { "id": "Q1", "question": "<clear question text>", "options": ["<option1>", "<option2>"] or null, "ambiguity_description": "<what is unclear and why it matters>", "affected_plan_area": "<which part of the plan depends on this answer>", "impact_tier": "BLOCKING|HIGH_IMPACT|MEDIUM_IMPACT", "default_assumption_if_skipped": "<what the agent would assume if user doesn't answer>" } ] } ## CONSTRAINTS - Do not ask questions that the user cannot reasonably answer. - Do not ask questions where the default assumption is safe and the impact is low. - Do not repeat questions that are already answered in the context. - If the instruction is already sufficiently specific, return an empty questions array and explain why. - For [RISK_LEVEL] of "high" or "critical", prefer over-asking to under-asking for BLOCKING and HIGH_IMPACT ambiguities.
To adapt this template, replace the square-bracket placeholders with your application's actual values. [USER_INSTRUCTION] should contain the raw user input. [CONTEXT] should include any session history, user profile data, or environmental state already known. [TOOLS] should list available tool names and their required parameters so the model can detect missing inputs. [CONSTRAINTS] should specify operational boundaries like time limits, cost budgets, or permission scopes. [RISK_LEVEL] accepts values like "low", "medium", "high", or "critical" and controls the model's bias toward asking versus proceeding with assumptions. [MAX_QUESTIONS] should be an integer (typically 3-5) to prevent overwhelming the user. The output schema is strict JSON suitable for direct consumption by an agent orchestrator. If your application cannot tolerate JSON parse failures, add a retry layer with schema validation before surfacing questions to the user.
Prompt Variables
Required and optional inputs for the Clarification Question Generation prompt. Validate each placeholder before assembly to prevent the agent from asking about information already present or missing critical ambiguity signals.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[USER_INSTRUCTION] | The original ambiguous or underspecified user request that triggered the clarification workflow. | Move the data from the old system to the new one by Friday. | Must be non-empty string. Check for minimum length (>=10 chars). Reject if identical to a previously clarified instruction in the same session. |
[PLAN_CONTEXT] | The current plan or task decomposition that the agent intends to execute, including steps, dependencies, and tool selections. | Step 1: Extract schema from source DB. Step 2: Map columns to target schema. Step 3: Execute migration with dry-run flag. | Must be valid JSON or structured text. Validate that plan steps reference concrete tools or actions. Null allowed if no plan exists yet. |
[AVAILABLE_TOOLS] | List of tools, APIs, and capabilities the agent can use, with their constraints and required parameters. | db_query(source, query), schema_compare(source_schema, target_schema), data_migrate(config) | Must be a non-empty array of tool definitions. Each tool must include name and required_params. Validate against actual tool registry before prompt assembly. |
[ASSUMPTION_INVENTORY] | Structured list of assumptions the agent has made about the user's intent, environment, or constraints, each with an ID and confidence score. | ASM-01: Target system is PostgreSQL (confidence 0.6). ASM-02: Friday means EOD UTC (confidence 0.4). | Must be valid JSON array. Each assumption requires id, statement, and confidence (0.0-1.0). Null allowed if no assumptions have been extracted yet. |
[CONFIDENCE_THRESHOLD] | The minimum confidence score below which a plan step or assumption triggers a clarification question. | 0.7 | Must be float between 0.0 and 1.0. Default 0.7 if not provided. Validate range before use. Thresholds below 0.5 produce excessive questions; above 0.95 may suppress necessary ones. |
[MAX_QUESTIONS] | Hard limit on the number of clarification questions the prompt may generate in a single response. | 3 | Must be integer between 1 and 5. Default 3. Validate upper bound to prevent overwhelming the user. Reject values above 5. |
[PREVIOUS_CLARIFICATIONS] | Questions already asked and answers received in this session, to prevent repeated or redundant questions. | Q: Which target database? A: PostgreSQL 15. Q: Dry-run first? A: Yes. | Must be array of {question, answer, timestamp} objects. Null allowed on first turn. Deduplicate against new questions before presenting to user. |
[IRREVERSIBLE_ACTIONS] | List of plan steps that cannot be rolled back, used to prioritize clarification for high-risk ambiguity. | Step 3: Execute migration (irreversible without backup). Step 5: Decommission source system. | Must be array of step identifiers matching [PLAN_CONTEXT] steps. Validate that each referenced step exists in the plan. Null allowed if no irreversible steps identified. |
Implementation Harness Notes
How to wire the clarification question prompt into an agent frontend with validation, retries, and human-in-the-loop controls.
The clarification question prompt operates as a synchronous gate in the agent planning pipeline. When a user submits an ambiguous instruction, the frontend routes the raw input through this prompt before any planning or tool selection occurs. The prompt returns a structured set of ranked questions, and the application must decide whether to present all questions, only high-impact questions, or none if the ambiguity is below a configured threshold. This decision logic lives in the application harness, not in the prompt itself.
Wire the prompt into a pre-processing step that fires after user input is received but before the planning module is invoked. The application should parse the model's JSON output and validate it against a strict schema: each question object requires an id, question_text, impact_on_plan, assumption_being_clarified, and rank field. Reject outputs that contain questions with duplicate IDs, missing impact justifications, or ranks that don't correspond to the impact ordering. If validation fails, retry once with the validation error appended to the prompt as feedback. After two consecutive failures, fall back to a safe default: present the user with a generic clarification prompt and log the failure for prompt debugging. Do not proceed to planning with unvalidated clarification output.
For production deployments, implement a question cap (default 3-5 questions) to prevent overwhelming the user. The harness should sort by rank and truncate to the cap before rendering. Log the full question set for observability even when truncated. If the top-ranked question has an impact score below a configurable threshold, skip clarification entirely and pass the original instruction to the planner with a low-confidence flag. For high-risk domains such as healthcare or finance, require human review of the generated questions before they are shown to the end user. Track metrics on question acceptance rate, ambiguity resolution rate (whether the user's answer actually changed the plan), and false-positive clarification requests where the original instruction was already sufficient.
Expected Output Contract
Defines the structured JSON output for a clarification question generation prompt. Use this contract to validate model responses before presenting questions to the user.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
questions | Array of objects | Array length must be between 1 and 5. Empty array fails validation. | |
questions[].question_id | String, format: Q-[0-9]+ | Must match regex ^Q-\d+$. Must be unique within the array. | |
questions[].question_text | String, max 150 characters | Must end with a question mark. Must not contain answer assumptions or leading suggestions. | |
questions[].target_ambiguity | String | Must reference a specific field or concept from [AMBIGUITY_INVENTORY]. Value must exist in the inventory. | |
questions[].impact_on_plan | String, enum | Must be one of: 'blocking', 'high', 'medium'. 'blocking' means the plan cannot proceed without an answer. | |
questions[].suggested_options | Array of strings, max 4 items | If present, each option must be mutually exclusive. Null or empty array is allowed. | |
questions[].rationale | String, max 200 characters | Must explain why this question is necessary without repeating the question text verbatim. | |
coverage_score | Number, 0.0 to 1.0 | Must be a float. Represents the proportion of critical ambiguities addressed. Score below 0.5 triggers a retry. |
Common Failure Modes
Clarification question prompts fail in predictable ways. Here are the most common failure modes and how to prevent them before they reach users.
Over-Questioning the User
What to watch: The prompt generates too many clarification questions, including ones the user already answered implicitly or that have negligible impact on plan correctness. This overwhelms users and erodes trust in the agent. Guardrail: Add a max_questions constraint and require each question to pass a necessity check—does answering this change which plan step executes next? Rank by impact and drop low-impact questions.
Missing Critical Ambiguities
What to watch: The prompt fails to identify a high-impact ambiguity because it assumes a default interpretation. The agent proceeds confidently with the wrong plan, and the error compounds across steps. Guardrail: Require the prompt to enumerate all possible interpretations of each ambiguous term before ranking. Add a risk_of_silence check that flags when no question is asked but confidence is below threshold.
Leading or Biased Question Framing
What to watch: Questions are phrased to nudge the user toward a specific answer, often the model's preferred interpretation. This masks the ambiguity rather than resolving it. Guardrail: Require neutral phrasing and include explicit alternatives in each question. Add an eval that checks for presupposition-loaded wording and flags questions that don't present balanced options.
Question-Answer Mismatch Drift
What to watch: The user answers a clarification question, but the agent misinterprets the answer or applies it to the wrong plan variable. The ambiguity appears resolved but the plan is still wrong. Guardrail: Require each question to include an applies_to field mapping the answer to a specific plan parameter. Validate that the answer updates exactly that parameter before proceeding.
Context Window Pollution from Redundant Questions
What to watch: Clarification Q&A pairs accumulate in the context window, crowding out evidence and instructions. The agent asks questions it already asked or that were answered in earlier turns. Guardrail: Maintain a running resolved_ambiguities list and require the prompt to check it before generating new questions. Deduplicate against prior Q&A pairs and drop already-resolved items.
Asking Unanswerable or Speculative Questions
What to watch: The prompt generates questions the user cannot reasonably answer, such as future-state predictions, precise numerical estimates without reference data, or technical details outside the user's role. The user either guesses or abandons the workflow. Guardrail: Add an answerability filter that checks whether the target user role has access to the information requested. If not, reframe as a constraint or escalate to a different information source.
Evaluation Rubric
Use this rubric to evaluate the quality of clarification questions generated by the prompt template. Each criterion should be tested against a set of ambiguous user instructions before deploying the prompt to production.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Question Necessity | Every generated question addresses a genuine ambiguity that materially impacts plan correctness or execution path | Questions that ask for information already present in the user input, or questions about details that would not change any downstream decision | Human review of 20 generated question sets against source instructions; flag any question where the answer would not alter the plan |
Ambiguity Resolution Coverage | The question set collectively resolves all critical ambiguities identified in the input; no high-impact unknown remains unasked | A critical ambiguity is present in the input but no corresponding question appears in the output; the agent would need to guess a plan-affecting variable | Compare generated questions against a pre-labeled ambiguity inventory for each test case; measure recall of must-resolve ambiguities |
Question Ranking Quality | Questions are ordered by impact on plan correctness; the highest-ranked question addresses the ambiguity that would cause the largest plan deviation if guessed wrong | A low-impact clarification appears before a high-impact one; the user answers three questions and the agent still lacks information needed to choose between fundamentally different execution paths | Pairwise comparison by two reviewers: for each test case, check whether swapping the top two questions would improve plan certainty faster |
Question Count Discipline | The number of questions respects the configured [MAX_QUESTIONS] limit and does not exceed what a user can reasonably answer in one turn | Output contains more questions than [MAX_QUESTIONS], or the question count is within limit but includes low-impact questions that could be deferred to a follow-up turn | Automated count check against [MAX_QUESTIONS]; human review for deferrable questions when count equals the limit |
Question Clarity and Specificity | Each question is self-contained, specific, and answerable without the user needing to re-read their original instruction | Vague questions like 'Can you clarify?' or 'What do you mean?' without specific options or context; questions that require the user to guess what the agent is confused about | Read each question in isolation without the original user input; score on a 1-5 clarity scale; pass threshold is 4+ average across the question set |
No Leading or Presumptive Questions | Questions are neutral and do not presume an answer, embed a preferred outcome, or steer the user toward a specific plan | Questions phrased as 'Would you like me to use the standard approach?' or 'I assume you want X, correct?' that encode a default the user may not have intended | Review each question for embedded assumptions or defaults; flag any question that could be answered 'yes' without the user understanding the implied choice |
Output Schema Compliance | The generated output strictly matches the [OUTPUT_SCHEMA] with all required fields present and correctly typed | Missing required fields, extra untyped fields, or malformed JSON that fails schema validation | Automated JSON Schema validation against [OUTPUT_SCHEMA]; parse check with retry on first failure; pass if valid on first or second attempt |
Confidence Annotation Accuracy | When [INCLUDE_CONFIDENCE] is true, each question includes a confidence score that correlates with actual ambiguity severity; low-confidence flags appear on genuinely uncertain interpretations | Confidence scores are uniformly high even when the input is deeply ambiguous; or low-confidence flags appear on straightforward interpretations that any reasonable reader would resolve the same way | Correlate confidence scores against inter-annotator disagreement on ambiguity labels for 30 test cases; Spearman rank correlation should exceed 0.6 |
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 a small set of ambiguity categories. Use a single model call without schema enforcement. Focus on question quality over format strictness.
codeYou are helping clarify an ambiguous user request. The user said: [USER_INSTRUCTION] Identify the top 3 ambiguities that would most affect plan correctness. For each, generate one targeted clarification question. Rank by impact.
Watch for
- Questions that are interesting but not blocking
- Over-asking when the user intent is actually clear
- No ranking, making it hard to limit question count

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