Guardrails for LLM answers¶
GroundLens checks an LLM answer against its sources without a model, decides PASS, REVIEW or FAIL under your policy, and keeps a signed record.
It checks every figure against the passages the answer was written from, and where each figure came from. A policy you own turns that evidence into a decision, and the record of it is signed and stored before the decision returns. Anyone can verify the records offline, with the public key alone. If you already run an LLM judge, GroundLens runs first, and a FAIL never reaches the judge.
Who this is for
Teams whose LLM answers carry figures from documents, in finance, credit, insurance, legal or reporting, and who have to show later, to someone else, that each answer was checked, how, and under which rule.
Start here¶
pip install groundlens
import groundlens as gl
verifier = gl.Verifier(sink=gl.sinks.jsonl("records/"))
record = verifier.check(
answer="Revenue was €42.1 million.",
passages=["Revenue reached €41.2 million."],
)
print(record.decision, record.reasons)
FAIL ['c2: groundlens.numeric contradicted: €42.1 million not in sources; nearest 41200000 EUR in ctx-0 (relative distance 0.021)']
No account, no API key, no model, no network. The signed record is in
records/ before check returns. Then read the
concepts to see what the pieces mean.
The documentation¶
Getting started — install, verify your first answer. No model is needed.
Concepts — verifiers, claims and evidence, policies, records, the execution runtime, determinism, and the EU AI Act mapping.
Guides — task-by-task walkthroughs, from verifying an answer to producing an evidence package for an auditor.
Python API — every public function and class, from the docstrings.
Command line — the
groundlenscommand, andglvfor checking records without Python.Design — what changes in the next release and why, and what is built.