Skip to content

GroundedAI 0.1.0

Latest

Choose a tag to compare

@pouyapd pouyapd released this 20 Oct 08:46
7695e43

Live demo: https://pouyapd.github.io/GroundedAI/ (runs entirely in your browser; no install, no account)

GroundedAI is a local retrieval-augmented question-answering application that checks its own answers: every statement is compared with the passages the model received and comes back with a status, the exact quoted sentence and its page. Conflicting sources are shown side by side, and the reply is "not enough evidence" when the documents do not say.

Highlights

  • Online demo. The unchanged FastAPI application runs in the visitor's browser (Pyodide in a Web Worker): PDF upload and extraction, hybrid retrieval, the prompt and all checks. Two synthetic sample PDFs and example questions are loaded. Optionally, Qwen2.5-1.5B-Instruct runs on the visitor's GPU (WebGPU via WebLLM, about 880 MB downloaded once), and its answers go through the same claim check. This model option is new. Updated 2026-10-20: it has been checked end to end on the live site in Chrome (19 of 19 browser checks): the model loaded, its answer was checked against the PDF, and a citation it invented was flagged as invalid (screenshot). Interrupted downloads resume automatically. Details: docs/ONLINE_DEMO.md.
  • Claim-level checks. Each statement is checked against every retrieved passage; citation labels are validated; malformed and bracket-only replies are recognised; a disagreement check compares values across documents without pairing different dates, groups or organisations. Two versions of each check: claims-v1 / disagreement-v1 (defaults) and claims-v2 / disagreement-v2 (opt-in).
  • Local inference. A deterministic extractive generator (default), Ollama or transformers; a missing model returns 503 model_unavailable, never a silent fallback. SQLite FTS5 or PostgreSQL + pgvector; Docker image and Compose file.
  • Evaluation discipline. Versioned datasets, recorded runs with hardware and power source, a separate development set for prompt work, and a 660-case reliability suite for the checks with a frozen test split kept out of the repository.

Measured results (qwen2.5:1.5b through Ollama, CPU)

Development set (25) 56-question evaluation set
Correct, every statement verified 13 of 19 29 of 41
Correct facts, not every statement verified 3 10
False refusals 2 1
Should refuse: refused 5 of 6 8 of 10

All datasets are synthetic and small; labels were written by the project author or by language models. The checks are lexical and rule-based: a "found" statement can still be wrong or beside the question. The demo's in-browser model is a different 4-bit build of the same base model and was not evaluated. Full results and limitations: README, docs/EVALUATION.md.

Checks for this release

  • CI (GitHub Actions, 8 jobs): backend on Python 3.12 and 3.13, PostgreSQL + pgvector, front end, the online demo in a browser, offline retrieval benchmark, dependency audit, Docker image and Compose file — all passed on main.
  • Pages workflow: the demo is built, checked in Chromium, deployed, and the deployed URL is checked in Chromium from GitHub's runner (16 of 16).
  • Locally: 487 backend tests, 81 front-end tests, browser journeys of the full application (24 checks, also with qwen2.5:1.5b) and of the demo (16 checks).

Full list of changes: CHANGELOG.md.