Repository navigation
feat(retrieval): return a short document whole, and the top evidence page's neighbour - #96
Draft
hallelx2 wants to merge 1 commit into
Conversation
…page's neighbour Three of Vectorless's nine FinanceBench declines in the 2.5 Flash-Lite pilot were retrieval misses. Two were short filings: Foot Locker's 8-K came back as 2 sections, and MGM's earnings release as 5 small sections without the financial table. The third was Boeing, where the walk returned page 7 and the answer is on page 8. - A document whose text fits in judgewalk.whole_document_tokens (default 12,000; negative turns it off) comes back entire, whatever max_sections is. Navigation's ranked units lead, the rest follow in document order, each marked whole_document. - Slots left under max_sections fill first with the pages beside the top evidence page (next, then previous) and then with runner-ups. Each is marked neighbour_of. unit_stats counts neighbours and whole documents.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideJudgeWalk now returns short documents in full and fills remaining retrieval slots with the next, then previous, page beside the top evidence; configuration, assembly, query/answer paths, metadata, and unit statistics are updated consistently. Sequence diagram for JudgeWalk neighbour-page retrievalsequenceDiagram
participant QueryHandler
participant JudgeWalkStrategy
participant PageStore
participant AssembleUnits
QueryHandler->>JudgeWalkStrategy: Select(ctx, tree, query)
JudgeWalkStrategy->>PageStore: Load document pages
PageStore-->>JudgeWalkStrategy: pages
JudgeWalkStrategy->>JudgeWalkStrategy: neighbourPages(nav, pages, leafTitle)
JudgeWalkStrategy-->>QueryHandler: Result with EvidencePages and NeighbourPages
QueryHandler->>AssembleUnits: AssembleUnits(ctx, tree, result, k, load)
AssembleUnits->>AssembleUnits: AddPage(neighbour, true)
AssembleUnits-->>QueryHandler: Units with neighbour_of and unit_stats.neighbours
Flow diagram for whole short-document assemblyflowchart LR
A[JudgeWalk selects document] --> B{Document within whole_document_tokens?}
B -- No --> C[Assemble evidence and capped fallback units]
B -- Yes --> D[Result sets WholeDocument]
D --> E[Add ranked evidence and runner-ups]
E --> F[Add remaining pages or sections in document order]
F --> G[Return all units without cap]
G --> H[Mark appended units whole_document]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Vectorless now returns a short document whole, and fills open slots with the page beside the top evidence page before pages from elsewhere.
Why
Three of Vectorless's nine FinanceBench declines in the 2.5 Flash-Lite pilot were retrieval misses:
Change
retrieval.judgewalk.whole_document_tokenscomes back entire, whatevermax_sectionsis. The default is 12,000 tokens; negative turns it off.WholeDocumentplusDocumentPages(paged) orDocumentIDs(section tree).whole_document.neighbour_of./v1/query, both/v1/answerpaths and the standalone server take both throughAssembleUnits.unit_statscounts neighbours and whole documents.Verification
Not yet measured
The issue's done-when is a re-measure of the 50 pilot questions on vlb-engine. That waits until the running pilot finishes, so the pilot keeps one engine build; I'll add the numbers here before merging.
Closes HAL-3246
Summary by Sourcery
Improve judgewalk retrieval by returning short documents whole and prioritizing pages adjacent to top evidence.
New Features:
Bug Fixes:
Enhancements:
Tests: