Exhaustive text-faithfulness evaluation: oracle extractors vs Warp export surfaces - #4
Merged
Merged
Conversation
scripts/text_faithfulness_eval.py compares independent oracle extractors (pypdfium2 primary, blind pdfplumber second opinion) against Warp's two exported text surfaces — the OC PAWLS token stream (page-level) and the engine block_text/content (doc-level) — via multiset token recall with a re-tokenization forgiveness pass, so only real text loss is flagged. Doc-parallel with JSONL checkpointing over every PDF in the repo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ctAeFX3qYwAs1fhupd8xR
Exhaustive evaluation over all 179 repo PDFs (5,850 pages, 2.59M oracle tokens): PAWLS-surface effective recall 0.999855 vs PDFium and 0.999893 vs pdfplumber, with every one of the 61 flagged pages triaged. No material body-text loss found; residual genuine losses are ~10 tokens of rotated margin text and ~6 embedded-layer tokens on OCR-rerouted scan pages. Report documents the garble classes (overprint char-doubling, letter-space char-explosion), the content-surface furniture stripping, and the repeated-signature-block stripping finding, with recommended follow-ups. tests/test_text_faithfulness.py locks the PAWLS >= 0.999 effective-recall floor vs the PDFium oracle on the canonical fixtures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ctAeFX3qYwAs1fhupd8xR
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
Type of change
Related issues
Checklists
Development
Code review
🤖 Generated with Claude Code
https://claude.ai/code/session_017ctAeFX3qYwAs1fhupd8xR