Repository navigation
feature/Document-reading · L-261115-b6776f - #27
Merged
Merged
Conversation
read_document extracts a document's pages with their OCR text and a 100-dpi page view, then reads each page in one model call into a PageReading of findings, unreadable and not_looked_at. read_pages, also exported, reads again pages an earlier run extracted with no second extraction. The package's README, the library table and the changelog's Unreleased entry describe it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A page whose footer prints "Page 1 of 4" was answered with the other pages listed as not looked at, which the caller would read as a gap of this page. The prompt now says the other pages are read separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
TL;DR
document_reading, a method that reads every page of a document with one model call per page and returns what each page states or shows, with exact quotations.Changes
methods/document_reading/:read_documentextracts the pages with Azure Document Intelligence and a 100-dpi page view of each page, thenread_pagessends each page to one Claude Sonnet call. Both pipes are exported, so a caller can read a single page again from an earlier run's output without extracting the document a second time.PageReadingper page, in page order, each with its findings (exact quote, kind, source as text, picture or both, an optional note), what could not be read, what was not looked at, and the printed page number when there is one.README.mdtable and theCHANGELOG.md[Unreleased]section list the package.How it was verified
plxt fmt --check,plxt lint,pipelex validate bundle(with 0.95.1 and 0.103.1) andcheck-samples.shpass.wip/build-assistant-reading-notes/method-reading/, cellsshippedandshipped-2), the package found every fact the phase-1views-100variant found, on the brand guidelines, the flowchart, the poor scan, the rate card, a Word file and a PowerPoint deck, at the same cost per page and with no false finding. A page from an earlier run's output was read again throughread_pageson the hosted dev runner./revround 1 (cubic, Codex, the official code-review): Codex's one finding, the prompt-injection guard, is fixed in this branch.Left out
release/pull request after this merges.Closes L-261115-b6776f
Advances L-261115-b2b931
🤖 Generated with Claude Code
Summary by cubic
Adds the
document_readingpackage, which reads a document page by page for a caller who will never see it, listing every rule, value, threshold, name and constraint each page states or shows in its exact words.methods/document_reading/package with two exported pipes:read_documentextracts each page (Azure Document Intelligence OCR plus a 100-dpi picture) and reads it in oneclaude-5.5-sonnetcall;read_pagesre-reads pages from an earlier run's output without extracting the document again.PageReadingper page in page order, each with its findings (exact quote, kind, source, optional note),unreadable,not_looked_at, and the printed page number when present.README.mdtable and theCHANGELOG.md[Unreleased]entry.Reading a page range within the method is left out; it waits on a PipeExtract page range in
pipelex.Written for commit 89f3588. Summary will update on new commits.