This prompt is designed for verification engineers who need to merge evidence retrieved from multiple sources—such as vector databases, keyword search APIs, and internal knowledge bases—before matching that evidence against claims. The core job-to-be-done is resolving evidence duplication, conflicting provenance, and inconsistent ranking that occurs when independent retrievers return overlapping results for the same claim. The ideal user is a platform engineer or pipeline builder operating a batch verification workflow, not an end-user interacting with a chatbot. You should use this prompt when you have raw evidence sets from two or more retrieval systems and need a single, deduplicated, ranked evidence collection with preserved source attribution. It belongs strictly between the retrieval and claim-evidence matching stages in a verification pipeline.
Prompt
Multi-Source Evidence Aggregation Prompt Template

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and boundaries for the Multi-Source Evidence Aggregation Prompt Template.
Do not use this prompt when you have a single retrieval source, as deduplication and provenance merging are unnecessary overhead. It is also inappropriate for real-time, single-query chat scenarios where latency constraints preclude batch aggregation. This prompt assumes that upstream retrievers have already returned structured evidence objects with fields like source_id, text, relevance_score, and retrieval_method. If your retrievers return unstructured text or lack provenance metadata, you must normalize the inputs before invoking this aggregation step. The prompt is not a substitute for a vector database's built-in fusion algorithms; it is a programmatic merge layer for heterogeneous sources that cannot be combined at the retrieval infrastructure level.
Before integrating this prompt into your pipeline, ensure you have defined a clear evidence schema that all upstream retrievers conform to. The output of this prompt feeds directly into claim-evidence matching, so any loss of source attribution or incorrect deduplication will propagate errors downstream. Start by testing with small, known-overlap evidence sets where you can manually verify deduplication accuracy and ranking consistency. Avoid using this prompt as a black box; pair it with eval checks for deduplication precision, source attribution preservation, and ranking correlation with human judgments before scaling to production batch sizes.
Use Case Fit
Where the Multi-Source Evidence Aggregation prompt works, where it fails, and what inputs it assumes.
Good Fit: Multi-Retriever RAG Pipelines
Use when: you have claims that need evidence from multiple independent retrieval systems (vector DB, keyword search, API, knowledge graph) and must merge results before matching. Guardrail: Ensure each retriever returns source metadata before aggregation; the prompt cannot fix missing provenance.
Bad Fit: Single-Source Verification
Avoid when: all evidence comes from one retriever or knowledge base. The deduplication and ranking overhead adds latency and token cost without benefit. Guardrail: Route single-source claims to a direct evidence-matching prompt instead.
Required Inputs
Must provide: a list of claims, evidence sets from each retriever with source IDs and retrieval scores, and a deduplication threshold. Guardrail: Validate that every evidence item carries a persistent source identifier before aggregation; lost provenance breaks downstream audit trails.
Operational Risk: Source Attribution Collapse
Risk: the model merges evidence from multiple sources into a single summary and drops individual source references. Guardrail: Require the output schema to preserve a sources array per evidence item and validate post-hoc that every aggregated piece traces back to at least one retriever origin.
Operational Risk: Deduplication Over-Aggression
Risk: near-duplicate evidence with subtle differences (dates, qualifiers, conflicting numbers) gets collapsed into one entry, losing critical nuance. Guardrail: Set a conservative deduplication threshold and route borderline near-duplicates to a human review flag rather than silently merging.
Latency and Cost Sensitivity
Risk: aggregating evidence from many retrievers per claim multiplies token usage and response time, especially in batch pipelines. Guardrail: Implement a retrieval budget per claim and truncate low-relevance results before aggregation. Monitor per-claim token counts and set circuit breakers for runaway evidence sets.
Copy-Ready Prompt Template
A copy-ready prompt for merging, deduplicating, and ranking evidence from multiple retrievers into a single, provenance-tracked evidence set.
This prompt template is the core instruction set for a multi-source evidence aggregation step in your verification pipeline. It is designed to receive evidence chunks from multiple upstream retrievers (e.g., a vector database, a keyword search engine, and a web search API), deduplicate them, rank them by relevance and authority, and produce a clean, unified evidence set with full provenance tracking. The output is intended to be consumed by a downstream claim-to-evidence matching prompt, so the structure must be predictable and machine-readable.
textYou are an evidence aggregation engine in a fact-checking pipeline. Your task is to merge multiple evidence sets, deduplicate semantically equivalent information, rank the remaining evidence by relevance and source authority, and output a structured, deduplicated evidence set with full provenance. ## INPUT You will receive the following: - [CLAIM]: A single, atomic claim to verify. - [EVIDENCE_SOURCES]: A list of evidence sets from different retrievers. Each set has a `source_retriever` name and a list of `chunks`. Each chunk has an `id`, `text`, `source_document_uri`, and `retrieval_score`. ## TASK 1. **Semantic Deduplication:** Identify chunks that convey the same factual information. For each group of near-duplicates, select the single best representative chunk based on the highest `retrieval_score` and most authoritative `source_document_uri`. Do not merge text from different chunks. 2. **Contradiction Flagging:** If two chunks directly contradict each other on a factual point relevant to the claim, flag both for human review instead of selecting one. 3. **Relevance Ranking:** Rank all unique, non-contradicted chunks by their relevance to the [CLAIM]. Use a relevance score from 0.0 to 1.0. 4. **Provenance Tracking:** For every chunk in the final output, preserve its original `id`, `source_document_uri`, and a list of `source_retrievers` that returned it. ## OUTPUT SCHEMA You must output a single JSON object with the following structure: { "claim": "[The original claim text]", "deduplicated_evidence": [ { "chunk_id": "string", "text": "string", "source_document_uri": "string", "relevance_score": 0.0-1.0, "source_retrievers": ["string"], "is_contradiction": false, "contradicts_chunk_id": null } ], "contradiction_flags": [ { "chunk_id_a": "string", "chunk_id_b": "string", "reason": "Brief explanation of the contradiction." } ], "dedup_summary": { "original_chunk_count": 0, "deduplicated_chunk_count": 0, "contradiction_count": 0 } } ## CONSTRAINTS - Do not fabricate or summarize evidence. Only use text verbatim from the provided chunks. - If no evidence is provided or all evidence is irrelevant, return an empty `deduplicated_evidence` array and explain in a `processing_notes` field. - Preserve all original `chunk_id` values exactly as provided. - If the [RISK_LEVEL] is 'high', you must flag any evidence from sources not in the [AUTHORIZED_SOURCE_LIST] for human review.
To adapt this template, replace the square-bracket placeholders with your pipeline's runtime data. The [CLAIM] should be a single, atomic string from your claim extraction step. The [EVIDENCE_SOURCES] payload must be a pre-serialized JSON array matching the described structure. For high-stakes domains like healthcare or finance, set [RISK_LEVEL] to 'high' and provide an [AUTHORIZED_SOURCE_LIST] to enforce source allowlisting. After pasting this prompt into your verification harness, run it against a golden dataset of known duplicates and contradictions to calibrate the deduplication accuracy before production deployment.
Prompt Variables
Inputs required by the Multi-Source Evidence Aggregation prompt. Validate these before each call to prevent provenance loss, hallucinated citations, and deduplication failures.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CLAIM_LIST] | Array of discrete, atomic claims requiring evidence aggregation | ["Acme Corp revenue grew 22% YoY in Q3", "Acme Corp launched Product X in June"] | Schema check: must be a JSON array of strings. Each string must contain exactly one verifiable assertion. Reject if empty or contains compound claims. |
[RETRIEVED_EVIDENCE_SETS] | Collection of evidence batches from multiple retrievers, each with source metadata | [{"retriever_id": "news_db", "results": [{"text": "...", "source_url": "...", "retrieved_at": "..."}]}] | Schema check: must be an array of objects, each with retriever_id and results array. Each result must have text and source_url. Reject if any retriever_id is missing or duplicated. |
[AGGREGATION_STRATEGY] | Instruction for how to combine overlapping evidence from multiple sources | deduplicate_and_rank | Enum check: must be one of ['deduplicate_and_rank', 'merge_all', 'keep_per_retriever']. Default to 'deduplicate_and_rank' if null. Reject unrecognized values. |
[RANKING_CRITERIA] | Ordered list of factors for ranking aggregated evidence | ["source_authority", "recency", "relevance_to_claim"] | Schema check: must be a non-empty array of strings from allowed set ['source_authority', 'recency', 'relevance_to_claim', 'corroboration_count']. Reject if empty or contains unknown criteria. |
[DEDUP_THRESHOLD] | Semantic similarity threshold above which two evidence passages are considered duplicates | 0.85 | Type check: must be a float between 0.0 and 1.0. Default to 0.85 if null. Reject values below 0.5 to prevent over-merging. Log warning if above 0.95. |
[MAX_EVIDENCE_PER_CLAIM] | Upper limit on evidence passages returned per claim after aggregation | 5 | Type check: must be a positive integer. Default to 5 if null. Reject if 0. Cap at 20 to control context window and latency. Log warning if set above 10. |
[OUTPUT_SCHEMA] | Expected structure for the aggregated evidence output | {"claim": "string", "aggregated_evidence": [{"text": "string", "source_urls": ["string"], "retriever_ids": ["string"], "rank": "int"}]} | Schema check: must be a valid JSON Schema object. Validate that required fields include claim, aggregated_evidence, and source_urls. Reject schemas missing provenance fields. |
[PROVENANCE_TRACKING] | Flag controlling whether original source URLs and retriever IDs are preserved in output | Type check: must be boolean. Default to true. If false, log a compliance warning and require explicit approval for production use. Reject if null in regulated contexts. |
Implementation Harness Notes
How to wire the multi-source evidence aggregation prompt into a production verification pipeline with validation, retry, and observability.
The multi-source evidence aggregation prompt is not a standalone tool; it is a processing stage inside a larger verification pipeline. In production, this prompt sits between evidence retrieval and claim-to-evidence matching. It receives raw evidence sets from multiple retrievers—vector search, keyword search, API calls, knowledge base queries—and must produce a deduplicated, ranked, and provenance-tracked evidence bundle before matching begins. The implementation harness must enforce input contracts (each evidence item requires source_id, retrieval_method, content, and retrieval_timestamp), validate output shape (deduplicated list with canonical_id, merged_sources, rank_score, and provenance array), and handle failures without corrupting downstream stages.
Wire this prompt into your pipeline with a pre-processing validator, a retry wrapper, and a post-processing schema check. The pre-validator should reject inputs missing required fields or containing evidence from unauthorized sources. Use a retry policy with exponential backoff (initial delay 1s, max 3 retries) for transient model failures, but fail fast on schema violations—retrying a malformed input will not help. After the model responds, run a strict output validator that checks: every canonical_id is unique, every merged_sources entry references a valid input source_id, no evidence content is fabricated (compare hashes of input content against output content), and rank_score values fall within the expected range. For high-stakes verification domains, route outputs where deduplication confidence is below a threshold (e.g., rank_score < 0.7) to a human review queue with the original evidence sets attached. Log every aggregation run with pipeline_run_id, claim_id, input_source_count, output_deduplicated_count, dedup_ratio, latency_ms, and any validation failures for observability dashboards.
Choose your model tier based on evidence volume and complexity. For batches under 50 evidence items with straightforward text, a fast model like GPT-4o-mini or Claude Haiku works well. For larger sets, cross-lingual evidence, or high-precision requirements, use a more capable model and consider splitting the batch into chunks with overlapping windows to catch cross-boundary duplicates. Avoid the temptation to skip provenance tracking—every merged evidence item must carry forward all original source_id values so downstream matching can cite specific sources. If your pipeline includes a human review stage, pass the full provenance array to reviewers so they can assess source quality directly. The next step after aggregation is claim-to-evidence matching; ensure your output schema aligns with the matcher's expected input format to avoid contract breaks at the stage boundary.
Expected Output Contract
Fields, data types, and validation rules for the aggregated evidence response. Use this contract to validate the prompt output before passing it to downstream matching or scoring stages.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
aggregated_evidence | array of objects | Schema check: must be a non-empty array. If empty, escalate for human review. | |
aggregated_evidence[].claim_id | string | Parse check: must match the [CLAIM_ID] format from the input batch. No orphaned evidence allowed. | |
aggregated_evidence[].evidence_sources | array of objects | Schema check: must contain at least one source object per claim. Null or empty array triggers retry. | |
aggregated_evidence[].evidence_sources[].source_id | string | Citation check: must correspond to a valid [SOURCE_ID] from the retrieval context. Hallucinated IDs fail validation. | |
aggregated_evidence[].evidence_sources[].provenance | object | Schema check: must include retrieval_timestamp, retriever_name, and rank fields. Missing provenance blocks downstream audit. | |
aggregated_evidence[].deduplication_notes | string or null | Null allowed. If present, must describe which other source was merged and why. Free-text, human-reviewable. | |
aggregated_evidence[].ranked_evidence_text | array of strings | Content check: each string must be a verbatim excerpt from the source. Paraphrased or summarized text fails validation. | |
processing_metadata | object | Schema check: must include aggregation_timestamp, total_sources_retrieved, and sources_after_dedup fields for observability. |
Common Failure Modes
What breaks first when merging evidence from multiple retrievers and how to guard against it.
Duplicate Evidence Contamination
What to watch: Multiple retrievers return the same passage with different metadata, inflating apparent corroboration and skewing ranking scores. Guardrail: Implement semantic deduplication with configurable similarity thresholds before merging. Preserve all provenance records in a sources array even when deduplicating content.
Source Attribution Drift
What to watch: Merged evidence sets lose track of which retriever produced which result, breaking downstream citation chains and audit trails. Guardrail: Require each evidence item to carry a retriever_id, retrieval_timestamp, and query_used field. Validate attribution preservation in eval checks before accepting merged output.
Ranking Score Incomparability
What to watch: Different retrievers use incompatible relevance scores, making naive score-based merging produce misleading rankings. Guardrail: Normalize scores to a common scale using retriever-specific calibration or convert to ordinal ranks before aggregation. Log raw and normalized scores separately for debugging.
Evidence Conflict Silencing
What to watch: Aggregation logic that picks the highest-ranked evidence discards contradictory lower-ranked results, hiding important disagreements. Guardrail: Explicitly surface conflicting evidence in a contradictions field. Require the prompt to report when multiple sources disagree rather than silently selecting one.
Retriever Blind Spot Amplification
What to watch: All retrievers share the same blind spot (e.g., missing a key database), and aggregation reinforces the gap instead of flagging it. Guardrail: Include a coverage_gaps section in the output. Prompt the model to assess what types of evidence might be missing given the retrievers used and the claim domain.
Provenance Chain Breakage
What to watch: Intermediate aggregation steps drop original document references, making it impossible to trace a merged evidence item back to its source document. Guardrail: Maintain an immutable provenance_chain array per evidence item. Every transformation step must append to the chain, never replace it. Test with end-to-end traceability evals.
Evaluation Rubric
Run these checks on a golden dataset of 50-100 claims with known evidence sets. Each criterion targets a specific failure mode in multi-source evidence aggregation.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Deduplication Accuracy | Semantically equivalent evidence items are merged into a single canonical entry with all source references preserved | Duplicate evidence entries remain in the output set with overlapping content but different source labels | Compare output evidence count against known unique evidence count in golden set; flag false duplicates and false merges |
Source Attribution Preservation | Every evidence item in the output retains correct source identifier, retrieval method, and retrieval timestamp from input | Evidence items appear with missing, swapped, or fabricated source metadata after aggregation | For each output evidence item, verify source_id matches exactly one input source_id; check no orphaned or hallucinated sources |
Evidence Ranking Order | Output evidence is ordered by relevance to the claim with strongest supporting or contradicting evidence first | Strong contradictory evidence appears below weak supporting evidence; ranking order is arbitrary or alphabetical | Compute NDCG against golden ranking order; require NDCG >= 0.85 on evaluation set |
Content Fidelity | Aggregated evidence text preserves original meaning without introducing claims not present in source material | Aggregated evidence adds interpretive language, resolves ambiguity the source left open, or synthesizes new claims | Human review of 20 random samples checking for meaning drift; require 95% fidelity rate |
Provenance Chain Completeness | Each output evidence item includes retrieval_path showing retriever, query, rank position, and selection rationale | Evidence items missing retrieval_path fields; rationale is generic or copied across items | Schema validation: require non-null retrieval_path with retriever, query, rank, and rationale fields populated per item |
Conflict Flagging | Output explicitly flags when two sources contradict each other on the same claim with a conflict marker and description | Contradictory evidence is presented without indication of conflict; reader must infer disagreement | Inject known contradictory pairs into test set; verify conflict_flag is true and conflict_description is non-empty for those pairs |
Confidence Calibration | Aggregated confidence scores correlate with actual verification accuracy on golden claims | High confidence assigned to claims where evidence is actually mixed or insufficient; low confidence on clear-cut cases | Binned calibration plot: expected vs actual accuracy across confidence deciles; require ECE <= 0.10 |
Empty Evidence Set Handling | When no evidence is provided for a claim, output returns empty evidence array with explicit insufficient_evidence flag set to true | Output hallucinates evidence, returns unrelated evidence, or crashes on empty input | Test with claims that have zero matching evidence in the input set; verify empty array and flag |
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 a single retriever and a small evidence set. Use the base prompt without strict schema enforcement—focus on getting the deduplication and ranking logic right. Replace [RETRIEVED_EVIDENCE_SETS] with a flat list of passages from one source. Simplify [OUTPUT_SCHEMA] to a basic JSON with evidence_id, text, and sources fields. Skip provenance conflict resolution for now.
Watch for
- Near-duplicate passages with minor wording differences being treated as distinct evidence
- Source attribution getting lost when merging passages from the same retriever
- The model inventing evidence IDs instead of using provided identifiers
- Overly aggressive deduplication that collapses distinct claims into one

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