Inferensys

Prompt

Ambiguous Goal Refinement Prompt Template

A practical prompt playbook for refining vague user requests into well-scoped goals with explicit constraints, success criteria, and boundaries before agent planning begins.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the precise conditions for deploying the Ambiguous Goal Refinement Prompt in an agent frontend or planning pre-processor, and when to avoid it.

This prompt is designed for the critical translation layer between a raw, often vague user request and a downstream agent planner or orchestrator. Its primary job is to take an input like 'optimize our database performance' or 'help us reduce churn' and force the model to make implicit assumptions explicit, define a concrete scope, and produce verifiable success criteria. It is a machine-to-machine refinement step, not a conversational clarification tool for end users. The ideal deployment point is within an agent frontend or a planning pre-processor module that receives unstructured goals and must produce a structured GoalSpecification object that a planner, task decomposition module, or orchestrator can consume without further human interpretation.

Use this prompt when the initial user request contains high-level objectives, ambiguous verbs (e.g., 'improve,' 'analyze,' 'fix'), or lacks measurable boundaries. It is particularly valuable when the cost of misaligned execution is high—such as in autonomous coding agents, multi-step data pipelines, or customer-facing automation where a wrong assumption can cascade into expensive tool calls or incorrect outputs. The prompt template includes placeholders for [USER_GOAL], [AVAILABLE_TOOLS], and [CONSTRAINT_HINTS], allowing you to inject known operational boundaries before refinement begins. The output should be validated against a schema that requires explicit in_scope, out_of_scope, assumptions_made, and success_criteria fields, ensuring the refinement is auditable before execution starts.

Do not use this prompt when the user has already provided a detailed specification with measurable acceptance criteria, or when the task is trivial enough that the refinement overhead exceeds the execution cost. For example, a direct instruction like 'list all users created in the last 24 hours' does not require goal refinement; it requires a direct tool call. Similarly, avoid this prompt in latency-sensitive, single-turn interactions where the user expects an immediate answer rather than a planning artifact. In high-risk domains, always route the refined goal specification through a human review step before execution begins, and log the refinement output alongside the original user input for auditability and debugging.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Ambiguous Goal Refinement Prompt works, where it fails, and what you must provide before using it in an agent frontend or planning pre-processor.

01

Good Fit: Vague User Requests

Use when: users submit broad goals like 'improve our onboarding' or 'fix the slow dashboard.' The prompt adds structure, scope, and measurable criteria before planning begins. Guardrail: always route the refined goal back to the user for confirmation before execution.

02

Bad Fit: Already-Specified Goals

Avoid when: the user already provides explicit constraints, success criteria, and scope boundaries. Re-refinement introduces unnecessary latency and can distort clear intent. Guardrail: add a pre-check step that measures input specificity and skips refinement if the goal is already well-formed.

03

Required Input: User Goal Statement

What to watch: the prompt cannot refine an empty or missing goal. Vague inputs like 'help me' or 'fix things' produce hallucinated scope. Guardrail: validate that the input contains a noun and a desired outcome before invoking refinement. Return a clarification request if the goal is too sparse.

04

Required Input: Domain Context

What to watch: without domain context, the model invents plausible but wrong constraints. A 'compliance review' goal means different things in healthcare versus fintech. Guardrail: inject relevant domain taxonomy, regulatory category, or system context into the prompt's [CONTEXT] placeholder before refinement.

05

Operational Risk: Over-Refinement

What to watch: the model may add unnecessary constraints that narrow the solution space prematurely. This causes downstream agents to miss valid approaches. Guardrail: include an instruction to mark inferred constraints as 'assumed' and require explicit user confirmation before treating them as binding.

06

Operational Risk: Ambiguity Displacement

What to watch: the prompt may replace vague language with confident-sounding but still ambiguous terms. 'Fast' becomes 'low latency' without defining milliseconds versus seconds. Guardrail: require the output to include operationalized metrics with thresholds. Run an eval check that flags any success criterion lacking a measurable unit.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A system-level prompt template for refining ambiguous user goals into well-scoped, executable objectives with explicit constraints and success criteria.

