Inferensys

Prompt

Conflict Resolution Prompt for Extracted Fields

A practical prompt playbook for data quality engineers reconciling contradictory extractions within a single document. Produces a resolved record with conflict annotations, resolution rationale, and confidence adjustments.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required context, and boundaries for the conflict resolution prompt.

This prompt is designed for data quality engineers and pipeline operators who have run multiple extraction passes or used multiple extractors on the same source document and now face contradictory field values. The core job-to-be-done is not simple extraction, but reconciliation: surfacing every conflict, applying resolution rules, adjusting confidence scores, and producing a single resolved record with a full audit trail. The ideal user is someone who owns a data ingestion pipeline where downstream consumers—analytics databases, operational systems, compliance archives—cannot tolerate unresolved conflicts or silently dropped values. Required context includes the original source text, the conflicting extracted values for each field, any field-level confidence scores, and a defined set of resolution rules or priorities.

Use this prompt when you have multiple extraction sources per field and need programmatic evidence of why one value was chosen over another. It is appropriate for high-stakes pipelines where conflict annotation is cheaper than downstream data corruption: financial filings, contract metadata, clinical data, regulatory submissions, and any workflow where an auditor might ask 'why was this value selected?' The prompt expects structured input—typically a JSON object mapping field names to arrays of candidate values with their sources and confidence scores—and produces a resolved record alongside a conflict log. You should also use it when your extraction architecture includes multiple models, multiple prompt variants, or human-in-the-loop extractions that can disagree.

Do not use this prompt when you have only one extraction source per field, as there is nothing to reconcile. It is also the wrong tool when the cost of conflict annotation exceeds the value of resolution—for example, in low-stakes classification where picking the highest-confidence value silently is acceptable. Avoid this prompt when your resolution rules are so complex or domain-specific that they require deterministic code rather than LLM reasoning; the model can apply rules you provide, but it should not invent financial reconciliation logic or legal precedence rules. Finally, do not use this prompt when the conflicting values represent genuinely ambiguous ground truth that should be preserved as multiple valid interpretations rather than collapsed into a single record. In that case, use the Ambiguity Flagging During Record Assembly prompt instead, and route the record for human review.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Conflict Resolution Prompt for Extracted Fields works, where it fails, and the operational prerequisites for safe deployment.

01

Strong Fit: High-Volume Document Ingestion

Use when: You have a pipeline extracting fields from thousands of documents and need automated reconciliation of contradictory values (e.g., two different dates of birth in the same record). Guardrail: Always preserve the original conflicting extractions alongside the resolved record for auditability.

02

Poor Fit: Single-Source Authoritative Data

Avoid when: The document is the single source of truth and any contradiction indicates upstream data corruption that must be fixed at the source, not resolved by AI. Guardrail: Route contradictions to a data quality incident queue instead of attempting automated resolution.

03

Required Input: Per-Field Confidence Scores

Risk: Without confidence scores for each conflicting extraction, the resolution prompt has no signal to weigh evidence and will default to arbitrary tie-breaking. Guardrail: Require upstream extractors to emit confidence annotations before invoking conflict resolution.

04

Operational Risk: Resolution Drift Over Time

Risk: Model behavior changes can alter resolution patterns silently, causing downstream systems to receive different resolved values for the same input. Guardrail: Pin model versions, log resolution rationale per record, and run regression tests against a golden conflict dataset on every prompt or model change.

05

Poor Fit: Legal or Regulatory Final Determinations

Avoid when: The resolved value will be used as a legal record, regulatory filing, or compliance artifact without human review. Guardrail: Flag all resolved conflicts for mandatory human approval before the record enters any system of record.

06

Required Input: Source Span Anchoring

Risk: Without exact source spans for each conflicting extraction, the resolution prompt cannot verify whether the conflict is genuine or an extraction artifact. Guardrail: Require upstream extractors to provide character-level or section-level source references for every field value.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

Paste this prompt into your system instructions or user message. Replace square-bracket placeholders with your extraction payloads, schema, and resolution rules.

