How LexEdge stops hallucination

AI that never invents the law.

In legal work, a hallucination isn’t a typo — it’s a fabricated citation in front of a judge. So we made a deliberate architectural choice: the language model never touches the facts. Every case name, date, figure and citation comes from real data through deterministic code.

probability noise grounded core
FACTS from source, not guesswork
01

An LLM is not a calculator

Large language models are probabilistic by design. They answer by predicting the most probable next words — pattern-matching against everything they’ve read. Ask “what is 2 + 2?” and the model computes nothing; it returns “4” because it has seen it a million times. Fine for prose. Dangerous the moment the answer is a date, a figure or a citation.

Predict the next hearing date:
What the model actually does — rank candidates by probability and return the top one.
18 Jul 2026
68%
19 Jul 2026
17%
25 Jul 2026
9%
1 Aug 2026
4%
▲ returns the most probable — even if the real date isn’t on this list

The model has no idea what the actual hearing date is. It returns the pattern that looks most likely. Confident, fluent — and, some of the time, wrong.

A calculator
2 + 2 = 4

Computes the result. Right every time, by construction.

A language model
2 + 2 ≈ 4

Predicts the most likely next token from patterns it has seen. Usually right — but guessing, not calculating.

02

Two ways to answer the same question

Give a generic AI tool and LexEdge the same query. The difference is where the facts come from.

Your question
“Find the precedent on anticipatory bail…”
Generic AI One model, all of it
The LLM answers everything
Case names, dates and citations all generated from probability.
Facts invented on the fly
No source consulted — it produces what looks right.
Plausible. Sometimes fabricated.
LexEdge Facts by code, language by AI
No AI
Deterministic retrieval
Keyword search, database index & vector similarity over the real judgment database.
No AI
Verified facts, dates, citations
Pulled from source records — never generated.
AI
LLM phrases the answer
Used only to summarise the retrieved facts — never to supply them.
No AI
VerdictVerify
Every citation re-checked against the official court registry.
Grounded. Traceable to source.
03

Built on millions of judgments

Accuracy isn’t luck — it’s engineering. Every judgment is processed through a data pipeline, then organised with high-level indexing and database optimisation, so a search returns the right passage in milliseconds.

1.2M+
judgments in the corpus — Supreme Court, 25 High Courts & key tribunals
1950 → now
coverage from the founding era, refreshed within 24 hours
<1s
typical retrieval — keyword + vector search over a fully indexed store
Source
Raw judgments
Millions of orders & judgments, court by court.
Data pipeline
Parse · clean · structure
Citations, parties, dates and holdings extracted deterministically.
Optimise
Indexing + DB tuning
High-level indexes and an optimised store for exact, fast lookup.
Retrieve
Keyword + vector search
The right passage returned from source — never generated.
Inside the retrieval layer — engineered search, no AI

Keyword index

Exact-term matching over structured fields — party, statute, court, citation number.

Vector store

Semantic similarity finds the right passage by meaning, not just matching words.

Court registry

The official authority VerdictVerify cross-checks every citation against.

04

And when it doesn’t know, it says so

An LLM is built to always produce an answer — so when it doesn’t know, it invents one. Our retrieval is built the opposite way: if there is no grounded match in the corpus, it tells you plainly, rather than guessing.

Generic AI · always answers
“Is there a 2024 SC ruling on X that holds Y?”
“Yes — in ABC v. State (2024), the Court held that…”
No such case exists. The model produced a confident, well-formatted fabrication — because answering is all it knows how to do.
LexEdge · answers only from source
“Is there a 2024 SC ruling on X that holds Y?”
“No verified match in the corpus. I won’t guess — here’s the closest authority instead.”
When the algorithm has nothing grounded to return, it says “I don’t know” — and points you to what it can stand behind.
05

Where we draw the line

The rule is simple and absolute: the LLM handles language; code handles truth. Anything factual is removed from the model entirely.

Facts from the database

Case names, dates, figures and holdings come from your real records and the judgment corpus — not the model’s memory.

Deterministic search & vectors

Retrieval runs on keyword queries, database indexes and vector similarity — repeatable, inspectable, same answer every time.

Every citation verified

VerdictVerify cross-checks each citation against the official court registry, so a fabricated case is flagged before it ships.

Confident answers, because they’re grounded.

The AI you can put in front of a judge — because the facts came from the record, not a guess.