This template is designed to be placed in the system prompt of an agent pre-processor or planning module. It receives a vague user request and outputs a structured clarification. The prompt forces the model to identify missing dimensions—scope, constraints, success criteria, and authority boundaries—rather than silently guessing. Use this when the user's initial input is a single sentence or a broad desire, and the downstream planning system requires a concrete, machine-readable goal specification to avoid loops, over-execution, or misaligned plans. Do not use this template for simple, well-constrained commands where clarification would add unnecessary latency.

text
You are a goal refinement engine. Your job is to convert an ambiguous user request into a clarified, actionable goal specification. You must identify what is underspecified and make reasonable, safe assumptions explicit. Do not execute the goal. Do not plan the steps. Only produce the refined specification.

## INPUT
User Request: [USER_REQUEST]
Available Context: [CONTEXT]

## OUTPUT SCHEMA
Return a JSON object with the following fields:
- clarified_goal: A single, concise statement of what should be accomplished. Resolve vague pronouns and implicit references.
- scope: An object with `in_scope` (array of strings) and `out_of_scope` (array of strings). Explicitly list what is included and excluded.
- constraints: An object with sub-fields for `security`, `data_handling`, `operational`, `output_format`, and `other`. Each sub-field is an array of constraint strings. If a category has no known constraints, use an empty array.
- success_criteria: An array of objects, each with `criterion` (string) and `verification_method` (string describing how to check if it was met).
- assumptions: An array of strings listing assumptions you made to resolve ambiguities. Flag high-risk assumptions with `[NEEDS VERIFICATION]`.
- authority_boundary: A string describing what actions the agent is permitted to take without human approval, and what requires escalation.
- unresolved_ambiguities: An array of strings listing questions that must be answered before safe execution. If none, use an empty array.

## CONSTRAINTS
- Prefer safety: if an action could be destructive or irreversible, flag it in `authority_boundary` as requiring human approval.
- Be specific: replace vague terms like "analyze" with concrete outputs like "produce a CSV report with columns X, Y, Z."
- If the user request contains conflicting desires, note them in `unresolved_ambiguities` rather than silently choosing one.
- Do not invent user preferences. If a choice is arbitrary, state your assumption in the `assumptions` field.

## EXAMPLES
[EXAMPLES]

## RISK LEVEL
[RISK_LEVEL]

To adapt this template, replace the square-bracket placeholders with your specific inputs. [USER_REQUEST] should contain the raw, unedited user input. [CONTEXT] can include conversation history, user profile data, or environmental state. [EXAMPLES] should contain 2-3 few-shot demonstrations of vague inputs mapped to refined outputs, covering edge cases like conflicting constraints or high-risk actions. [RISK_LEVEL] should be set to low, medium, or high to adjust the model's conservatism in the authority_boundary and assumptions fields. For high-risk domains, add an additional instruction requiring that all assumptions be explicitly tagged for human review before any downstream execution. After generating the refined goal, validate the output against the JSON schema and check that unresolved_ambiguities is non-empty when the input is genuinely underspecified—an empty array for a vague request is a failure signal.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder the Ambiguous Goal Refinement prompt expects. Wire these into your agent frontend before calling the model. Missing or malformed variables are the most common cause of silent failures in goal clarification workflows.

PlaceholderPurposeExampleValidation Notes

[USER_GOAL]

The raw, unedited user request as received by the agent frontend

make it faster

Required. Must be a non-empty string. Pass through exactly as received; do not pre-process or truncate before refinement

[CONTEXT_HISTORY]

Recent conversation turns or session context that may clarify the user's intent

User previously mentioned the checkout page timeout is 12 seconds

Optional. If null, pass empty string. Validate that context is from the same session and user to avoid cross-session contamination

