Skip to content

Preserve title lines when classification metadata shares a native block #52

Closed

Description

@CompleteDotTech

Observed regression

The fresh, query-independent 10,000-paper field build at f9f7c13 changed the title candidate for private corpus ID d21604 from 145 characters to 33 characters while its source PDF, first-page image, and native text hashes remained identical. Source-image and native-line review found classification metadata at the start of a native block followed by the actual title in later lines of that same block. The old 145-character candidate included metadata; the new 33-character candidate is an author block. Neither candidate is a reviewed title.

The cause is block-level eligibility in extract_fields: lines are joined before _title_like, so METADATA_START rejects the entire mixed block. The following author block is not reliably rejected by _author_like when it carries affiliation markers. This is a field selection defect, not an OCR result or a source-location failure. The private source-bound diagnosis is validation_v3_private/issue22-ocr-corpus-retrieval-20260928-01/D21604_TITLE_ROLE_DIAGNOSIS.json, SHA-256 3614b822b486842f6c5bd2bd478ea97fea6552a3bc55a1bdb0e6e00727104879. Keep source text and images outside the public repository.

Implementation

  1. Partition mixed native blocks into source line or span role runs before title eligibility. Preserve each run's exact native line IDs, offsets, boxes, typography, source/page identity, and unreviewed status. Metadata removal must not delete neighboring title text or create a reconstructed title unsupported by the source.
  2. Reject author and affiliation runs with source-backed marker/role evidence, including letter and numeric affiliation markers. Preserve genuine titles containing initials, digits, institution names, or scientific notation; do not use an ID-specific override or known-query target.
  3. Keep candidate generation query-independent. Version the title policy and field provenance, and invalidate dense caches when fields change. A title candidate alone remains retrieval-only and cannot authorize abstract promotion or graph admission.
  4. Add public authored PDF/native fixtures for metadata-plus-title in one block, author-plus-affiliation markers in the next block, and counterexamples where the same words are genuine title text. Cover both line ordering and visual typography. Report the real d21604 source-image readback privately without publishing its title or author names.

Acceptance

  • d21604 no longer selects either the metadata-contaminated old candidate or the author-only current candidate; the chosen title has exact source-line provenance and an attributed image check. If ambiguous, retain an explicit review state rather than guess.
  • The authored mixed-block and author-marker negatives pass, while genuine numeric/initial/institution-title positives remain eligible.
  • Existing f115 boilerplate/title and f076 image-only OCR behaviors remain intact.
  • A fresh 10,000-document field build accounts for all IDs and reports every changed title candidate, provenance, source verification, held state, and output hash. Rebuild affected dense rankings, reject stale caches, and rerun the frozen 60-query candidate/rerank protocol with the same target-label rotation check.
  • Distinguish the field-policy change from the local OCR change in before/after metrics. Do not claim a pure OCR improvement from the current combined-field trial.
  • Publish source-faithful code, tests, a redacted receipt, and documentation; keep all private PDFs, text, labels, and full rankings external.

Links and dependency

Parent: #22 (under epic #12). Discovered during #22 and blocks a repaired-field interpretation of its final acceptance. #21's assessment wiring remains closed; this issue concerns title role selection. The current #22 native-plus-OCR trial is frozen and remains a valid partial baseline for its exact field hash, not evidence that this regression is fixed.

Activity

  1. added
    bugSomething isn't working
    area:retrievalGraph and document retrieval behavior
    initiative:paper-graphragPaper extraction, evidence admission, retrieval and real GraphRAG qualification
    priority:P1Required to repair known correctness failures or make acceptance evidence trustworthy
    on Sep 29, 2026
  2. CompleteDotTech commented on Sep 29, 2026

    @CompleteDotTech
    CollaboratorAuthor

    Completed and verified in merged PR #66, following the title-role implementation already on main. The redacted 10,000-paper receipt binds the private field build, frozen protocol, trial result, and final driver readback by SHA-256.

    • All 10,000 document IDs and the frozen 60 queries were included. Fourteen title records changed; body text stayed unchanged. The mixed-metadata title was checked against the original page image and exact native title lines 1–2.
    • Fresh SPECTER2 rankings and the local cross-encoder ran for repaired and archived field conditions. All five target-label permutations passed. The frozen input/code/runtime readback matched, and the postpublication driver readback passed without blocked or invalidated marker.
    • Repaired and archived conditions both scored 59/60 top-1 and 60/60 top-10 known targets. f076 remained rank 1 and f115 rank 2 in the repaired full-channel condition. The title repair did not improve the aggregate 60-query metric; the field correction itself is source verified.
    • PR checks: six passed; postmerge main checks: Python 3.11, 3.12 and 3.13 passed. Signed PR and merge commits are verified by GitHub.

    This completes #52's title-role and frozen-query acceptance. The absence of 10,000 V4 abstract assessments and competing-result relevance judgments continues under #53 and #22; no full retrieval or GraphRAG qualification is claimed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:retrievalGraph and document retrieval behaviorbugSomething isn't workinginitiative:paper-graphragPaper extraction, evidence admission, retrieval and real GraphRAG qualificationpriority:P1Required to repair known correctness failures or make acceptance evidence trustworthy

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions