Inferensys

Prompt

Source Ambiguity Flagging Prompt

A practical prompt playbook for using Source Ambiguity Flagging Prompt in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Identifies when a claim's source attribution is ambiguous and requires human judgment before writing to a system of record.

This prompt is designed for review queue designers and data quality engineers operating in the middle of an extraction pipeline. After a claim has been extracted from a corpus and candidate source spans have been retrieved, this prompt determines whether the claim's provenance is clear or ambiguous. The core job-to-be-done is preventing incorrect or misleading attributions from being written into a system of record by flagging cases where multiple sources could reasonably support the same claim. The ideal user is someone building an audit-grade extraction system who needs a reliable gating mechanism before final attribution decisions are made.

Use this prompt when you have a structured claim object and a set of candidate source spans, each with their own text content and metadata. The prompt expects inputs like [CLAIM_TEXT], [CANDIDATE_SOURCES] (an array of objects with source_id, span_text, and optional metadata), and [AMBIGUITY_THRESHOLD] to calibrate sensitivity. It is not suitable for initial claim extraction, source retrieval, or final attribution decisions. Do not use this prompt when you have only one candidate source, when the claim is a direct quote with an unambiguous origin, or when you need a simple binary match/no-match decision. The output is a structured ambiguity assessment, not a resolved attribution.

In production, this prompt should sit between your retrieval step and your system-of-record write step. The output flags ambiguous spans, scores the severity of ambiguity on a defined scale, and suggests resolution paths such as 'human review required,' 'merge sources with annotation,' or 'escalate for domain expert.' Before deploying, validate the prompt against a golden set of claims with known ambiguity labels to calibrate the threshold. Common failure modes include the model treating stylistic variation as semantic ambiguity, missing subtle contradictions between sources, or over-flagging when sources are paraphrases of each other. Always log the ambiguity score and resolution path for auditability, and ensure that any claim flagged for human review is held in a quarantine queue until resolved.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Source Ambiguity Flagging Prompt delivers value and where it creates risk. Use these cards to decide if this prompt belongs in your review pipeline.

01

Good Fit: Multi-Source Corpora

Use when: a single claim could reasonably be supported by multiple source spans across different documents, pages, or sections. Guardrail: the prompt excels at surfacing ambiguity that a simple citation extractor would miss, reducing false certainty in downstream audit trails.

02

Bad Fit: Single-Source Extraction

Avoid when: every claim maps to exactly one unambiguous source span with no overlap. Guardrail: the ambiguity scoring adds latency and review-queue noise without benefit. Use a direct claim-to-span anchoring prompt instead.

03

Required Input: Pre-Extracted Claims and Source Spans

What to watch: the prompt assumes claims and candidate source spans already exist. Feeding raw text without prior extraction produces unreliable ambiguity scores. Guardrail: run claim extraction and span anchoring prompts first, then pass their output as structured input to this prompt.

04

Operational Risk: Review Queue Flooding

What to watch: low ambiguity thresholds can flag nearly every claim for human review, overwhelming operations teams. Guardrail: calibrate the ambiguity score threshold against a labeled sample. Start with a higher threshold and lower it only when review capacity allows.

05

Operational Risk: Resolution Path Quality

What to watch: the prompt suggests resolution paths, but those suggestions can be wrong or impractical. Guardrail: treat resolution paths as triage hints, not final decisions. Always log which path was suggested versus which was taken by the human reviewer for later prompt improvement.

06

Variant: Confidence-Weighted Ambiguity

Use when: source spans have pre-existing confidence scores from an extraction step. Guardrail: modify the prompt to accept confidence weights as input and factor them into the ambiguity score. A low-confidence span competing with a high-confidence span is a different class of ambiguity than two high-confidence spans in conflict.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt that flags ambiguous source spans and routes them for human resolution.

The following prompt template is designed to be pasted directly into your prompt layer. It identifies spans in the provided text where a claim could reasonably be attributed to multiple sources, assigns an ambiguity score, and suggests a resolution path. Replace every square-bracket placeholder with the values specific to your document, schema, and operational context before sending the request to the model.

text
You are an audit-grade source attribution analyst. Your task is to examine the provided document and flag every span where a factual claim could reasonably be attributed to more than one source.

## INPUT
Document text:
[INPUT_TEXT]

Known source list (if available):
[SOURCE_LIST]

## OUTPUT SCHEMA
Return a JSON object with the key "ambiguous_spans" containing an array of objects. Each object must have the following fields:
- "span_text": The exact text of the ambiguous span.
- "span_offset": Character start and end offsets of the span in the original text, as [start, end].
- "claim": A concise statement of the claim made in the span.
- "candidate_sources": An array of source identifiers that could reasonably support this claim.
- "ambiguity_score": A float between 0.0 and 1.0, where 1.0 means completely ambiguous (multiple equally valid sources) and 0.0 means clearly attributable to a single source.
- "ambiguity_rationale": A brief explanation of why the span is ambiguous.
- "suggested_resolution": One of "human_review", "majority_vote", "most_recent_source", or "most_authoritative_source".
- "reviewer_notes": A placeholder string for a human reviewer to fill, initially set to an empty string.

## CONSTRAINTS
- Do not flag spans that are clearly attributable to a single source.
- Do not flag opinion, interpretation, or speculative language as ambiguous unless the underlying factual claim is ambiguous.
- If no ambiguous spans are found, return an empty array.
- Preserve the exact text of the span; do not paraphrase or truncate.
- If the document contains no sources at all, flag every factual claim with an ambiguity_score of 1.0 and set suggested_resolution to "human_review".

## EXAMPLES
Example input: "The CEO announced record profits in Q3 (Source A). Industry analysts also reported strong performance for the company in the same period (Source B)."
Example output:
{
  "ambiguous_spans": [
    {
      "span_text": "strong performance for the company in the same period",
      "span_offset": [98, 150],
      "claim": "The company had strong performance in Q3.",
      "candidate_sources": ["Source A", "Source B"],
      "ambiguity_score": 0.8,
      "ambiguity_rationale": "Source A implies strong performance via record profits; Source B explicitly states strong performance. Both support the claim.",
      "suggested_resolution": "human_review",
      "reviewer_notes": ""
    }
  ]
}

## RISK_LEVEL
[RISK_LEVEL] 
// Set to "high" if the output feeds compliance or legal workflows; "medium" for internal review queues; "low" for exploratory analysis.

To adapt this template, start by replacing [INPUT_TEXT] with the full document content and [SOURCE_LIST] with a structured list of known sources referenced in the document. If your application does not maintain a pre-parsed source list, you can omit that section or instruct the model to infer sources from inline citations. The [RISK_LEVEL] placeholder controls downstream behavior: in high-risk contexts, every flagged span should be routed to a human review queue with the reviewer_notes field populated before any automated action is taken. For production deployments, validate the output JSON against the schema before ingestion, and log any spans where ambiguity_score exceeds your operational threshold for automated escalation.

IMPLEMENTATION TABLE

Prompt Variables

Required and optional inputs for the Source Ambiguity Flagging Prompt. Each placeholder must be populated before the prompt is sent to the model. Validation notes describe how to verify the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[CLAIM]

The extracted claim whose source provenance is being evaluated for ambiguity

The defendant was present at the scene on March 12

Must be a single, self-contained factual assertion. Reject if empty, multi-sentence, or purely subjective

[SOURCE_CANDIDATES]

A list of source spans that could potentially support the claim, each with a unique identifier and full text

Source A: Page 4, Para 2: 'Witness saw defendant arrive at 8pm.' Source B: Page 7, Para 1: 'Security footage shows entry at 8:05pm.'

Must contain at least 2 source candidates. Each must have a unique ID, location reference, and non-empty text span. Reject if fewer than 2 candidates

[DOCUMENT_CONTEXT]

The full document or section text surrounding each source candidate, providing context needed to resolve ambiguity