[AVAILABLE_CAPABILITIES]

List of tools, APIs, and actions the agent can actually perform

["database_query", "code_edit", "deploy_staging"]

Required. Must be a valid JSON array of strings. Each capability must match an actual registered tool name. Empty array triggers a feasibility-gap flag in output

[DOMAIN_CONSTRAINTS]

Known regulatory, security, or operational boundaries that apply to this goal

PII must not leave the VPC; max execution time 30s per step

Optional. If null, the prompt will flag missing constraint categories. Validate that constraints are scoped to this domain and session, not global policy defaults

[OUTPUT_SCHEMA]

The expected structure for the refined goal output

{"clarified_goal": "string", "scope_in": ["string"], "scope_out": ["string"], "success_criteria": ["string"], "unresolved_ambiguities": ["string"], "confidence": 0.0-1.0}

Required. Must be a valid JSON Schema or example object. Parse-check before prompt assembly. Schema mismatch with downstream consumer is a common integration failure

[CONFIDENCE_THRESHOLD]

Minimum confidence score required before the refined goal can proceed to planning

0.8

Required. Must be a float between 0.0 and 1.0. Values below 0.7 should trigger a human review gate. Validate type before prompt injection to prevent string coercion errors

[MAX_REFINEMENT_TURNS]

Maximum number of clarification back-and-forth rounds allowed before escalation

3

Required. Must be a positive integer. Used to prevent infinite clarification loops. Values above 5 risk context-window exhaustion in long sessions

[ESCALATION_CONTACT]

Identifier for the human or system that receives unresolved ambiguity escalations

ops-team-slack-channel

Optional. If null, the prompt will note that no escalation path is configured. Validate that the contact is reachable and monitored during the agent's operational hours

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Ambiguous Goal Refinement prompt into an agent frontend or planning pre-processor with validation, retries, and logging.

The Ambiguous Goal Refinement prompt is designed to sit at the entry point of an agent pipeline, acting as a pre-processor before any planning or tool-use modules are invoked. It should be called synchronously after user input is received but before the main agent loop begins. The prompt expects a raw, potentially vague user request as [USER_GOAL] and any available [CONTEXT] such as user role, session history, or known tool capabilities. The output is a structured clarification containing a refined goal statement, explicit scope boundaries, enumerated constraints, and measurable success criteria. This output becomes the input contract for downstream planning, task decomposition, and execution modules.

To integrate this into an application, wrap the prompt in a function that enforces a strict JSON output schema. Use a model with strong instruction-following and JSON mode enabled (e.g., gpt-4o, claude-3.5-sonnet with structured outputs). The application layer must validate the returned JSON against a schema that requires at minimum: refined_goal (string), scope_inclusions (array of strings), scope_exclusions (array of strings), constraints (array of objects with type and description), and success_criteria (array of strings). If validation fails, implement a single retry by feeding the validation error back into the prompt as [PREVIOUS_ERROR]. If the retry also fails, route the interaction to a human-in-the-loop queue rather than proceeding with an under-specified goal. Log the raw user input, the refined output, and the validation result for observability and prompt debugging.

For high-stakes domains such as healthcare, finance, or legal workflows, add a mandatory human review step after refinement. Present the clarified goal, scope, and constraints to the user for explicit confirmation before the agent proceeds. Do not treat the model's refinement as authoritative without user sign-off. Additionally, implement a specificity improvement eval: compare the number of ambiguous terms in the raw input versus the refined output using a simple heuristic (e.g., count of words like 'it', 'that', 'stuff', 'things', or undefined pronouns). If the refinement did not reduce ambiguity, flag the interaction for prompt template review. Avoid wiring this prompt directly to autonomous execution without these guardrails, as under-specified goals are the most common root cause of agent loops, over-execution, and misaligned plans.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the refined goal specification produced by the Ambiguous Goal Refinement Prompt. Use this contract to build a parser, validator, or evaluation harness before integrating the prompt into an agent frontend.

Field or ElementType or FormatRequiredValidation Rule

refined_goal_statement

string

Must be a single, complete sentence that is more specific than [ORIGINAL_USER_INPUT]. Check: parse as string, length > 50 chars, contains at least one concrete noun absent from the original input.

scope_boundary

object

Must contain 'in_scope' (array of strings) and 'out_of_scope' (array of strings). Check: schema validation, 'in_scope' has at least 1 item, no item appears in both arrays.

success_criteria

array of objects

Each object must have 'criterion' (string) and 'measurement_method' (string). Check: array length >= 1, no null or empty strings, each 'measurement_method' describes a verifiable check, not a subjective opinion.

constraints

array of strings

Each string must describe a binding limitation (e.g., budget, time, data access, authority). Check: array length >= 1, no string duplicates another, each string contains a constraint keyword (cannot, must not, limited to, only, within).

assumptions

array of strings

Each string must state an unverified premise the plan depends on. Check: array length >= 1, each string starts with a hedge word (assumes, if, provided that, given), no string is a restated constraint.

unresolved_ambiguities

array of strings

Each string must identify a specific ambiguity that remains after refinement. Check: if present, array length >= 1, each string names a decision point or missing information, not a generic statement like 'needs more detail'.

clarification_questions

array of strings

Each string must be a direct question the user can answer. Check: if present, array length >= 1, each string ends with a question mark, no question duplicates an unresolved ambiguity without adding a concrete choice.

confidence_assessment

object

Must contain 'overall_confidence' (enum: high, medium, low) and 'low_confidence_areas' (array of strings). Check: enum validation on 'overall_confidence', if 'overall_confidence' is 'high' then 'low_confidence_areas' must be empty or null.

PRACTICAL GUARDRAILS

Common Failure Modes

Ambiguous goal refinement fails in predictable ways. These are the most common production failure modes and how to guard against them before they corrupt downstream planning.

01

Over-Confident Specificity

What to watch: The model invents constraints, scope boundaries, or success criteria that the user never provided, presenting them as if they were extracted from the original request. This creates a false sense of precision and locks the agent into an incorrect plan. Guardrail: Add an explicit instruction to flag any assumption not directly supported by the user's input with [ASSUMPTION] tags. Run a post-refinement check that counts assumptions and requires human review if the count exceeds a threshold.

02

Constraint Erasure

What to watch: The refinement prompt drops or softens constraints the user did provide, especially implicit ones embedded in tone, urgency, or domain context. The clarified goal looks cleaner but is less faithful to the original intent. Guardrail: Require the prompt to echo back every extracted constraint with a source quote from the user's input. Run a constraint-preservation eval that measures recall of explicitly stated limitations before accepting the refined goal.

03

Premature Solutioning

What to watch: Instead of clarifying the goal, the prompt jumps to proposing a solution architecture, tool choice, or execution strategy. This conflates goal refinement with planning and locks in implementation decisions before the objective is stable. Guardrail: Add a strict output schema that separates goal_statement from suggested_approach. Include a validator that rejects refinements where the approach section exceeds the goal section in specificity or length.

04

False Consensus on Ambiguities

What to watch: When the user's request contains genuine ambiguities, the prompt resolves them silently instead of surfacing them as questions. The output reads as a coherent goal but masks unresolved decisions that will cause conflicts later. Guardrail: Require an explicit unresolved_ambiguities field in the output schema. Add an eval that checks whether each detected ambiguity maps to a clarification question. Fail refinement if ambiguities exist but the question list is empty.

05

Scope Creep Through Elaboration

What to watch: The refinement prompt adds related objectives, edge cases, or nice-to-have features that the user didn't request, expanding scope under the guise of being thorough. This increases cost, latency, and failure risk for the downstream agent. Guardrail: Include a scope_additions field that explicitly lists any objective not present in the original request. Require human approval for any refinement that introduces new top-level goals. Set a scope-delta budget.

