How it works
Ingest, navigation, verbatim evidence pages, pincites and replay, as the engine ran in production from 2026-10-06.
This page describes the pipeline production ran from 2026-10-06: ingest mode
toc and the judgewalk retrieval strategy (reported as navigate in API
responses). The engine also contains older strategies, covered in
Core Concepts.
Ingest
Ingest turns a PDF into a tree of the document's own sections, each placed on its pages.
Read the layout
pdfgrab, a pure-Go port of pdfplumber, reads every word on every page together with its rectangle. The engine stores the text of each physical page.
Find the contents
Jev decides which page is the contents page. Code lists the candidate entries on it, and Jev confirms which are real.
Place each entry on its page
A contents page gives printed page numbers, which can differ from the PDF's page numbers. For each entry, code searches the body for where that heading appears, and Jev picks the page.
Split long sections
Any section longer than 20 pages is split at its own headings, so no leaf of the tree is huge. Jev decides which sub-headings to keep.
Render pages
Once the document is ready, pdftoppm renders each page at 144 dpi in the
background. These images back the citation view.
Ingest makes no generative call and writes no summaries. Markdown, HTML, DOCX and plain text are parsed into a heading tree instead; they have no pages, so they get no page images and no pincites.
Navigation
A query selects sections, then pages.
- Jev ranks the tree's sections against the question.
- It skims the head of each candidate page, then reads the best pages in full.
- It follows cross-references such as "see Note 7" to the page they name.
Each step sends batched Jev requests: one shared state (the question plus the candidates) and many typed questions about it in a single call. The steps run in order because each one's input is the previous one's output; on FinanceBench a question took 4.3 requests on average (2026-09-19). Retrieval makes no generative call.
Evidence pages, verbatim
The chosen pages come back as they are, with their page ranges. Nothing is
summarised or rewritten between the document and the caller. POST /v1/query
stops here.
Answer and pincites
A pincite is a citation to the exact page or line, the way a legal brief cites
a page of a judgment. POST /v1/answer continues past the evidence pages:
- A generative model of your choice writes the answer over the evidence pages,
marking each claim with
[n]. - For each claim, code lists candidate quotes from the cited page's own sentences and table rows, and keeps a shortlist of 10.
- Jev picks one quote per claim, in a single batched call for the whole
answer. It can pick
none. - If Jev's confidence is below 0.35, the citation falls back to page level.
- The quote is located on the page exactly, or at 80% or more token overlap. Quotes under 4 tokens must match exactly.
- It is drawn as one highlight rectangle per line, in page coordinates normalised to 0–1.
Citations come at line, page or section precision. There is no table-cell precision. Because every quote is taken from the page's own text, no generated text can reach a citation.
On the 3M 2022 10-K (252 pages), the page layout was built in 3.0 s and the
pincite step took 0.4–0.6 s inside /v1/answer. Every claim checked by eye
landed at line precision; that is a small visual check, not a benchmark.
Replay
Every answer is stored under a trace_token, and POST /v1/replay with that
token returns the stored response byte for byte.
Replay is not determinism
Replay returns a record of what was answered. It does not re-run the query. Jev is not deterministic: across repeated runs, the returned page set matched exactly 0.375 of the time (Jaccard 0.834). Re-asking the same question can return different pages.
The replay store is in memory (1,024 entries for 24 hours by default), so it
does not survive a restart. At the production commit, /v1/replay is served by
the standalone engine binary (cmd/engine); the multi-tenant server
(cmd/server) records traces but does not register the route.
When Jev is not available
Jev is a hosted TypeSafe API. Without a TypeSafe key the engine still runs, but not the pipeline above. See Jev and System One models.
What the measurements say
The figures behind this pipeline, with dates and caveats, are on Benchmarks.