This proposal has been promoted into the bundled rag_quality_gate starter
template for retrieval-augmented generation quality claims. The goal is to keep
the evidence contract small enough to understand, while still proving
template-check, casebook-check, and claim-check can block unsupported RAG
claims in CI.
- Template id:
rag_quality_gate - Domain:
rag-quality-and-citation-claims - Claim statement: "A RAG quality claim is ready for release notes only after evaluation-set provenance, retrieval quality, answer faithfulness, source coverage, and reproducibility gates pass."
- Positive demo evidence:
evidence_pass_demo.csv - Placeholder demo evidence:
evidence_placeholder_demo.csv - Primary source root:
source_files/
The bundled first version keeps all demo evidence local and reviewable:
source_files/rag_eval_raw_export.csv: compact demo export containing the manifest, retrieval metrics, answer judgments, source coverage, and artifact rows. Real projects can point rows at separate JSON, JSONL, CSV, and CI artifacts.
Required rows for candidate system candidate_rag and sample rag_eval_001:
eval_set_version_recorded == truequery_set_hash_recorded == truecandidate_rag_version_recorded == truebaseline_rag_version_recorded == truejudge_version_recorded == true
Required rows for candidate_rag and baseline_rag:
recall_at_5 >= 0.82forcandidate_ragmrr_at_10 >= 0.70forcandidate_ragretrieval_coverage_rate >= 0.95forcandidate_ragrecall_ratio_vs_baseline >= 1.05as a derived metric
Required rows for candidate_rag:
faithfulness_rate >= 0.92unsupported_answer_rate <= 0.04answer_correctness_rate >= 0.84judged_item_count >= 300
Required rows for candidate_rag:
citation_precision >= 0.90source_coverage_rate >= 0.95missing_source_rate <= 0.02
Required rows for candidate_rag:
retrieval_run_archived == trueraw_answers_archived == trueeval_script_hash_recorded == trueregression_ci_run_recorded == true
The placeholder demo should stay small and obviously blocked:
gate_id,candidate_id,sample_id,field,value,source_file,measured_at,operator_or_agent,instrument_id,notes
evaluation_provenance,candidate_rag,rag_eval_001,eval_set_version_recorded,eval_set_pending,source_files/rag_eval_raw_export.csv,2026-05-26T08:00:00Z,falsiflow_rag_eval_operator,rag_eval_harness_001,Placeholder eval-set version should block readiness.Expected result: claim_check_blocked. The placeholder marker
eval_set_pending means the evaluation-set provenance is not pinned, so the
claim cannot become reviewable.
The positive demo should include the full set of rows above. A representative source-backed row:
gate_id,candidate_id,sample_id,field,value,source_file,measured_at,operator_or_agent,instrument_id,notes
retrieval_quality,candidate_rag,rag_eval_001,recall_at_5,0.86,source_files/rag_eval_raw_export.csv,2026-05-26T09:00:00Z,falsiflow_rag_eval_operator,rag_eval_harness_001,Candidate retriever recall over the pinned query set.Expected result after all required rows and source files are present:
claim_check_ready.
The bundled project.json includes:
evaluation_provenancewith boolean equality rules for version, hash, and evaluator fields.retrieval_qualitywith absolute rules for recall, MRR, coverage, plus a derivedrecall_ratio_vs_baselinerule.answer_faithfulnesswith faithfulness, unsupported-answer, correctness, and judged-item-count rules.source_coveragewith citation precision, source coverage, and missing-source rules.reproducibility_packagewith raw output archive, script hash, and CI run rules.
Before changing the bundled template:
- Keep
examples/falsiflow/rag_quality_gate/andfalsiflow/templates/rag_quality_gate/mirrored. - Keep
evidence_placeholder_demo.csvblocked byeval_set_pending. - Keep
evidence_pass_demo.csvsource-backed for every required row. - Keep placeholder markers in
evidence_policy.placeholder_markers, includingeval_set_pending,query_hash_pending,rag_version_pending, andtodo. - Run
template-check,casebook-check, andrelease-checkafter changing gates, rows, or source files.
The template should pass:
python3 scripts/falsiflow.py template-check \
--template-dir examples/falsiflow/rag_quality_gate \
--out-dir data/falsiflow/rag_quality_gate_check \
--strict \
--forceIt is also covered by falsiflow casebook-check as a bundled public starter.