Compared

truecopy vs asking a model to extract it

A model reads layouts nothing deterministic can. It also answers confidently when it should not, and the literature says why. The two are complements, and the checking half is the one nobody builds.

Short answer. Use a model for the documents you cannot describe. Use truecopy to decide whether to believe what came back, including what came back from the model.

What a model does better

Everything about generality. A model reads a layout nobody anticipated, in a language you do not speak, with the header on the third page and the total in a footnote. No deterministic reader gets close, and pretending otherwise would be silly.

Modern extraction APIs also return provenance (the page, the bounding box, the verbatim source text for each value), which is the right instinct and one truecopy copied: placesOf gives you the same for the deterministic path.

What it does worse, and the research says so plainly

It answers confidently when it should not.

The 2026 literature on this has a name for the fix, calibrated abstention: “the system declines rather than guesses when grounding is insufficient”, paired with “evidence-based confidence that verifies extractions against the source document”. Models trained to say “I don’t know” cut false-confident answers by a factor of two to five.

And the same literature names why it stays rare: benchmarks penalise abstention, and training amplifies the bias. The whole machine is tuned to produce a confident answer.

That is precisely the failure this library is built around. A table that looks right is never checked, and a model produces tables that look right by construction.

Use them together

The strongest arrangement is not either/or:

  1. Let the model read the layout you cannot describe.
  2. Check the result against the document, with selfCheck: does the sum of the rows match the total the document declares? That check knows nothing about how the rows were obtained.
  3. Refuse or ask for review when it does not. readDocument will not let a contradicted reading come back as sound, whoever produced it.
  4. Show the person where each value came from, so confirming is a glance rather than a hunt.

Steps 2 to 4 are the half nobody builds, and they cost nothing to run. Here they are as code, against rows a model returned.

Also worth weighing

A model truecopy
Unseen layouts excellent limited, and it says so
Cost per document per token zero
Latency seconds milliseconds
Runs offline / in the browser rarely yes
Data leaves the machine usually never
Same input, same output not guaranteed always
Says when it is not sure improving, and biased against it by design

On documents that carry somebody’s money or somebody’s rights, the last two rows are usually the ones that decide.