How final-bench/ongrid works
ONGRID’s user workflow is to load or supply documents in the browser, build and explore a typed 3D knowledge graph, retrieve graph facts for a question, generate a fact-grounded answer, and verify it with ZTC. The repository exposes a browser UI and a compact FastAPI backend: the backend accepts facts from the client and calls Anthropic for answers, while ZTC loads and scores locally. The README documents browser-side graph construction, retrieval, visualization, and multilingual features; the frontend source was not sampled, so its internal wiring is not shown.
Main entry points: index.html Graph UI · app.py Answer endpoint
Components 12
Browser experience
- Graph UI
static/index.html - Document ingestion
static/index.html - Ontology graph
static/index.html - Fact retrieval
static/index.html
Answer service
- Answer endpoint
app.py - Rate limiter
app.py
Verification
- Verify endpoint
app.py - ZTC model loader
app.py - ZTC scorer
app.py
Other components
- User
- Anthropic API
- ZTC-Judge model
Connections 16
- User → Graph UI: uses
README.md - User → Document ingestion: uploads documents
README.md - Document ingestion → Ontology graph: structures knowledge
README.md - Graph UI → Ontology graph: renders and explores
README.md - Ontology graph → Fact retrieval: supplies graph facts
README.md - User → Fact retrieval: asks question
README.md - Fact retrieval → Answer endpoint: posts facts and query
README.md - Answer endpoint → Rate limiter: checks request rate
app.py - Answer endpoint → Anthropic API: requests grounded answer
app.py - Answer endpoint → Graph UI: returns answer
app.py - Graph UI → Verify endpoint: submits answer for verification
README.md - Verify endpoint → Rate limiter: checks request rate
app.py - Verify endpoint → ZTC scorer: scores answer
app.py - ZTC scorer → Graph UI: returns verdict
app.py - ZTC model loader → ZTC-Judge model: loads model snapshot
app.py - Verify endpoint → ZTC model loader: reports readiness
app.py