This prompt is for dialogue state managers that must decide whether a user's latest message is a correction to the assistant's previous turn or an entirely new, unrelated request. The distinction is critical: misclassifying a correction as a new intent causes the system to ignore user feedback and repeat errors. Misclassifying a new intent as a correction pollutes the active dialogue state with irrelevant repair logic. Use this prompt inside a stateful conversation loop, immediately after receiving user input and before updating the dialogue state or calling downstream tools. It assumes you have access to the current user message, the assistant's last response, and a structured summary of the active task or topic.
Prompt
Correction vs. New Intent Discrimination Prompt

When to Use This Prompt
Defines the exact conditions, required inputs, and failure modes for deploying the Correction vs. New Intent Discrimination Prompt in a production dialogue loop.
Required inputs are non-negotiable for reliable discrimination. You must provide the [USER_MESSAGE] (the raw latest turn), the [ASSISTANT_LAST_RESPONSE] (the full text of the immediately preceding assistant turn), and the [ACTIVE_DIALOGUE_STATE] (a structured object containing the current intent, filled slots, and pending actions). Without the assistant's last response, the model cannot anchor what the user might be correcting. Without the active dialogue state, it cannot determine if the new message is a continuation. Do not use this prompt for single-turn stateless interactions, for classifying the first user message in a session, or when the assistant's last turn was a simple acknowledgment with no substantive content to correct. In those cases, route directly to intent classification.
Production placement matters. Wire this prompt as a synchronous gate after user input ingestion and before any tool calls, database writes, or state mutations. If the classifier returns correction, your system must update the dialogue state to reverse or amend the prior turn's effects before proceeding. If it returns new_intent, archive or summarize the prior task and initialize a fresh state. Avoid using this prompt on every turn unconditionally—if the user's message is clearly a simple confirmation ('yes', 'ok', 'thanks'), skip classification to save latency and cost. Implement a lightweight pre-filter: if the user message contains explicit correction markers ('no,', 'wrong,', 'actually,', 'I meant') or topic-shift signals ('new topic:', 'instead,', 'unrelated:'), route to this prompt. Otherwise, assume continuation and bypass.
The primary failure mode is false negatives on corrections. When a user corrects the assistant without using explicit negation language—for example, by restating their request with slightly different parameters—the model may classify it as a new intent. This causes the system to abandon the original task and start over, frustrating the user who expected a repair. Mitigate this by including few-shot examples in [EXAMPLES] that show implicit corrections (e.g., 'Can you do that for March instead?' following a February report). The secondary failure mode is false positives on topic shifts, where a genuinely new request is treated as a correction because it shares surface-level vocabulary with the prior turn. Mitigate this by requiring the model to output explicit [EVIDENCE] spans from both the user message and the assistant's last response that support its classification. Log this evidence for offline review and eval dataset construction.
Use Case Fit
Where the Correction vs. New Intent Discrimination Prompt works and where it does not. This prompt is a critical state-management component for conversational AI, but it is not a substitute for product-level intent architecture.
Good Fit: Multi-Turn Task Assistants
Use when: your assistant maintains state across turns to complete a task (e.g., booking, troubleshooting, data entry). The prompt reliably distinguishes 'change the date to Friday' from 'book a new flight.' Guardrail: Always provide the last N turns of history and the current system state as input to ground the classification.
Bad Fit: Single-Turn Stateless APIs
Avoid when: each user request is independent and carries no conversational history. Applying this prompt adds latency and cost with no benefit. Guardrail: Use a simple intent classifier for single-turn requests and reserve this prompt for stateful dialogue management.
Required Inputs
Risk: Classification accuracy collapses without the right context. Guardrail: The prompt requires the current user utterance, the last assistant response, and a structured representation of the active dialogue state (slots, pending actions). Supplying only raw text history without state increases boundary-case errors.
Operational Risk: Correction Cascades
Risk: A misclassified correction as a new intent can cause the assistant to ignore the user's fix and proceed with a now-invalid plan, leading to a cascade of errors. Guardrail: Implement a confirmation step for high-stakes state reversals and log all classification decisions for offline evaluation.
Operational Risk: Over-Correction Sensitivity
Risk: The model may interpret a simple follow-up question as a correction, causing it to unnecessarily discard valid state. Guardrail: Tune the prompt's output to include a confidence score. Route low-confidence classifications to a lightweight clarification prompt to confirm the user's intent before mutating state.
Variant: Implicit vs. Explicit Corrections
Use when: users correct the assistant without explicit language like 'no, I meant...'. The prompt must detect implicit corrections (e.g., 'Actually, make it 5 PM'). Guardrail: Include few-shot examples of implicit corrections in the prompt template and test against a golden dataset of real user phrasing to prevent missed corrections.
Copy-Ready Prompt Template
A reusable prompt for classifying a user turn as a correction to prior work or a new, unrelated intent.
This prompt template is the core of the Correction vs. New Intent Discrimination workflow. It is designed to be dropped into a stateful dialogue manager where the model has access to the recent conversation history. The prompt forces the model to ground its classification in specific evidence from the turn history, preventing lazy or assumption-driven labels. The output is a structured JSON object that your application can parse to decide whether to update an existing task, reverse a prior action, or start a fresh workflow.
textSYSTEM: You are a dialogue state classifier. Your job is to analyze the user's latest message against the provided conversation history and determine if it is a correction to a prior assistant action or a new, unrelated intent. INPUT: [CONVERSATION_HISTORY] [LATEST_USER_MESSAGE] CLASSIFICATION_RULES: 1. A "correction" means the user is rejecting, modifying, or undoing a specific prior assistant output or action. The user's message must reference a prior turn explicitly or implicitly. 2. A "new_intent" means the user is starting a new topic, asking a new question, or making a request that does not depend on fixing a prior assistant mistake. 3. If the user's message could be interpreted either way, default to "new_intent" unless there is strong evidence of a correction. OUTPUT_SCHEMA: { "classification": "correction" | "new_intent", "confidence": 0.0-1.0, "evidence": [ { "turn_id": "string", "quote": "string", "reasoning": "string" } ], "corrected_turn_id": "string | null", "new_topic_summary": "string | null" } CONSTRAINTS: - Always cite specific turns from [CONVERSATION_HISTORY] as evidence. - If classification is "correction", `corrected_turn_id` must be populated with the ID of the turn being corrected. - If classification is "new_intent", `new_topic_summary` must be a concise phrase describing the new request. - Do not invent turns not present in the history. - If the history is empty, classification must be "new_intent".
To adapt this template, replace [CONVERSATION_HISTORY] with a serialized list of prior turns, each with a unique turn_id, the user's message, and the assistant's response. The [LATEST_USER_MESSAGE] is the current user input you are classifying. For high-stakes applications, such as financial transactions or healthcare orders, add a [RISK_LEVEL] placeholder that triggers a human review step when confidence is below a threshold. The output schema is designed for direct parsing; validate that corrected_turn_id references a real turn before acting on it. Next, wire this prompt into a harness that logs every classification, compares it against a golden dataset of boundary cases, and escalates low-confidence predictions for manual review.
Prompt Variables
Required and optional inputs for the Correction vs. New Intent Discrimination Prompt. Validate each variable before assembly to prevent misclassification of user turns.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CURRENT_USER_MESSAGE] | The latest user turn to classify as a correction or new intent | Actually, I meant the Q3 report, not Q2 | Non-empty string. Must be the raw, unmodified user input. Reject if null or whitespace-only. |
[CONVERSATION_HISTORY] | Prior turns between user and assistant, ordered oldest to newest | [{"role": "user", "content": "Show me Q2 revenue"}, {"role": "assistant", "content": "Q2 revenue was $4.2M"}] | JSON array of message objects with role and content fields. Minimum 1 prior assistant turn required for correction detection. Validate JSON parse before prompt assembly. |
[ASSISTANT_LAST_OUTPUT] | The most recent assistant response that the user may be correcting | Q2 revenue was $4.2M, up 12% from Q1. | Non-empty string extracted from the last assistant message in conversation history. Must be present for correction classification to function. Null triggers fallback to new-intent classification. |
[CLASSIFICATION_LABELS] | Allowed output labels for the discrimination decision | ["correction", "new_intent", "ambiguous"] | JSON array of strings. Must include at least correction and new_intent. Ambiguous label is optional but recommended for low-confidence boundary cases. |
[EVIDENCE_REQUIREMENT] | Whether the prompt must cite specific spans from conversation history as evidence | Boolean. When true, output schema must include evidence field with quoted spans from [CONVERSATION_HISTORY] or [ASSISTANT_LAST_OUTPUT]. Set false for latency-sensitive paths where evidence is logged separately. | |
[CONFIDENCE_THRESHOLD] | Minimum confidence score for automatic classification without escalation | 0.85 | Float between 0.0 and 1.0. Classifications below this threshold should route to ambiguous label or human review. Validate range before prompt assembly. Default 0.80 if not specified. |
[DOMAIN_TERMS] | Optional list of domain-specific terms that signal topic continuity versus shift | ["revenue", "Q2", "Q3", "forecast", "pipeline"] | JSON array of strings or null. When provided, helps the model distinguish between corrections within a domain and shifts to unrelated topics. Null allowed for general-purpose use. |
Implementation Harness Notes
How to wire the Correction vs. New Intent Discrimination Prompt into a production dialogue state manager with validation, logging, and fallback logic.
This prompt is a classification step, not a user-facing response. It must be called before the dialogue manager updates its state. The harness should intercept the user's latest turn and the last N turns of conversation history, inject them into the prompt's [CONVERSATION_HISTORY] and [LATEST_USER_MESSAGE] placeholders, and parse the structured output to decide whether to update the existing intent stack or push a new one. The model choice should favor low latency and high instruction-following reliability; a fast model like claude-3-haiku or gpt-4o-mini is appropriate because this is a binary classification with evidence extraction, not a generation task.
The output must be validated against a strict schema before any state change occurs. The expected JSON object contains a classification field (enum: correction, new_intent), an evidence array of strings quoting the relevant prior turns, and a confidence float between 0.0 and 1.0. Implement a post-processing validator that rejects any response where classification is missing, evidence is empty for a correction label, or confidence is below a configurable threshold (start at 0.7). On validation failure, log the raw response and fall back to a safe default: treat the turn as a new_intent to avoid corrupting existing state, but flag it for human review if the session is high-stakes. Retry once with a simplified prompt that asks only for the classification and the single strongest piece of evidence.
Logging is critical for tuning the threshold and catching drift. Record the user input, the truncated history, the model's raw classification, the validated output, and the final state transition decision. This trace allows you to build an evaluation dataset of boundary cases—such as a user saying 'actually, also check the billing issue' which blends correction and new intent—and measure whether your threshold and prompt are calibrated correctly. Do not use this prompt in isolation; pair it with a downstream slot-filling or intent-routing prompt that consumes the corrected or new intent, and ensure that a correction classification triggers a state reversal on the specific slot or claim the user rejected.
Expected Output Contract
The structured JSON object the prompt must return. Every field is required for the downstream state manager to reliably update the dialogue state without ambiguity.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
classification | enum: | Must be exactly one of the three enum values. Reject any other string. | |
confidence | number (0.0 to 1.0) | Must be a float between 0 and 1 inclusive. If | |
target_turn_id | string | null | If | |
correction_scope | enum: | If | |
evidence | array of objects | Must contain 1-3 objects, each with | |
new_intent_summary | string | null | If | |
requires_clarification | boolean | Must be true if | |
clarification_question | string | null | If |
Common Failure Modes
Production failures in correction vs. new intent discrimination almost always stem from ambiguous turn boundaries, stale context, or the model's tendency to overfit to the most recent user utterance. These cards cover the most frequent breakages and how to prevent them.
Correction Misclassified as Topic Shift
What to watch: The model interprets a user's correction (e.g., 'no, the red one') as a brand-new, unrelated request, discarding all prior turn context. This happens when the correction is terse and lacks explicit anaphora. Guardrail: Inject the prior assistant turn and its topic label directly into the prompt. Instruct the model to first test if the new utterance semantically contradicts or adjusts a slot from the previous turn before classifying it as a new intent.
New Intent Misclassified as Correction
What to watch: A user moves on to a completely new task ('Okay, now show me my account balance'), but the model treats it as a refinement of the previous topic, leading to nonsensical state updates. This is common when the new topic shares keywords with the old one. Guardrail: Implement a semantic similarity threshold. If the embedding distance between the new utterance and the prior task's centroid exceeds a defined limit, force a new-intent classification regardless of superficial word overlap.
Stale Context Poisoning Classification
What to watch: The model correctly identifies a correction but applies it to a resolved or stale entity from 10 turns ago instead of the immediate prior turn. This corrupts the active dialogue state. Guardrail: Prune the conversation history to only include the last N active turns or unresolved slots. Explicitly mark resolved intents as [CLOSED] in the prompt's state summary to make them ineligible for correction.
Over-Correction Cascades
What to watch: A single user correction ('change the date to Tuesday') causes the model to revert or invalidate multiple previously confirmed, unrelated parameters (e.g., time, location). The model over-generalizes the scope of the correction. Guardrail: Require the prompt to output a structured correction_scope object that explicitly lists which specific slots are being modified. Validate that only the targeted slots are changed in the final state update.
Ambiguous Pronoun Resolution Failure
What to watch: The user says 'change it to the other one,' and the model cannot reliably map 'it' and 'the other one' to the correct entities from the history, defaulting to a new-intent classification as a fallback. Guardrail: Use a dedicated coreference resolution step before the discrimination prompt. Replace pronouns with their resolved entities in the pre-processed input, so the discriminator sees 'change the shipping address to the billing address' instead of the ambiguous original.
Politeness Prefixes Trigger False New Intent
What to watch: A user prefaces a correction with a polite phrase ('Thanks, but actually...'), and the model's intent classifier latches onto 'Thanks' as a conversation-ending signal, misclassifying the subsequent correction as a new, disjointed turn. Guardrail: Add a preprocessing step or few-shot example that strips conversational filler and politeness markers before the utterance reaches the discrimination prompt. Train the prompt to focus on the operative clause after discourse markers like 'but' or 'actually'.
Evaluation Rubric
Use this rubric to test the prompt's output quality before shipping. Each criterion targets a known failure mode in correction vs. new intent discrimination.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Correction Detection Recall | Correctly classifies explicit corrections (e.g., 'no, I meant...', 'change that to...') as 'correction' with >= 0.95 recall on a golden set of 50 correction turns. | Output classifies an explicit correction as 'new_intent' or 'ambiguous'. | Run prompt against a labeled dataset of correction turns and measure recall. |
New Intent Detection Precision | Correctly classifies unrelated topic shifts (e.g., 'what about the weather?' after a billing discussion) as 'new_intent' with >= 0.90 precision. | Output classifies a clear topic shift as 'correction', causing the assistant to erroneously modify prior state. | Run prompt against a labeled dataset of topic-shift turns and measure precision. |
Boundary Case Handling | For ambiguous turns (e.g., 'actually, let's talk about the invoice' after a general billing query), output classification is 'ambiguous' with a structured evidence summary. | Output confidently classifies an ambiguous turn as 'correction' or 'new_intent' without acknowledging the ambiguity. | Test with 20 hand-crafted boundary cases and check for 'ambiguous' classification and evidence presence. |
Evidence Grounding | The | The | Parse the output JSON and validate that the |
State Reversal Scope Accuracy | When classification is 'correction', the | The | For correction cases, check that the |
Output Schema Compliance | The output is valid JSON that strictly matches the defined [OUTPUT_SCHEMA] with all required fields present and correctly typed. | Output is missing required fields (e.g., | Validate the raw model output against the [OUTPUT_SCHEMA] using a JSON schema validator. |
Low-Confidence Escalation | When the model's internal confidence is below the [CONFIDENCE_THRESHOLD], the | A low-confidence classification is output as a definitive 'correction' or 'new_intent' without flagging for human review or clarification. | Inject noise into the turn history to lower model confidence and assert that |
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 prompt and a lightweight classifier. Use a single model call with a simple output schema: {"classification": "correction" | "new_intent", "evidence": "[TURN_REFERENCE]"}. Skip complex state tracking; just feed the last N turns as raw text.
Watch for
- Over-classifying topic shifts as corrections when the user changes subject abruptly
- Missing corrections that use vague language like "no, the other one"
- No validation on output schema shape—expect malformed JSON in early iterations

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