Inferensys

Prompt

Agent Output Conflict Resolution for Classification Routing Disagreements Prompt Template

A practical prompt playbook for platform engineers resolving classification routing disagreements between agents. Includes a copy-ready template, variable definitions, output contract, evaluation rubric, and failure mode analysis for production multi-agent systems.
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 using the classification routing arbitration prompt and warns against misapplication.

This prompt is designed for a specific failure mode in multi-agent pipelines: when two or more classification or routing agents assign the same user input to different downstream handlers. This is not a general disagreement about facts, code quality, or tool selection. It is a structural conflict where the system cannot proceed because it has multiple conflicting paths for the same request. The ideal user is a platform engineer or system architect who has already instrumented their agents to report routing labels and confidence scores, and now needs a programmatic, auditable tie-breaker that can run in production without blocking the entire pipeline.

Use this prompt when the cost of misrouting is measurable and the downstream handlers have different risk profiles. For example, a customer support ticket might be routed to 'billing' by one agent and 'technical-support' by another. Sending a billing dispute to technical support has a clear, negative business outcome. The prompt template requires you to supply [AGENT_A_ROUTE], [AGENT_B_ROUTE], [CONFIDENCE_SCORES], [INPUT_SUMMARY], and a [RISK_MATRIX] that quantifies the impact of each possible misrouting. It then produces a final decision, a confidence comparison, a risk assessment, and an explicit escalation path if the ambiguity is too high. This makes the decision logic transparent and reviewable, rather than relying on a hidden heuristic like 'pick the highest confidence score.'

Do not use this prompt for conflicts where the agents disagree on the content of an answer, the steps in a plan, or which tool to call. Those scenarios require different arbitration structures covered in sibling playbooks like the LLM Arbitration Judge or the Agent Output Conflict Resolution for Tool Selection Disagreements. Also, do not use this prompt if you haven't defined a [RISK_MATRIX]. Without a quantified cost of misrouting, the prompt cannot make a principled trade-off and will default to escalating everything, which defeats the purpose of automation. Before implementing, ensure your upstream agents produce structured routing labels and calibrated confidence scores; garbage in will produce garbage arbitration out.

PRACTICAL GUARDRAILS

Use Case Fit

Where this classification routing arbitration prompt works, where it fails, and the operational prerequisites for safe deployment.

01

Good Fit: Multi-Classifier Disagreement Resolution

Use when: two or more classification agents produce conflicting routing labels for the same input, and downstream handlers require a single deterministic path. Guardrail: the prompt requires each agent's full output, confidence score, and classification rationale before arbitration begins.

02

Bad Fit: Single-Classifier Confidence Tuning

Avoid when: you only have one classifier and want to adjust its confidence threshold. This prompt assumes multiple conflicting outputs exist. Guardrail: use a confidence calibration prompt or threshold tuning in application code instead of invoking multi-agent arbitration.

03

Required Inputs: Agent Outputs with Confidence and Rationale

What to watch: arbitration quality collapses when agents provide only labels without confidence scores or reasoning. Guardrail: enforce a strict input schema requiring agent_id, classification_label, confidence_score, and rationale for every agent output before calling the arbitration prompt.

04

Operational Risk: Misrouting Amplification

What to watch: if all classifiers share the same blind spot, arbitration can confidently select the wrong route. Guardrail: implement a misrouting impact measurement harness that logs arbitration decisions against ground-truth outcomes and triggers review when error clusters appear.

05

Operational Risk: Escalation Loop Exhaustion

What to watch: ambiguous cases can bounce between arbitration and human review without resolution. Guardrail: set a maximum arbitration depth and escalation timeout. After N unresolved cycles, default to a safe fallback route and log the case for offline analysis.

06

Bad Fit: Real-Time Latency-Sensitive Routing

Avoid when: routing decisions must complete in under 100ms. Multi-agent arbitration adds inference latency proportional to the number of agents plus the arbitration step. Guardrail: for latency-critical paths, pre-compute arbitration rules or use a cached routing table with periodic offline conflict review.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A ready-to-use prompt template for arbitrating classification routing disagreements between agents, producing a final decision with risk assessment and escalation logic.