Full deposition transcript pages 3-10, or complete contract section 4.2

Must be non-empty. Should be large enough to disambiguate temporal, entity, or referential ambiguity. Warn if context is truncated to under 500 characters per candidate

[AMBIGUITY_THRESHOLD]

The minimum ambiguity score that triggers flagging for human review, expressed as a float between 0.0 and 1.0

0.6

Must be a float between 0.0 and 1.0 inclusive. Default to 0.5 if not specified. Reject values outside range

[RESOLUTION_PATHS]

A list of acceptable resolution actions the model can recommend, such as human review, source priority rules, or additional retrieval

human_review, apply_source_priority, request_additional_context

Must be a non-empty array of strings from a predefined enum. Reject unknown resolution path values. Default to ['human_review'] if omitted

[OUTPUT_SCHEMA]

The expected JSON schema for the ambiguity report, defining fields for claim, candidate scores, selected source, ambiguity rationale, and resolution recommendation

See output contract for full field definitions

Must be a valid JSON Schema object. Validate with a schema validator before prompt assembly. Reject if missing required fields: claim_id, ambiguity_score, resolution_path

[MAX_CANDIDATES]

The maximum number of source candidates to evaluate in a single prompt call, used to control token usage and latency

5

Must be a positive integer between 2 and 20. Default to 10 if not specified. Warn if input exceeds this value and truncation will occur

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Source Ambiguity Flagging Prompt into a review queue application with validation, retries, and human escalation.

The Source Ambiguity Flagging Prompt is designed to sit between extraction and human review. It should be called after a claim has been extracted and its candidate source spans identified, but before the claim is committed to a downstream system of record. The prompt expects a structured input containing the claim text and a list of candidate source spans with their full context. It returns an ambiguity score, a primary source recommendation, and a structured resolution path. This output feeds directly into a review queue UI where human analysts can accept, override, or escalate the recommendation.

Wire this prompt into an application as a post-extraction processing step. After your extraction pipeline produces a claim and its candidate sources, construct the input payload with the claim in [CLAIM_TEXT] and each candidate source as an object with source_id, span_text, and surrounding_context fields. Call the model with a low temperature setting (0.0–0.2) to maximize consistency in ambiguity scoring. Validate the response against a strict JSON schema that requires ambiguity_score (0.0–1.0), primary_source_id (nullable), flagged_for_review (boolean), ambiguity_type (enum: multiple_viable_sources, insufficient_context, conflicting_evidence, none), and resolution_path (enum: auto_accept_primary, human_review_required, escalate_for_investigation). If the response fails schema validation, retry once with the validation error appended to the prompt as a correction hint. If the retry also fails, route the claim directly to the human review queue with a validation_failure flag.

Log every invocation with the input claim, candidate sources, model response, validation result, and final routing decision. This audit trail is critical for compliance workflows where source attribution decisions must be defensible. For high-stakes domains such as legal or clinical review, configure the system to route all claims with ambiguity_score > 0.3 to human review regardless of the model's resolution_path recommendation. Use a review queue UI that displays the claim, all candidate source spans rendered side-by-side, the model's ambiguity score and rationale, and one-click actions for the reviewer to confirm, reassign, or escalate. Track reviewer decisions over time to measure alignment between model recommendations and human judgments, which serves as a continuous evaluation signal for prompt drift and model performance.

Avoid using this prompt as a real-time blocking step in latency-sensitive pipelines. The model call adds latency, and the human review step adds unpredictable delay. Instead, design your system to accept claims into a staging area, process ambiguity flags asynchronously, and only promote claims to the system of record after review is complete or the auto-accept threshold is met. For claims that are auto-accepted, still log the decision and retain the full ambiguity analysis for audit. Never silently drop ambiguous claims—every claim that enters this workflow must either be resolved or explicitly deferred with a tracked reason.

IMPLEMENTATION TABLE

Expected Output Contract

