Document
Paste your own document (plain text). It is read here, in this tab, and never sent anywhere.
Fields (defined by description)
| name | description | found |
|---|
Answers
Answers appear here after the fields are extracted.
Rules (Python, runs in your browser)
Every field above is a fact with the same name (a string, "" when absent).
@cat.fn computes a fact, @cat.check(hard=True, then={...}) is a check that overrides the
answer when false, @cat.rule("q") answers question q. Helpers: money,
number, parse_date, days, hours, found,
need, mentions, iban_ok. INPUTS adds inputs; today
is always one.
How the answer was reached
Run a use case to see the strategist's flow, every computed fact and the hash-chained trace.
An honest note on the model
solvi-ai/extract-base
is a general starting point, trained on contracts, receipts and Wikipedia-style questions. Fields close to that
work well out of the box; fields far from it can be missed or cited at the wrong place, and you will see it in the
highlight. For production, label 25–100 of your documents and fine-tune (LongSpanExtractor.fit,
see the model card). The rules, checks, abstentions and the trace do not depend on the model being right: they are
what lets you see when it is not.
Add a use case
A use case is one file in usecases/: a title, fields as [name, description], sample
documents and the rule code. Copy usecases/receipt.js, change it, list it in
usecases/index.js and open a pull request on
GitHub.
What leaves your browser
Downloads only: the model and tokenizer from Hugging Face, Python (Pyodide) and onnxruntime-web from jsDelivr,
and the solvi package from PyPI. Documents, fields and rules stay in this tab (edits are kept in your
browser's local storage so they survive a reload).