Datasets:
File size: 5,826 Bytes
6e214dd 28d7778 6e214dd 28d7778 6e214dd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # Full candidate export validation and human review
The full candidate export is a mechanically checked research work product. It is **not** a human validated gold set or a finished causal graph. Its manifest must say `status: unreviewed_full_corpus_candidates` and `not_a_gold_benchmark: true`.
## Audit contract
The export directory contains `manifest.json` and the seven canonical JSONL/Parquet pairs. The manifest records `source_inventory_sha256`, `selection_sha256`, `selected_document_hashes`, and counts for all seven tables. `pipeline_version` and `pipeline_sha256` identify the extraction code; the audit warns when either is absent. Pass the selection file with `--selection` to verify its bytes against the manifest. A 64-character selection hash without that file is only syntax checked.
Run the independent audit after each full export:
```bash
python scripts/validate/audit_full_export.py \
--export-dir data/processed/full_candidates \
--inventory data/raw/inventory.csv \
--pages-dir data/interim/pages \
--metadata-dir data/interim/document_metadata \
--ocr-manifest data/interim/remaining_ocr_manifest.csv \
--boundary-triage research/recommendation_section_boundary_triage.csv \
--review-queue data/processed/full_candidates/human_review_queue.csv \
--json-out data/processed/full_candidates/audit_report.json
```
Add `--selection data/interim/full_selection.csv` once the frozen full-corpus selection file is available. The defaults `--expected-documents 247` and `--expected-occurrences 243` reflect the current inventory snapshot; update either only after recording an inventory change. The CLI exits nonzero for mechanical errors.
The audit checks:
- All unique PDF hashes in the source inventory occur once in the export. URL aliases with identical bytes are one document, while preliminary, interim and final reports with different hashes remain separate documents within one occurrence.
- The source inventory hash, optional selection hash, seven manifest row counts, JSONL and Parquet row content, document IDs, occurrence membership and report status mapping.
- The original PDF hash through the record validator, physical PDF page count, parsed metadata hash/count, exactly one parsed page per physical page in order, every parsed span's exact character slice, alphanumeric page-text coverage, and exact offsets/quotes for cited evidence. A parser may split one paragraph into several spans carrying the same paragraph ID; each cited range must resolve to a covering span. The optional OCR manifest must show completed jobs, no errors, matching PDF/page counts and current page/metadata hashes.
- Record schemas, foreign keys, report-authored wording, multi-page source assembly, claim roles, causal-edge status, and optional `supporting_claim_ids`. An explicit causal edge with supplied claim IDs must link to a matching report-authored cause/factor claim. An explicit edge without a claim ID is flagged for review. Temporal `preceded` edges cannot pass as causal edges.
- Versioned reports sharing a status are flagged for review. This is a warning because two documents may legitimately have the same status.
- The optional source-reviewed boundary triage gates seven known TOC/annex cases by PDF hash, page and character cutoff. It rejects recommendation evidence outside the verified body span. This is targeted evidence, not a general semantic accuracy certificate.
- The report-specific recommendation OCR exclusion file is checked against the exported PDF SHA-256, the exact parsed characters, and a matching recommendation-section source span. Only those verified characters may be ignored in an otherwise contiguous recommendation crossing a page boundary. The source PDF and parsed page remain unchanged.
The generated queue deterministically selects up to 50 occurrences: half high-risk, with the rest covering occurrence-class/year strata before hash-stable fill. Risk includes multiple versions, OCR/empty pages, NUL control characters, long reports, unadjudicated cause-section items, and causal-edge candidates. Each row is `pending`. This is an annotation worklist, not an accuracy estimate or a benchmark split.
`scripts/validate/build_blind_annotation_packets.py` turns the 50-row queue into source-only human annotation packets after verifying PDF and parsed-page hashes. `scripts/validate/build_temporal_review_queue.py` lists clock-bearing event candidates for chronology review. Its clock strings are textual mentions, not verified event timestamps.
## Human gates before a research release
1. Review every proposed causal edge against the PDF, its endpoint events and the report-authored causal claim. Preserve the source wording. Reject a link based only on chronology, proximity, or model plausibility. Keep model-inferred edges separately filterable.
2. Double annotate a diverse 30–50 occurrence subset where feasible. Record independent labels and adjudication patches. Measure event, cause/factor, recommendation and evidence-reference precision, as well as agreement on causal labels and ordering. Report denominators and OCR/version strata.
3. Review the 50 occurrence queue, all empty/error OCR pages that touch candidate facts, cross-page recommendations, report versions, and any malformed or missing inventory entries. Human reviewers should see the rendered PDF as well as parsed text.
4. Freeze a human adjudicated benchmark split by occurrence. Do not report baseline scores or corpus-wide causal-factor prevalence from this candidate export.
An empty `causal_edges.jsonl` can pass structural validation, but the audit warns that the causal graph objective is still unmet. A mechanically successful audit does not establish semantic correctness, completeness of extraction, recommendation follow-up, or peer-review readiness.
|