Fields returned by the Source Ambiguity Flagging Prompt. Every field must pass the listed validation rule before the output enters a review queue or downstream system.

Field or ElementType or FormatRequiredValidation Rule

claim_text

string

Must be a non-empty string extracted verbatim or closely paraphrased from [INPUT_TEXT]. Length must be between 10 and 2000 characters.

source_spans

array of objects

Array must contain at least 2 objects. Each object must include source_id (string), span_start (integer), span_end (integer), and span_text (string). span_text must match [INPUT_TEXT] substring at given offsets.

source_spans[].source_id

string

Must match a source_id provided in [SOURCE_METADATA]. Null or missing IDs are not allowed.

source_spans[].span_start

integer

Must be a non-negative integer. span_start must be less than span_end. Offsets must be valid character indices in [INPUT_TEXT].

source_spans[].span_end

integer

Must be a positive integer. span_end must be greater than span_start. Offsets must be valid character indices in [INPUT_TEXT].

source_spans[].span_text

string

Must exactly match the substring of [INPUT_TEXT] from span_start to span_end. Leading/trailing whitespace differences trigger a validation failure.

ambiguity_score

number

Must be a float between 0.0 and 1.0 inclusive. Score of 0.0 means no ambiguity; 1.0 means maximum ambiguity. Values outside range trigger a retry.

ambiguity_type

string

Must be one of the allowed enum values: overlapping_support, conflicting_sources, vague_attribution, multiple_interpretations, or incomplete_context. Unknown values trigger a schema rejection.

resolution_paths

array of strings

Array must contain 1-3 actionable resolution suggestions. Each string must be 20-500 characters. Suggestions like 'review manually' are acceptable only if accompanied by a specific instruction.

recommended_action

string

Must be one of: escalate_to_human, auto_select_primary, flag_for_review, or suppress_claim. Value must be consistent with ambiguity_score threshold defined in [CONSTRAINTS].

primary_source_candidate

object

If present, must include source_id and rationale (string, 20-500 chars). source_id must exist in source_spans. Required when recommended_action is auto_select_primary.

PRACTICAL GUARDRAILS

Common Failure Modes

Source ambiguity flagging is brittle when the model defaults to a single source, ignores conflicting evidence, or produces unactionable ambiguity scores. These failure modes and guardrails help you build a review queue that actually reduces resolution time.

01

Single-Source Defaulting Under Ambiguity

What to watch: The model selects the first plausible source span and ignores equally valid alternatives, producing a false sense of certainty. This happens most often when multiple sources paraphrase the same claim with different wording. Guardrail: Require the prompt to enumerate all candidate spans before selecting one, and add a validator that rejects outputs with only one candidate when the input contains overlapping source material.

02

Ambiguity Score Inflation

What to watch: The model assigns high ambiguity scores to trivial wording differences while missing genuine conflicts—such as two sources reporting different figures for the same metric. The score becomes noise instead of a reliable escalation signal. Guardrail: Include a few-shot example that contrasts trivial ambiguity (wording variants) with substantive ambiguity (factual conflict), and calibrate scores against a human-annotated set of 20–30 cases before production.

03

Resolution Path Hallucination

What to watch: The model invents a resolution—such as claiming one source is more authoritative without evidence—instead of flagging the conflict for human review. This defeats the purpose of the review queue. Guardrail: Constrain the output schema so that resolution paths are drawn from a closed enum: HUMAN_REVIEW, SOURCE_PRIORITY_RULE, CORROBORATION_CHECK, INSUFFICIENT_EVIDENCE. Reject any output that invents a resolution not in the enum.

04

Span Boundary Drift

What to watch: The model cites a source span that is adjacent to the supporting evidence but does not actually contain it—such as citing the paragraph before or after the relevant sentence. Downstream reviewers waste time chasing wrong offsets. Guardrail: Add a post-extraction validation step that retrieves the cited span text and checks whether it semantically entails the claim. Flag any span where entailment confidence is below a threshold for re-extraction or human review.

05

Silent Null Handling on Missing Sources