This prompt template acts as a classification routing arbitrator, designed to resolve disagreements between multiple routing agents and produce a single, defensible routing decision. It is intended for platform engineers and system designers who have already run several agents against the same input and received conflicting routing labels. The prompt forces a structured comparison of agent outputs against a defined taxonomy, a severity matrix for misrouting, and a configurable escalation threshold. Do not use this prompt for general classification or for merging outputs that are not routing labels; it is specifically designed for the conflict resolution step in a multi-agent triage pipeline.

text
You are a classification routing arbitrator. Your job is to resolve disagreements between routing agents and produce a final routing decision.

## ROUTING TAXONOMY
[ROUTING_TAXONOMY]

## MISROUTING SEVERITY DEFINITIONS
[MISROUTING_SEVERITY_MATRIX]

## ESCALATION THRESHOLD
[ESCALATION_THRESHOLD]

## AGENT OUTPUTS
[AGENT_OUTPUTS]

## ORIGINAL INPUT
[ORIGINAL_INPUT]

## INSTRUCTIONS
1. Compare the routing labels assigned by each agent.
2. For each agent, evaluate the confidence score and stated rationale against the original input.
3. Identify which routing label best matches the input based on the taxonomy definitions.
4. Assess the misrouting risk for each candidate label using the severity matrix.
5. If the confidence gap between the top two labels is below the escalation threshold, or if the misrouting risk for the leading label exceeds the threshold, escalate to human review.
6. Produce a final routing decision in the exact output format specified.

## OUTPUT FORMAT
Return a single JSON object with the following structure:
{
  "final_routing_label": "string",
  "confidence_score": 0.0,
  "decision_type": "resolved|escalated",
  "rationale": "string",
  "agent_alignment": {
    "agreeing_agents": ["agent_id"],
    "disagreeing_agents": ["agent_id"]
  },
  "risk_assessment": {
    "misrouting_risk": "low|medium|high|critical",
    "risk_rationale": "string"
  },
  "escalation": {
    "required": true,
    "reason": "string",
    "recommended_reviewer_role": "string"
  }
}

## CONSTRAINTS
- Do not invent routing labels outside the provided taxonomy.
- If escalation is required, set final_routing_label to null.
- Confidence scores must be between 0.0 and 1.0.
- The rationale must reference specific agent outputs and taxonomy definitions.
- If all agents agree, decision_type must be "resolved" and the rationale must explain why agreement is sufficient.

To adapt this template, you must populate five square-bracket placeholders with concrete data from your system. [ROUTING_TAXONOMY] should contain your complete list of valid routing labels with definitions, such as "billing": "Requests related to invoices, payments, or account charges.". [MISROUTING_SEVERITY_MATRIX] defines the business impact of sending an input to the wrong queue, for example "critical": "Routing a legal hold request to general support causes regulatory exposure.". [ESCALATION_THRESHOLD] is a numeric value (e.g., 0.15) representing the minimum confidence gap required to auto-resolve; if the top two labels are within this gap, the decision escalates. [AGENT_OUTPUTS] is a JSON array of objects, each containing agent_id, routing_label, confidence_score, and rationale. [ORIGINAL_INPUT] is the raw user text or event payload that the agents classified. The output is a single JSON object that your orchestration layer can parse to either forward the input to the resolved queue or place it in a human review queue with the recommended reviewer role.

Before deploying this prompt, build a validation layer around the JSON output. The validator must confirm that final_routing_label is either null (when escalation.required is true) or a string present in the provided taxonomy. Reject any output where decision_type is "resolved" but agent_alignment.disagreeing_agents is not empty, as this indicates a logic error. For high-stakes routing domains—such as healthcare intake, legal triage, or security incident response—always log the full arbitration payload and consider a secondary review step even for resolved decisions where misrouting_risk is "high" or "critical". This prompt is a decision-support tool, not a replacement for a well-governed routing architecture.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Agent Output Conflict Resolution for Classification Routing Disagreements prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Validation notes describe how to verify the input is well-formed and safe.

PlaceholderPurposeExampleValidation Notes

[INPUT_TEXT]

The original user query or message that triggered the classification routing disagreement