This template is designed to be dropped directly into your AI harness as a system or user message. It expects you to supply the conflicting extractions, the target output schema, and your resolution rules. The prompt instructs the model to produce a single resolved record, annotate every conflict it resolved, explain its rationale, and adjust confidence scores downward where ambiguity remains. Do not use this prompt when you need a simple majority-vote merge without audit trails—this prompt is for auditable, explainable conflict resolution.

text
You are a data quality engineer reconciling contradictory field extractions from a single source document. Your job is to produce one resolved record, not to choose sides silently.

## INPUTS
- Extracted Fields: [EXTRACTED_FIELDS]
- Target Schema: [OUTPUT_SCHEMA]
- Resolution Rules: [RESOLUTION_RULES]
- Domain Context: [DOMAIN_CONTEXT]

## INSTRUCTIONS
1. For each field in the target schema, examine all conflicting extracted values provided in [EXTRACTED_FIELDS].
2. Apply the resolution rules in [RESOLUTION_RULES] to select or synthesize the best value. Rules may include:
   - Prefer the value with the highest confidence score.
   - Prefer the value extracted from the most specific span.
   - Prefer the value that is consistent with other resolved fields.
   - Prefer the value that matches a canonical form or authority list.
   - If no rule resolves the conflict, preserve the ambiguity.
3. For every conflict you resolve, add an entry to the `conflicts` array containing:
   - `field`: the field name.
   - `candidates`: the conflicting values and their sources.
   - `resolved_value`: the value you selected or synthesized.
   - `rationale`: a concise explanation of why you chose this value.
   - `rule_applied`: which resolution rule you used.
4. If a conflict cannot be resolved with high confidence, set `resolved_value` to the best candidate but mark `confidence` as `low` and add an `ambiguity_note` explaining what remains uncertain.
5. Adjust the `confidence` score for each resolved field. If resolution required choosing between equally plausible candidates, reduce confidence. If one candidate was clearly superior, confidence may remain high.
6. Do not invent values. Every resolved value must be traceable to at least one extracted candidate.
7. If a required field has no extracted candidates, set it to `null` and add a `missing_field` entry with `reason`: "no_extraction_available".

## OUTPUT FORMAT
Return a single JSON object matching this structure:
{
  "resolved_record": { ... },
  "conflicts": [
    {
      "field": "string",
      "candidates": [
        {
          "value": "...",
          "source_span": "...",
          "confidence": 0.0
        }
      ],
      "resolved_value": "...",
      "rationale": "string",
      "rule_applied": "string",
      "confidence": 0.0,
      "ambiguity_note": "string or null"
    }
  ],
  "missing_fields": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "resolution_summary": {
    "total_fields": 0,
    "conflicts_resolved": 0,
    "conflicts_ambiguous": 0,
    "fields_missing": 0,
    "overall_confidence": 0.0
  }
}

## CONSTRAINTS
- Do not discard conflicting values. Every candidate must appear in the `conflicts` array.
- Do not merge values unless a resolution rule explicitly permits synthesis.
- Preserve source spans for every candidate.
- If [DOMAIN_CONTEXT] includes regulatory or safety requirements, prioritize conservative resolution and flag any value that could be misinterpreted.

Before wiring this into production, test it against a golden set of known conflicts where you already know the correct resolution. Measure whether the model applies your resolution rules consistently and whether it correctly flags ambiguous cases instead of guessing. If your domain is regulated, add a human review step for any record where conflicts_ambiguous is greater than zero or overall_confidence falls below your threshold. The next section covers how to build that validation harness.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the conflict resolution prompt needs to work reliably. Validate each before sending to avoid garbage-in/garbage-out resolution behavior.

PlaceholderPurposeExampleValidation Notes

[DOCUMENT_TEXT]

Full text of the source document containing contradictory extractions

The contract states the effective date is January 15, 2024. However, Section 4.2 references a start date of February 1, 2024.