What to watch: When no source clearly supports a claim, the model either omits the ambiguity flag entirely or hallucinates a weak source match. The review queue never sees the gap. Guardrail: Require an explicit NO_SOURCE_IDENTIFIED flag in the output schema with a required rationale field. Add an eval check that verifies this flag appears for claims with zero supporting spans in the ground truth.

06

Cross-Document Source Confusion

What to watch: When the same claim appears across multiple documents with different provenance, the model conflates sources—attributing a claim to Document A when the evidence is actually in Document B. This is especially common with similar document titles or repeated boilerplate. Guardrail: Include document-level metadata in every source span reference (document ID, page, section) and add a cross-reference validator that confirms the cited document actually contains the quoted span text before the output reaches the review queue.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Source Ambiguity Flagging Prompt before integrating it into a review queue. Each criterion targets a specific failure mode observed in production ambiguity detection.

CriterionPass StandardFailure SignalTest Method

Ambiguity Detection Recall

Flags at least 90% of spans where multiple sources could reasonably support a claim in a golden dataset of 50 pre-labeled ambiguous passages.

Misses obvious ambiguous spans where two sources state conflicting but plausible facts about the same entity.

Run prompt against golden dataset with known ambiguous spans. Calculate recall: flagged spans / total known ambiguous spans.

Ambiguity Detection Precision

At least 80% of flagged spans are genuinely ambiguous upon human review. No more than 20% false positive rate.

Flags spans where only one source exists or where sources are not actually in conflict, inflating the review queue with noise.

Human reviewer evaluates 100 randomly sampled flagged spans. Calculate precision: true ambiguous / total flagged.

Ambiguity Score Calibration

Ambiguity scores correlate with human severity ratings at Spearman rho >= 0.7. High scores map to cases requiring immediate human resolution.

Low-ambiguity spans receive high scores, or genuinely confusing conflicts receive low scores, causing mis-prioritization in the review queue.

Collect ambiguity scores and human severity ratings (1-5) for 100 spans. Calculate Spearman rank correlation.

Source Span Accuracy

Every flagged span includes correct source references. Offsets match the actual text. No hallucinated page numbers or section labels.

Source references point to wrong pages, fabricated line numbers, or spans that do not contain the claimed text.

For 50 flagged spans, manually verify each source reference against the original document. Check offset, page, and section accuracy.

Resolution Path Relevance

At least 85% of suggested resolution paths are actionable and appropriate for the ambiguity type.

Suggests resolution paths that do not match the ambiguity type, such as recommending source priority ranking when the issue is conflicting terminology.

Human reviewer classifies ambiguity type and evaluates whether the suggested resolution path is appropriate. Calculate match rate.

Null Source Handling

Correctly distinguishes between missing sources, redacted sources, and unattributed claims. Produces structured null reasons for each case.

Collapses all null source cases into a generic 'no source' label, losing information needed for downstream triage.

Feed 30 passages with known null source types. Verify output null reason field matches expected category.

Multi-Source Conflict Flagging

When three or more sources conflict, flags all conflicting source pairs and identifies the majority vs minority positions.

Only flags the first two conflicting sources and ignores additional conflicts, or fails to identify which sources agree with each other.

Feed 20 passages with 3+ conflicting sources. Verify all conflict pairs are flagged and majority/minority positions are correctly labeled.

Output Schema Compliance

Output strictly matches the defined schema. All required fields present. No extra fields. Enum values match allowed sets.

Missing required fields, extra unstructured text outside schema, or enum values that do not match the allowed list.

Validate output against JSON Schema. Check field presence, types, and enum membership programmatically.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single model call and minimal post-processing. Replace [AMBIGUITY_THRESHOLD] with a fixed value like 0.5. Skip structured output enforcement—accept JSON or markdown and parse loosely.

Watch for

  • The model may return prose instead of structured ambiguity records
  • Threshold tuning is guesswork without labeled examples
  • No deduplication of overlapping ambiguous spans
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.