How do I reset my API key for the staging environment?

Check for null or empty string. Validate length is under 4096 tokens. Reject if input contains only PII or is a prompt injection probe.

[AGENT_A_CLASSIFICATION]

The classification label and route assigned by the first agent

{"label": "account_management", "route": "billing_support", "confidence": 0.87}

Parse as JSON. Validate presence of label, route, and confidence fields. Confidence must be a float between 0.0 and 1.0. Reject if route is not in the allowed routing table.

[AGENT_B_CLASSIFICATION]

The classification label and route assigned by the second agent

{"label": "technical_support", "route": "developer_tools", "confidence": 0.92}

Parse as JSON. Validate presence of label, route, and confidence fields. Confidence must be a float between 0.0 and 1.0. Reject if route is not in the allowed routing table.

[ROUTING_TABLE]

The canonical list of valid downstream routes with their capabilities and risk profiles

[ {"route_id": "billing_support", "capabilities": ["invoice_access", "plan_changes"], "risk_level": "medium"}, {"route_id": "developer_tools", "capabilities": ["api_key_management", "webhook_config"], "risk_level": "high"} ]

Validate JSON schema. Every route must have a unique route_id, a non-empty capabilities array, and a risk_level from the allowed enum [low, medium, high, critical]. Reject if table is empty.

[AGENT_A_TRACE]

The reasoning trace or chain-of-thought from the first agent

Step 1: Identified keyword 'API key'. Step 2: Matched to developer_tools capability. Step 3: Confidence set to 0.87 due to 'staging' ambiguity.

Check for null. If trace is empty, flag as a potential black-box agent. Validate that the trace does not contain sensitive user data from [INPUT_TEXT] that should not be forwarded.

[AGENT_B_TRACE]

The reasoning trace or chain-of-thought from the second agent

Step 1: Identified keyword 'reset'. Step 2: Matched to account_management capability. Step 3: Confidence set to 0.92 due to 'my API key' implying ownership.

Check for null. If trace is empty, flag as a potential black-box agent. Validate that the trace does not contain sensitive user data from [INPUT_TEXT] that should not be forwarded.

[MISROUTE_IMPACT_THRESHOLD]

The maximum acceptable business impact score for an automated routing decision before escalation is forced

0.65

Validate value is a float between 0.0 and 1.0. If set to 0.0, all disagreements will escalate. If set to 1.0, escalation is effectively disabled. Log a warning if threshold is below 0.2 or above 0.9.

[ESCALATION_QUEUE_ID]

The identifier for the human review queue where ambiguous cases are sent

queue_rt_high_risk_v2

Validate against a list of active queue IDs. Reject if the queue ID format does not match the expected pattern. Check that the queue is not a deprecated or decommissioned endpoint.

PROMPT PLAYBOOK

Implementation Harness Notes

Wire this prompt into your agent pipeline with these integration points.

Integrating the arbitrator prompt into a production pipeline requires a structured API call, strict pre- and post-validation, and a clear escalation path. The goal is to make every arbitration decision deterministic and auditable, not just to get a plausible JSON response. Before calling the model, validate that all agent outputs reference labels present in your current routing taxonomy. Reject any output containing an unknown label and log it as a taxonomy drift event. Normalize all agent confidence scores to a 0.0–1.0 range if different agents use different scales, so the arbitrator receives comparable inputs.

Call the arbitrator as a structured output request with JSON mode enabled. Set response_format to json_object and provide the output schema explicitly. Use a low temperature (0.0–0.2) to minimize variance in arbitration decisions. If the model provider does not support strict JSON mode, wrap the call in a retry loop that validates the schema and retries once with the validation error appended as a correction instruction. After receiving the output, validate that final_routing_label is either null (indicating escalation) or a valid label from the taxonomy. Confirm that confidence_score falls within 0.0–1.0. Check that decision_type matches the escalation.required field: if escalation.required is true, decision_type must be "escalated" and final_routing_label must be null. If any validation fails, retry once with the specific error injected into the prompt. If the second attempt also fails, log the failure and escalate to human review with the raw agent outputs and all validation errors.

