Repository navigation
Wire source-bound abstract assessments into retrieval field generation #21
Description
Problem and evidence
build_fields verifies source/page/image/native files and calls extract_fields with optional title review and OCR cache. It never passes abstract_assessment. extract_fields already supports a sealed assessment with a proposal and source spans, but the field-building entry point leaves every abstract field empty.
This is an integration omission, not a request to replace working title filtering or candidate channels. V4 already excludes boilerplate such as “Graphical Abstract”; the September 28 read-only probe selected f115's real title. The full-page BM25 candidate channel also already exists. f076 still has no native searchable text and requires source-bound OCR or image review. No new 10,000-paper ranking result was established by that probe.
Scope and implementation
- Add an explicit input mapping from sample/document IDs to immutable abstract assessments in the field-builder API and CLI. Specify its schema and method/version selection; reject duplicate/unknown IDs, ambiguous method selection, malformed receipts and mismatched document/page identities.
- Pass the selected assessment to
extract_fieldsonly after integrity and provenance checks. Verify the proposal's spans against the exact native representation selected for this run; a self-consistent assessment hash alone must not establish source location. Bind the native representation and extractor/environment identity in the output receipt. - Resolve the current evidence mismatch risk: the builder verifies the cached native file's hash but re-extracts native lines from
page.pdf. Either consume and validate the pinned saved representation or explicitly produce/version a new representation and revalidate dependent assessments. Never silently combine cached assessments and a different native extraction. - Preserve per-field provenance, candidate/review state, source/page/image identity and assessment hash. Retrieval indexing must retain
retrieval_only=true,eligible_for_jev=false, and unreviewed status for selector proposals. - Keep held/error/absent/partial candidates distinguishable from available abstract fields. Document which reviewed OCR/title fields may aid discovery and why discovery does not qualify graph evidence. Consume any new image-evidence contract explicitly when available; do not invent native spans.
- Hash the complete resulting fields, invalidate downstream dense caches after any field change, and write a new immutable output. Inputs must remain query-independent; neither query text nor known targets may influence field selection.
Reproduction and tests
Current CLI, before this change; paths below are placeholders under an authorized data root:
python -m src.parallel_source_v4.fields --data-root /authorized/data --manifest corpus/source-views/manifest.json --output runs/fields-before.json
python -m unittest discover -s tests -p 'test_parallel_source_retrieval_v4.py' -q
python -m unittest discover -s tests -p 'test_parallel_source_io_v4.py' -qThere is currently no CLI argument for assessments. Add and document it rather than claiming the example above exercises assessment wiring. A regression test should invoke the actual CLI with a manifest and a valid sealed/source-bound assessment; directly calling extract_fields alone would miss the original defect.
Acceptance and deliverables
- An eligible matching assessment produces the exact expected abstract through the actual field-building CLI, with assessment/native/source identities in its provenance.
- Wrong source/page, modified spans or text, stale native evidence, duplicate mappings and unsealed assessments fail explicitly; held inputs cannot silently become complete abstracts.
- Reusing a dense cache from pre-change fields is rejected by the existing stale-field check; unchanged immutable input reproduces identical content hashes.
- Public synthetic fixtures exercise boilerplate-title exclusion, title below the old search region, no-native-text OCR fallback and candidate-only status. Real f115/f076 readback is reported without publishing their private text.
- Field generation for the authorized full corpus produces explicit missing/held/unsearchable counts and immutable provenance. Do not claim retrieval quality from this step; link the separate retrieval experiment.
- Deliver code, schemas/input examples, CLI documentation, targeted test results and a sanitized field manifest with counts/hashes.
Inputs and boundaries
Obtain the existing authorized corpus manifest, pinned native evidence and corresponding assessments from the data owner; the public repository intentionally excludes private PDFs and full assessments. Core wiring can be implemented and tested with synthetic fixtures independently. No paid API is required for this change. Field indexing does not authorize evidence admission, Jev calls or graph writes. Preserve old fields and experiment receipts.
Tracking and completion dependencies
Parent: #12. Milestone: Paper extraction and GraphRAG qualification.
Completion prerequisites: #13. These are native blocked-by links; design, fixtures and other independent implementation work may proceed in parallel.
Required by: #22.
Activity
CompleteDotTech commentedon Sep 28, 2026
Implementation #21 merged in PR #29 as verified commit
19a5d0af951d11225cf6ae9a3dc0f2588442d3e2; merged-tree offline validation passed 649/642 with 7 documented skips and hosted CI passed. The previously built original 10,000-paper output accounted for all IDs but was bound to the preintegration extractor. A fresh preparation on the exact merged #21 tree (7e61cbf8d7fcc2807a894bbd5c901bc97f440ebe) is in progress, so the final corpus field receipt and sanitized manifest are still pending. Keep #21 open until those are checked. #22's full retrieval experiment also remains open.CompleteDotTech commentedon Sep 28, 2026
#21 acceptance readback: implementation/review/hosted checks merged in PR #29, and the completed original 10,000-document sanitized receipt merged in PR #32 (
c7ef6484ba14968002ee0708bbeec3817954fc55; main CI success). The actual field builder CLI accepts sealed source-bound assessments and adversarial tests reject source/page/native/span/seal mismatches. On the original 10,000 corpus, final source/page/image/native readback passed for all 10,000; 9,988 native extractions completed, 12 retained errors, 14 unsearchable rows and 11 page-copy render review holds. All 10,000 optional assessment mappings were absent, explicitly recorded; no abstracts were invented. Public receipt:review/retrieval_fields_v1/full10000_receipt.jsonSHA-256813c915802f8160fbfdfe85c52b81a15ecbbfbdf98cfbf0ff67827d3f85afa57.This completes source-bound field generation and its honest missing/held counts. It does not establish retrieval-quality gains. #22 must regenerate exact-tree fields after later V4 changes and run the frozen 60-query trial; the absence of real assessment mappings limits any claim about the selector's effect on retrieval.