Check whether an LLM's answer actually came from its source.
Fast, deterministic, no second LLM.
For RAG systems and agent loops in regulated industries.
One question, one answer, one source. One reading you can act on.
You give Groundlens a question, an answer, and the source it was supposed to use. It returns a plain-language CHECK — and does it in milliseconds, the same way every time.
Read the docsYou have to verify every LLM call. You can't afford to verify them all the expensive way.
Verification is a pipeline of six stages, ordered cheapest to most expensive. Each stage is a filter: it settles what it can and passes only the doubtful cases forward. Groundlens is stages 1–4 — geometry, a state switch, consistency, and rules. So the slow, costly stages 5–6 only ever see the few answers that were actually flagged.
Did the answer come from its source, or drift off it?
no modelMay this answer enter agent or RAG state?
no modelDoes the model agree with itself when asked again?
small modelDid it break a policy, invent a number, skip a disclosure?
policyHard cases that need real reasoning over the evidence.
tokensA person makes the final call.
a personThis is the whole reason Groundlens exists. Use it as triage at the front of the pipeline: clear the obvious cases in milliseconds, keep ungrounded answers out of agent state, and escalate only what's flagged to a judge model or a human. Same coverage on every call — a fraction of the time and cost.
What it catches, what it doesn't, and why you can check both.
SGI and DGI measure grounding, not truth. These two geometric scores tell you whether an answer is grounded in its source — not whether it is true. A hallucination phrased faithfully can still score as grounded. That gap is why the pipeline has Consistency: it probes truth by asking the model again. Read an SGI/DGI score as "did this come from the source?" — and lean on Consistency for "does the model actually know this?"
Answers that ignore the source or drift off the question — the failures that leave a trace in the geometry of the text.
A wrong fact phrased exactly like a right one sits next to a correct answer. Geometry can't separate them — which is precisely why a consistency stage exists.
Thresholds and reference direction are calibrated and versioned. The same input gives the same result — today and two years from now.
Drop it into the stack you already run.
Score every response in place — SGI when you pass the source, DGI otherwise — and collect the readings.
The same first-stage check inside Claude, Cursor, and VS Code. It prints a CHECK under each answer, with no model in the scoring path.
groundlens-dev/groundlens-mcp →- —The core scores on your machine. It never sends your data out.
- —API keys are yours; calls go direct to the provider you choose.
- —No telemetry. Same inputs, same scores — a trail you can reproduce and audit.
Javier Marín created the method and the library. Published in the open, maintained in the open — the three papers above are the method on the record.
One person maintains this in the open. If it verifies answers you ship, funding buys more of it — and keeps it free for everyone else.