Work Hasanah
Hasanah
A legal research engine performed well in demonstration and could not be relied on. We rebuilt it so that software, not the model, proves every citation.
- Sector
- Legal technology, Saudi Arabia
- Scale
- 72 laws, roughly 50,000 articles
- Engagement
- Core rebuild
- Constraint found
- Data
- Systems
- Retrieval, citation reconstruction, quote recovery, claim review, audit trail
The situation
Hasanah answers questions on Saudi law. Its first version ran on the standard retrieval pipeline of the time: a similarity search returned fragments of text, and a language model wrote an answer from whatever came back.
It performed well in demonstration and could not be guaranteed. The model typed its own citations, quotes and figures, so an incorrect article number reached the user looking exactly as authoritative as a correct one.
The constraint we found
Data
The binding constraint
The model was not the problem. Every legal identity in an answer (the law, the article number, the quoted text) already existed in an authoritative source, and the system was asking the model to retype it rather than read it from the record.
In legal work, that distinction is the product. A lawyer can fix an awkward sentence. A citation to the wrong article, presented as verified, is a liability.
What we considered and set aside
Instruct the model to cite more carefully
Cheap to test. It improves the average answer and guarantees nothing, because the model is still the source of the citation.
Move to a larger model
Fewer errors at a higher cost per query, with the same failure mode intact.
Take every legal identity out of the model's hands
The path taken. Software reconstructs citations, quotes and figures from the authoritative record, and the model writes only the prose around them.
What was built
-
01
Citation reconstruction
Every citation is rebuilt from the database record rather than typed by the model.
-
02
Exact quote recovery
Quotations are recovered byte for byte from the authoritative Arabic text.
-
03
Figure substitution
Numbers in an answer are taken from the source, not generated.
-
04
Claim review
A second model checks every claim against the article it cites before anything is marked as verified.
-
05
An audit trail for every request
Each answer records what was retrieved and how each claim was checked.
What made the difference
Deciding which parts of an answer a model is allowed to write. Once citations, quotes and figures came from the record, an unsupported statement no longer reached the user marked as verified, across 72 laws and roughly 50,000 articles.
Outcome
What moved.
8 hrs
Saved per case
$62,000
Saved per lawyer, per year
95%
Retrieval coverage
50,000+
Verified legal articles
Figures drawn from client-side reporting.
Start Here
Start with the question, not the brief.
For companies operating above $1M in revenue with a specific commercial problem.
A 30-minute call. You describe what you are considering building. We tell you which of the three lenses we would run it through first, and whether we are the right firm for it. No fee, no deck, no follow-up sequence.
- 0130 Minutes
- 02No Fee
- 03No Deck
