Autonomous Literature Synthesis and Citation Audit Pipeline
Develop a deterministic evaluation script to grade claim-evidence alignment, citation integrity, and synthesis quality in AI research reports.
Deploy this template to evaluate autonomous research synthesis agents. It generates an audit script that checks whether claims made in synthetic literature reviews are genuinely substantiated by referenced primary sources.
Role: Lead Quantitative Research Auditor and AI Benchmarking Engineer specializing in scientific factuality and natural language inference.
Context
- Synthesis corpus input path: {{synthesis_corpus_path}}
- Ground truth citation database: {{citation_ground_truth_db}}
- Natural Language Inference endpoint: {{nli_model_endpoint}}
- Minimum claim extraction granularity: {{claim_extraction_granularity}}
- Hallucination penalty weight: {{hallucination_penalty_weight}}
- Evaluation artifact output format: {{report_export_format}}
Task
Construct an end-to-end Python evaluation script that parses research synthesis outputs from {{synthesis_corpus_path}}, matches extracted atomic claims against {{citation_ground_truth_db}} via {{nli_model_endpoint}}, and generates an empirical citation fidelity audit report.
Method
- Load and parse synthesized research documents into segmented structural units (abstract, thematic sections, claim blocks).
- Deconstruct complex paragraphs into atomic verifiable propositions based on {{claim_extraction_granularity}}.
- Extract inline citation anchors and link each atomic claim to its corresponding bibliography entry in {{citation_ground_truth_db}}.
- Execute cross-encoder entailment checks via {{nli_model_endpoint}} to classify claim-citation pairs into Entailment, Neutral, or Contradiction.
- Detect phantom citations, bibliographic mismatches, and over-extrapolated claims unsupported by the cited source text.
- Compute aggregate metrics: Citation Recall, Entailment Precision, and Faithfulness Score weighted by {{hallucination_penalty_weight}}.
- Format and export the diagnostic output into {{report_export_format}} containing granular claim-level audit traces.
Constraints
- The script MUST implement deterministic batch processing with exponential backoff for {{nli_model_endpoint}} requests.
- The script MUST NOT mark a claim as verified if the cited source is missing from {{citation_ground_truth_db}}.
- Maintain an execution speed benchmark that processes at least 20 claims per second under local caching.
- Include structured logging with explicit severity levels (DEBUG, INFO, WARNING, CRITICAL).
Output format
Provide the evaluation suite organized into four structured components:
- Pipeline Design & Metrics Formulation (A concise overview of the NLI evaluation logic and scoring math).
- Standalone Python Verification Script (Full runnable code containing async batching, data loading, and metric calculations).
- Sample Evaluation Config File (YAML configuration defining model endpoints, weights, and thresholds).
- Metric Interpretation Guide (A concise table mapping score distributions to release recommendations).
Self-review
- Does the script accurately calculate penalties using {{hallucination_penalty_weight}}?
- Are atomic claims cleanly mapped to primary sources in {{citation_ground_truth_db}} without index mismatches?
- Is the final report formatted according to the exact schema specified in {{report_export_format}}?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.