06

Success Criteria Without Measurability

What to watch: The prompt generates success criteria that sound reasonable but cannot be evaluated programmatically or by a human reviewer. Vague criteria like "the user is satisfied" or "the output is high quality" provide no signal for agent completion or replanning. Guardrail: Require each success criterion to include a verification method. Run a measurability check that rejects criteria without a concrete observable signal, threshold, or comparison target. Flag criteria that rely on subjective judgment without a rubric.

IMPLEMENTATION TABLE

Evaluation Rubric

How to test output quality before shipping this prompt to production. Run these checks against a golden dataset of 20-50 vague user requests with known-good refinements.

CriterionPass StandardFailure SignalTest Method

Specificity Gain

Refined goal contains at least 3 concrete constraints or success criteria absent from the original [USER_REQUEST].

Output paraphrases the original request without adding measurable scope, deadline, format, or quality constraints.

Human review of 50 pairs: count added constraints. Pass if mean added constraints >= 3.

Ambiguity Resolution

All ambiguous terms from [USER_REQUEST] are replaced with specific alternatives or flagged with an explicit clarification question.

Output retains vague quantifiers (e.g., 'fast', 'good', 'secure') without definition or a request for definition.

Automated scan for a predefined list of ambiguous terms. Pass if zero unresolved ambiguous terms remain.

Scope Boundary Presence

Output includes an explicit 'Out of Scope' section listing at least one item that is intentionally excluded.

No boundary statement present, or boundary is empty.

Schema check: [OUTPUT_SCHEMA] field 'out_of_scope' is present and non-null with at least one entry.

Success Criteria Verifiability

Each success criterion in the output can be answered with a yes/no or a numeric threshold.

Criteria use subjective language (e.g., 'user-friendly', 'robust') without a measurable proxy.

Automated check: each criterion in 'success_criteria' array matches a testable pattern (contains a number, a boolean condition, or a specific state).

Constraint Conflict Detection

If [USER_REQUEST] contains potentially conflicting desires, the output flags the conflict and asks a prioritization question.

Output accepts conflicting constraints without comment (e.g., 'maximum security' and 'zero friction').

Human review of 10 seeded conflict cases. Pass if conflict is flagged in >= 90% of cases.

Assumption Explicitness

Output lists any assumptions made to resolve ambiguity, with a confidence level for each.

Assumptions are embedded in the refined goal statement without being labeled as assumptions.

Schema check: 'assumptions' array is present and each entry contains a non-null 'confidence' field.

Hallucination Resistance

Output introduces no new entities, constraints, or requirements not derivable from [USER_REQUEST] or general task knowledge.

Output fabricates specific deadlines, budget figures, or tool names not mentioned by the user.

Automated diff against [USER_REQUEST] entities. Human spot-check of 20 outputs for unsupported specifics.

Output Schema Compliance

Output is valid JSON matching [OUTPUT_SCHEMA] with all required fields present and correctly typed.

Output is missing required fields, contains extra untyped fields, or is not parseable JSON.

Automated JSON Schema validation against [OUTPUT_SCHEMA]. Pass if parse succeeds and all required fields are present.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt template as-is with a frontier model. Focus on getting the clarified goal structure right before adding validation layers. Run the prompt in a notebook or playground with 5-10 vague inputs and manually review the output for specificity improvement.

Prompt modifications

  • Remove or simplify the [OUTPUT_SCHEMA] placeholder; accept free-text structured output initially
  • Replace [CONSTRAINTS] with a short static list of common boundaries (e.g., "no external API calls, no PII processing")
  • Skip the eval harness; rely on manual review of ambiguities_resolved and specificity_score

Watch for

  • The model producing a clarified goal that is still vague or circular
  • Missing constraint categories that should have been obvious
  • Overly confident specificity scores without evidence of actual disambiguation
  • The prompt accepting contradictory user statements without flagging them
Prasad Kumkar

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.