ONGRID: adding zero-token verification to GraphRAG
Most GraphRAG systems do two things: retrieve facts from a graph, then let an LLM generate an answer. They skip the step that actually matters in production: deciding whether the answer is true. ONGRID is an open engine
Most GraphRAG systems do two things: retrieve facts from a graph, then let an LLM generate an answer. They skip the step that actually matters in production: deciding whether the answer is true.
ONGRID is an open engine (Apache-2.0) that adds that third step. The name is the pipeline:
Ontology-Native Graph, Retrieval, Inference, Decision.
- Live demo: https://huggingface.co/spaces/FINAL-Bench/ONGRID
- Code: https://github.com/final-bench/ongrid
The pipeline
- Ontology-Native Graph. Documents become typed entities and typed relations, rendered as a navigable 3D graph (rotate, zoom, cluster, search).
- Retrieval. For a question, ONGRID pulls only the graph facts that are relevant.
- Inference. An LLM answers using those facts, and the evidence triples are shown next to the answer.
- Decision. A zero-token judge (ZTC-Judge) reads the question and the answer and returns a trust verdict, generating no tokens at all.
Why a zero-token judge
Verification usually means calling another generative model, which is slow and expensive and adds its own hallucinations. ZTC-Judge instead reads the question and answer in a single forward pass, takes the final-layer hidden state, and applies a calibrated probe to produce a trust score with clear thresholds. No tokens are generated, so it is fast and deterministic.
In ONGRID this gives every answer a verdict (ok, hold, review) with a score, so you can route low-confidence answers to review or to a stronger model instead of shipping them blind.
Try it
The live demo loads a default knowledge universe and lets you ask questions in English, Korean, or Chinese. You can also upload your own documents (parsed in the browser) and the graph rebuilds from them.
git clone https://github.com/final-bench/ongrid.git
cd ongrid
export ANTHROPIC_API_KEY=sk-ant-...
docker build -t ongrid . && docker run -p 7860:7860 -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY ongrid
If you build with GraphRAG, the decision layer is the part worth stealing. Code and issues are open: https://github.com/final-bench/ongrid
Built by VIDRAFT. A star on the repo helps if you find it useful.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.