Log every arbitration decision with the timestamp, a hash of the original input, the full agent outputs, the arbitrator's raw response, the validation result, and the final routing action taken. This audit log is essential for measuring misrouting impact and calibrating escalation thresholds over time. When escalation.required is true, route the arbitration output to a human review queue. Include the original input, all agent outputs, and the arbitrator's risk assessment. The human reviewer should confirm or override the escalation decision. Track reviewer decisions to measure arbitrator accuracy and identify threshold calibration opportunities. Avoid deploying this prompt without the validation and logging harness; an unvalidated arbitrator can silently route inputs to the wrong handler and erode trust in the entire agent pipeline.

IMPLEMENTATION TABLE

Expected Output Contract

Define the exact shape of the arbitrator's output so downstream systems can parse it reliably. Every field must be validated before the routing decision is executed.

Field or ElementType or FormatRequiredValidation Rule

final_route

string

Must match one of the allowed route labels from [ROUTE_CATALOG]. Reject if value is not in the allowed set.

confidence_score

number (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. Reject if out of range or non-numeric.

selected_agent

string

Must be the ID of the agent whose classification was selected. Reject if ID does not appear in [AGENT_OUTPUTS].

disagreement_type

string

Must be one of: 'route_conflict', 'confidence_tie', 'capability_gap', 'policy_conflict'. Reject on unknown type.

risk_assessment

object

Must contain 'level' (string: 'low', 'medium', 'high', 'critical') and 'rationale' (string, max 500 chars). Reject if missing or malformed.

escalation_required

boolean

Must be true if confidence_score < [CONFIDENCE_THRESHOLD] or risk_assessment.level is 'high' or 'critical'. Validate against threshold.

escalation_package

object | null

Required if escalation_required is true. Must contain 'summary', 'agent_positions', and 'pending_decision'. Reject if missing when escalation is triggered.

audit_trail

array of objects

Each object must have 'step', 'evidence_used', and 'reasoning'. Array must not be empty. Reject if any object is missing a required field.

PRACTICAL GUARDRAILS

Common Failure Modes

When multiple agents disagree on how to route a classification, the failure is rarely the final decision—it's the silent assumptions, confidence inflation, and missing evidence that break trust before the output is even used.

01

Confidence Inflation Without Calibration

What to watch: Agents report high confidence (e.g., 0.95) for conflicting routes, making the conflict look like a tie when one agent is actually overconfident and wrong. Raw confidence scores are rarely comparable across agents with different prompts or models. Guardrail: Normalize confidence scores using a shared calibration baseline before comparison. Require each agent to cite specific evidence supporting its route, not just a score. Flag any conflict where both agents claim >0.85 confidence as a calibration failure.

02

Silent Schema Mismatch Between Agent Outputs

What to watch: Two agents produce routing decisions that appear to conflict but actually use different taxonomies, label names, or granularity levels (e.g., 'billing' vs. 'subscription_payment_issue'). The conflict is a normalization problem, not a real disagreement. Guardrail: Enforce a shared routing taxonomy with canonical labels before agents produce output. Validate that all agent outputs map to the same schema version. If normalization fails, escalate as a schema conflict, not a routing conflict.

03

Evidence-Free Routing Decisions

What to watch: Agents select a route without grounding their decision in specific input features, leading to unresolvable conflicts where the arbiter has no basis to choose. Two agents saying 'Route A' and 'Route B' with no reasoning creates an un-auditable deadlock. Guardrail: Require each agent to output a structured rationale with at least one specific input excerpt supporting its classification. The arbitration prompt must compare rationales, not just labels. Reject any routing decision that lacks a citation to the input.

04

Escalation Avoidance on Ambiguous Inputs

What to watch: Agents forced to always pick a route will guess on genuinely ambiguous inputs, producing conflicting guesses that look like a resolvable disagreement but are actually two wrong answers. The system should have escalated to a human or fallback queue. Guardrail: Add an explicit 'ambiguous' or 'escalate' option to the routing taxonomy. Measure the rate at which conflicting decisions are both wrong vs. one being correct. If both agents are frequently wrong together, tighten the ambiguity threshold and force escalation.

05

Misrouting Impact Blindness

What to watch: The arbitration prompt resolves the conflict without considering the downstream cost of a wrong decision. Sending a urgent security issue to the billing queue is worse than sending a billing question to the security queue, but a naive arbiter treats all misroutes equally. Guardrail: Include a misrouting impact matrix in the arbitration context that specifies the risk and reversibility of each possible wrong route. Weight the arbitration decision toward the lower-risk path when confidence is close. Log the impact-aware reasoning for audit.

06

Arbiter Override Without Traceability

What to watch: The arbitration prompt selects a final route but discards the losing agent's rationale, making it impossible to detect when the arbiter is systematically biased toward one agent or model. Production drift goes unnoticed. Guardrail: Preserve all agent outputs, confidence scores, and rationales in the arbitration log. Periodically review cases where the arbiter overrode a correct agent to detect bias. Implement a 'minority report' field in the output that records the rejected route and why it was rejected.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the quality of the arbitration output before deploying the prompt to production. Each criterion targets a specific failure mode in classification routing disagreements.

CriterionPass StandardFailure SignalTest Method

Routing Decision Clarity

Output contains exactly one final routing target from the allowed [ROUTING_TARGETS] list

Output proposes multiple targets, a target outside the allowed list, or no target at all

Schema validation against [ROUTING_TARGETS] enum; parse check for single selection

Confidence Comparison Completeness

Every agent's confidence score is listed with its source agent label and the final decision references these scores

Missing agent scores, scores without agent attribution, or final decision ignores stated confidence values

Field presence check for each agent in [AGENT_OUTPUTS]; trace final decision rationale back to listed scores

Risk Assessment Grounding

Risk level maps to a concrete downstream impact statement tied to the misrouting scenario

Risk level is generic, unsubstantiated, or contradicts the confidence gap between top agents

Human review of risk statement against [MISROUTING_IMPACT] definitions; check for hallucinated impacts

Escalation Path Correctness

Escalation is triggered only when confidence gap falls below [CONFIDENCE_THRESHOLD] or risk level exceeds [RISK_THRESHOLD]

Escalation triggered on clear majority cases or skipped when confidence gap is below threshold

Automated threshold comparison against [CONFIDENCE_THRESHOLD] and [RISK_THRESHOLD] values

Evidence Alignment

Decision rationale cites specific agent output fields that support the chosen route

Rationale is circular, cites agent outputs that actually disagree, or invents agent statements

Assertion check: each cited claim must appear verbatim in the corresponding [AGENT_OUTPUTS] entry

Ambiguity Acknowledgment

Output explicitly flags when agent outputs are semantically similar but structurally different or when evidence is thin

Output presents a high-confidence decision when agent outputs are nearly tied or evidence is sparse

Confidence gap calculation; flag if gap < [AMBIGUITY_THRESHOLD] but output lacks ambiguity language

Output Schema Compliance

Output matches [OUTPUT_SCHEMA] exactly with all required fields present and correctly typed

Missing required fields, extra fields, type mismatches, or malformed JSON

JSON Schema validation against [OUTPUT_SCHEMA]; automated field presence and type check

Misrouting Impact Traceability

Output includes a measurable misrouting impact estimate when the decision is low-confidence or escalated

Impact estimate is missing for low-confidence decisions or contains unsupported cost/risk numbers

Check that [MISROUTING_IMPACT] field is non-null when confidence < [CONFIDENCE_THRESHOLD]; verify estimate references defined impact categories

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt but remove strict schema enforcement. Use a single model call without retry logic. Replace the full [ROUTING_HISTORY] with a simplified summary of the two conflicting classifications. Skip the [MISROUTING_IMPACT_MATRIX] and use a simple confidence comparison instead.

code
You are a routing arbitrator. Two agents classified the same input differently.

Agent A classified as: [CLASS_A] with confidence [CONF_A]
Agent B classified as: [CLASS_B] with confidence [CONF_B]

Input: [USER_INPUT]

Return the final classification and a one-sentence reason.

Watch for

  • Over-reliance on confidence scores without examining the actual input
  • No record of why one agent was chosen over the other
  • Silent failures when both agents are wrong
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.