-
Notifications
You must be signed in to change notification settings - Fork 1
judgewalk navigates the persisted TOC over persisted pages, and returns pages (HAL-1371, HAL-1390) #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hallelx2
wants to merge
15
commits into
main
Choose a base branch
from
halleluyaholudele/hal-1371-judgewalk-on-persisted-pages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
judgewalk navigates the persisted TOC over persisted pages, and returns pages (HAL-1371, HAL-1390) #68
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
29fe58f
fix(config): accept retrieval.strategy judgewalk
hallelx2 771f487
feat(ingest): toc mode — parse, table of contents on the Judge, persi…
hallelx2 6c977b3
fix(api): /v1/query reports usage and never an empty model
hallelx2 f3794c4
review: judgewalk in the per-request strategy set falls back to treew…
hallelx2 d93dd52
review: /v1/query usage accumulates planner, selection and re-rank, a…
hallelx2 1613d31
feat: judgewalk navigates the persisted table of contents over persis…
hallelx2 bb8ea8a
fix(api): page-based retrieval returns its pages — evidence pages lea…
hallelx2 0e51324
docs: head-to-head against chunk-and-embed — partial final row, the t…
hallelx2 76546bf
docs: head-to-head final row — 40/40 completed on the page-returning …
hallelx2 a0679b7
feat(ingest): the splitter recurses into the sub-leaves it creates
hallelx2 3027824
fix(ingest): one generation of splitting by default — recursion measu…
hallelx2 5f896c8
docs: recursive splitting measured — a negative result
hallelx2 4628338
perf(retrieval): batch page ranking at 6k tokens, not 24k
hallelx2 e9a3313
perf(retrieval): stop tokenising to pack batches; revert the request …
hallelx2 8bef6d3
perf(retrieval): pack batches at the measured token ratio; start the …
hallelx2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
91 changes: 91 additions & 0 deletions
91
docs/evaluations/2026-09-19-head-to-head-chunk-and-embed.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| # Vectorless on Jev against chunk-and-embed, on FinanceBench | ||
|
|
||
| **Date:** 2026-09-19 | ||
| **Harness:** [vectorless-bench](https://github.com/hallelx2/vectorless-bench) `configs/financebench_jev.yaml` — the engine reached through the Python SDK, the baselines in-process | ||
| **Corpus:** FinanceBench, 19 filings with questions among the 21 downloaded (68–549 pages), 40 questions, k=5, two repeats | ||
| **Engine:** `cmd/engine --local`, `ingest.mode: toc`, `retrieval.strategy: judgewalk`, abstention off, caches off, Judge on, no generative call anywhere in retrieval | ||
| **Question:** the post claims chunk-and-embed cannot be this fast and this exact. Is that measured? | ||
|
|
||
| ## Result | ||
|
|
||
| The final run completed all 40 questions and both repeats with no | ||
| errors and no engine restart. Every gold evidence page is among the | ||
| returned pages for 34 of 40 questions; hit@5 (any returned unit holds | ||
| the answer text) is 37 of 40; the answer text is in the first returned | ||
| unit for 30 of 40. The six page misses are the four `navbench` had | ||
| already found (three Boeing, one Pfizer) plus two where a gold page was | ||
| one page off the returned one (Pfizer 70–71 → 71; Verizon 23 and 56 → | ||
| 23 and 57) — a page-boundary question for the full-page pass, not a | ||
| navigation one. | ||
|
|
||
| | system | how it retrieves | F1@5 | hit@5 | answer span in top-1 | p50 / query | $ / query | ingest, 19 filings | deterministic across repeats | | ||
| |---|---|---|---|---|---|---|---|---| | ||
| | **Vectorless, judgewalk on persisted pages, pages returned** (PR #68, final run 2026-09-21) | Jev ranks the TOC's sections, then page heads, then pages; the evidence pages are returned as-is, ahead of any section | 0.498 | **0.925** | **0.750** | 37 s (p95 75 s) | $0.0040 | 1,111 s (58 s / filing, sub-section splitting on) | 0.38 exact, 0.83 Jaccard | | ||
| | Vectorless, judgewalk on persisted pages, sections mapped by page range (PR #68 before HAL-1390) | same navigation; the parser's sections covering the evidence pages returned | 0.197 | 0.475 | 0.000 | 29 s | $0.0040 | — | — | | ||
| | Vectorless, judgewalk on the section tree (first pass) | same navigation over the parser's sections and their bodies | 0.453 | 0.650 | 0.575 | 50 s | $0.0067 | 1,080 s (57 s / filing) | 0.43 exact, 0.69 Jaccard | | ||
| | chunk-and-embed, BGE-small | 512-token chunks, bge-small-en-v1.5 on the CPU, cosine top-5 | 0.170 | 0.375 | 0.225 | 49 ms | $0 | 1,972 s (104 s / filing, 4 threads) | 1.00 | | ||
| | BM25 | 512-token chunks, BM25 top-5 | 0.096 | 0.200 | 0.075 | 48 ms | $0 | 2 s | 1.00 | | ||
|
|
||
| Scoring: a question's gold is FinanceBench's evidence text and answer; a | ||
| returned unit is a hit when it contains the gold span (numbers matched | ||
| as numbers). F1@5 is the harness's primary quality; "answer span in | ||
| top-1" is whether the first returned unit contains it. | ||
|
|
||
| ## What the runs taught, in order | ||
|
|
||
| The server's judgewalk was navigating the **parser's section tree** over | ||
| section bodies. The Jev-built table of contents was persisted for | ||
| treewalk alone, and per-page text was never persisted. That scored | ||
| hit@5 0.65 where the same navigation over real pages had scored 0.90 | ||
| in `navbench` — the parser's page attribution is exactly what HAL-1375 | ||
| had shown to be unreliable. Ingest now persists the pages beside | ||
| `documents.toc_tree`, and judgewalk navigates the persisted TOC over | ||
| them (PR #68). | ||
|
|
||
| That alone made things **worse**: hit@5 0.475, the answer in the first | ||
| result never. The right pages were found and then mapped back to the | ||
| parser's sections covering them by page range — the same unreliable | ||
| attribution, one step later. Page-based retrieval now returns its | ||
| pages (HAL-1390): `/v1/query` leads with the evidence pages as units | ||
| of their own, `page` and `confidence` set. On the full 40, hit@5 went | ||
| 0.475 → 0.925 and the answer in the first unit 0.000 → 0.750. | ||
|
|
||
| Three more things the run surfaced, each fixed on the way: | ||
|
|
||
| - `/v1/query` dropped retrieval's usage, so a client benchmarking | ||
| retrieval alone saw $0 (PR #67). | ||
| - `ingest.mode: minimal` skips the TOC stage entirely; a `toc` mode now | ||
| runs the page-based pipeline and nothing else (PR #67). | ||
| - The SDK rejected an abstained response for lacking a model name | ||
| (vectorless-sdk #3). Abstention is off for this run so judgewalk's | ||
| low-confidence best guess is scored rather than blanked. | ||
|
|
||
| ## What the numbers say, and what they do not | ||
|
|
||
| - **Latency.** Chunk-and-embed answers a query in 50 ms; Vectorless on | ||
| Jev takes tens of seconds, all of it Judge round-trips. The post's | ||
| speed claim is about *ingest* and about the *generative* path it | ||
| replaced, not about beating a cosine lookup — say so. | ||
| - **Ingest.** Embedding 19 filings with a small model on four CPU | ||
| threads took 33 minutes; the Jev TOC stage took 18 minutes for the | ||
| same filings with sub-section splitting on, for $0.11. With a GPU the | ||
| embedding number collapses; with more Jev concurrency so does ours. | ||
| - **Exactness.** Even on the section tree, Vectorless put the answer's | ||
| text in its first result 2.6× as often as BGE-small and 7.7× as often | ||
| as BM25. That is the citation claim, and it is measured. | ||
| - **Determinism.** The baselines are exact across repeats; judgewalk is | ||
| not (0.43 exact-match of returned sets), because Jev's probabilities | ||
| near the threshold move between calls. A product wants this number | ||
| reported, not hidden. | ||
| - **Not measured here:** answer quality from the retrieved context | ||
| (HAL-1387), the tree-walk chat loop on the same questions, Gemini | ||
| embeddings (free-tier quota), and anything on a GPU. | ||
|
|
||
| ## Reproduce | ||
|
|
||
| ```bash | ||
| # engine, local mode, Judge on, page-based pipeline only | ||
| VLE_INGEST_MODE=toc TYPESAFE_API_KEY=… ./engine --local -config config.yaml # retrieval.strategy: judgewalk, abstain off, cache off | ||
| # bench | ||
| cd vectorless-bench && VECTORLESS_BASE_URL=http://localhost:7654 vlbench run --config configs/financebench_jev.yaml | ||
| ``` | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Align the report date with the final-run date.
The document header dates the report 2026-09-19, but this row labels the final run 2026-09-21. Update the header to 2026-09-21, or label the header as the report date or start date.
🤖 Prompt for AI Agents