Required. Must be non-empty string. Truncate if exceeding model context window. Preserve section headers and paragraph structure for span anchoring.

[EXTRACTED_FIELDS]

Array of field objects with conflicting values extracted from the document

[{"field_name":"effective_date","values":["2024-01-15","2024-02-01"],"sources":["Section 1.1","Section 4.2"],"extraction_confidence":[0.92,0.88]}]

Required. Must be valid JSON array. Each object requires field_name, values array, sources array, and extraction_confidence array. Arrays must have matching lengths. Reject if values array is empty.

[RESOLUTION_RULES]

Ordered list of precedence rules for resolving field-level conflicts

["Prefer explicit dates over relative dates","Prefer values from Definitions section over body text","When confidence difference > 0.15, prefer higher confidence"]

Optional. If null, prompt uses default heuristics. If provided, must be valid JSON string array. Rules are applied in order. Validate no circular rule dependencies.

[TARGET_SCHEMA]

JSON Schema describing the expected output record structure

{"type":"object","properties":{"effective_date":{"type":"string","format":"date"}},"required":["effective_date"]}

Required. Must be valid JSON Schema draft-07 or later. Include required field constraints. Validate schema parses before sending. Reject schemas with unsupported formats.

[CONFIDENCE_THRESHOLD]

Minimum confidence score for auto-accepting a resolution without human review flag

0.85

Required. Must be float between 0.0 and 1.0. Values below 0.5 produce excessive review flags. Values above 0.95 may suppress legitimate ambiguity. Default 0.80 if not specified.

[MAX_RESOLUTIONS]

Upper bound on number of conflict resolutions to attempt in a single call

12

Optional. Must be positive integer. Prevents runaway token usage on heavily conflicted documents. Default 20. If conflicts exceed limit, prompt returns unresolved remainder with escalation flag.

[OUTPUT_LOCALE]

Locale for date formatting, number formatting, and currency normalization in resolved output

en-US

Optional. Must be valid BCP 47 language tag. Affects date string formatting in resolved fields. Default en-US. Validate against supported locale list before sending.

[AMBIGUITY_POLICY]

Instruction for how to handle ties where no resolution rule produces a clear winner

preserve_all_with_flags

Required. Must be one of: preserve_all_with_flags, select_highest_confidence, escalate_to_human, or mark_unresolved. Controls whether ambiguity is surfaced or silently resolved. preserve_all_with_flags recommended for audit trails.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Conflict Resolution Prompt into a production extraction pipeline with validation, retries, and audit trails.

The Conflict Resolution Prompt for Extracted Fields is not a standalone utility—it is a pipeline stage that sits between raw field extraction and record assembly. In a production system, you will typically call this prompt after multiple extraction passes or models have produced contradictory values for the same field within a single document. The prompt expects a structured input containing the conflicting extractions, their source spans, confidence scores, and any extraction metadata. You should wrap this prompt in an application harness that validates inputs before sending them, parses the resolved output against a known schema, and routes ambiguous resolutions to a human review queue when the model's own confidence falls below your operational threshold.

The harness should enforce a strict input contract. Before calling the model, validate that each conflicting field entry includes: the field name, the list of contradictory values, each value's source span (character offsets or paragraph references), and per-extraction confidence scores. If any required field is missing, reject the input early rather than sending incomplete data to the model. On the output side, parse the resolved record against a schema that requires resolved_value, resolution_rationale, conflict_annotation (a structured object describing what was dropped and why), and adjusted_confidence. If the model returns a confidence below your configured threshold—typically 0.7 for high-stakes pipelines—route the record to a human review queue with the original conflicting extractions and the model's rationale attached. Log every resolution decision, including cases where the model chose to preserve ambiguity rather than force a resolution, as these are critical signals for improving extraction quality upstream.

For model choice, prefer a model with strong instruction-following and structured output capabilities. GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro all perform well on this task when given explicit output schemas. Use response_format with a JSON schema if your provider supports it; otherwise, include the schema inline in the prompt and validate the output with a JSON Schema validator before accepting it. Implement a retry loop with a maximum of two retries for malformed outputs. On the first retry, include the validation error message in the retry prompt. On the second failure, log the failure, preserve the original conflicting extractions, and escalate to human review. Do not silently drop records that fail resolution—missing data is often worse than ambiguous data in downstream systems.

This prompt works best when integrated into a broader extraction pipeline that already produces per-field confidence scores and source spans. If your upstream extraction step does not provide these, you will need to add a pre-processing stage that annotates extractions with span references and confidence estimates before conflict resolution can run. Avoid using this prompt as a substitute for improving extraction quality at the source. If you find that more than 20% of records trigger the conflict resolution stage, investigate whether your extraction prompts, models, or document preprocessing need improvement. The conflict resolver is a safety net, not a primary extraction strategy.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, format, and validation rules for the resolved record produced by the conflict resolution prompt. Use this contract to validate model output before ingestion.

Field or ElementType or FormatRequiredValidation Rule

resolved_record

object

Must be a valid JSON object matching the [TARGET_SCHEMA] structure. All required fields from [TARGET_SCHEMA] must be present.

resolved_record.[FIELD_NAME]

per [TARGET_SCHEMA]

Each field value must satisfy its schema type, enum constraints, and format rules. Null is allowed only if the field is nullable in [TARGET_SCHEMA].

conflict_annotations

array of objects

Array must not be empty if any field had conflicting extractions. Each entry must include field_name, conflicting_values, resolution_rationale, and resolved_value.

conflict_annotations[].field_name

string

Must exactly match a field key present in resolved_record. No orphan annotations for fields not in the output.

conflict_annotations[].conflicting_values

array

Must contain at least two distinct values extracted from the source document. Each value must include source_span and extraction_confidence.

conflict_annotations[].resolution_rationale

string

Must be a non-empty string explaining why the resolved value was chosen. Must reference document evidence, priority rules, or confidence comparison.

confidence_adjustments

object

Keys must match field names in resolved_record. Values must be floats between 0.0 and 1.0. Adjusted confidence must not exceed original extraction confidence without documented justification.

unresolvable_ambiguities

array of objects

If present, each entry must include field_name, retained_values, and reason_for_retention. Null allowed if no unresolvable ambiguities exist.

PRACTICAL GUARDRAILS

Common Failure Modes

Conflict resolution prompts fail in predictable ways. These are the most common failure modes when reconciling contradictory extractions within a single document, along with practical guardrails to catch them before they reach production.

01

Silent Overwrite Without Rationale

What to watch: The model picks one conflicting value and drops the other without explaining why. The losing extraction disappears from the output entirely, making the resolution unauditable. Guardrail: Require a resolution_rationale field for every conflict. Validate that every resolved field with multiple source candidates has a non-empty rationale. Flag empty rationales for human review.

02

False Consensus on Ambiguous Fields

What to watch: The model treats low-confidence or contradictory extractions as agreeing when they don't, collapsing ambiguity into a single overconfident value. This is common with numeric ranges, partial dates, and entity name variants. Guardrail: Add an ambiguity_preserved boolean flag to the output schema. Run eval checks that verify ambiguous inputs produce ambiguity_preserved: true rather than a forced resolution. Compare pre-resolution and post-resolution confidence deltas.

03

Hallucinated Reconciliation Fields

What to watch: The model invents a compromise value that appears in neither source extraction—splitting the difference between two numbers, averaging dates, or synthesizing a name variant not present in the document. Guardrail: Require every resolved field value to be traceable to at least one source extraction span. Add a source_span_reference field. Run a post-resolution grounding check: if the resolved value doesn't appear in any source span, flag it for human review.

04

Confidence Inflation After Resolution

What to watch: The model assigns higher confidence to the resolved record than any individual source extraction had, as if resolving conflicts magically increased certainty. Guardrail: Cap the resolved field confidence at the maximum confidence of its source extractions. Add a validation rule: resolved_confidence <= max(source_confidences). Log violations as confidence anomalies and route to a review queue.

05

Dropped Conflicts in Nested or Array Fields

What to watch: The model resolves top-level field conflicts correctly but silently drops contradictions inside nested objects or arrays—conflicting list items, sub-object disagreements, or array ordering disputes. Guardrail: Apply conflict detection recursively. Validate that every nested field with multiple source values has a corresponding conflict annotation. Use a schema-aware validator that walks the full output tree, not just top-level keys.

06

Premature Resolution Without Exhausting Context

What to watch: The model resolves a conflict using only the immediate surrounding sentence, missing disambiguating evidence elsewhere in the document—a later clarification, a footnote, or a table that settles the contradiction. Guardrail: Include a context_window_used field documenting which document sections were consulted. Run eval tests where disambiguating evidence is deliberately placed far from the conflict site. Flag resolutions that didn't reference the clarifying section.

IMPLEMENTATION TABLE

Evaluation Rubric

How to test output quality before shipping. Run these checks against a golden dataset of documents with known conflicts and expected resolutions.

CriterionPass StandardFailure SignalTest Method

Conflict Detection Recall

All known conflicts in the golden dataset are detected and surfaced in the conflict annotations array

Missing conflict entries in output; known contradictory fields appear resolved without annotation

Run against golden dataset with pre-labeled conflicts; assert len(output.conflicts) >= len(expected_conflicts)

Resolution Accuracy

Resolved value matches the expected resolution from the golden dataset for each conflict

Resolved field contains the wrong value; resolution chose the weaker source without justification

Field-level comparison between output.resolved_record and expected_resolved_record; assert exact match on resolved fields

Resolution Rationale Completeness

Every conflict entry includes a non-empty rationale string that references specific evidence from the document

Empty or generic rationale strings; rationale that restates the conflict without explaining the choice

Assert output.conflicts[*].rationale is non-null and contains at least one document-derived fact or quote

Confidence Adjustment Validity

Adjusted confidence scores are lower than the original per-field confidence scores for any resolved conflict

Confidence score remains unchanged or increases after conflict resolution; confidence exceeds 1.0 or is negative

Assert output.resolved_record[*].confidence < original_field.confidence for every field that appeared in a conflict

Ambiguity Preservation

Fields where the golden dataset marks ambiguity as 'unresolvable' are flagged with ambiguity=true and no forced resolution

Ambiguous fields are silently resolved to one value; ambiguity flag is false or missing when evidence is evenly split

Check output.conflicts[*].ambiguity == true for pre-labeled ambiguous cases; assert resolved value is null or marked as deferred

Schema Compliance

Output matches the expected JSON schema including all required fields, correct types, and enum values

Missing required fields; wrong types; extra fields not in schema; null values where schema requires a value

Validate output against JSON Schema using a validator library; assert schema.validate(output) passes without errors

Source Grounding Audit

Every resolved field can be traced back to a specific document span via the provenance array

Resolved fields with no provenance entry; provenance spans that do not exist in the source document

For each field in output.resolved_record, assert output.provenance[field].span exists and is substring-matchable in source text

Hallucination Check

No resolved field contains a value that cannot be found in or reasonably inferred from the source document

Output contains a name, date, amount, or identifier not present in the source; fabricated resolution rationale

Diff output.resolved_record values against source document tokens; flag any value with zero overlap as potential hallucination

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model (GPT-4o, Claude 3.5 Sonnet). Accept the default JSON output without strict schema enforcement. Focus on getting the resolution logic right before adding validation layers.

code
[SYSTEM]: You are a data quality assistant. Given multiple extractions of the same field from a single document, resolve conflicts and return a JSON record with [RESOLVED_FIELD], [CONFLICT_NOTES], and [CONFIDENCE].

Watch for

  • Missing schema checks leading to downstream ingestion failures
  • Overly broad instructions that merge fields without documenting the conflict
  • Model inventing resolution rationale when no conflict exists
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.