Dosage guard
Every dose in a draft must match a source, however it’s written.
fifteen milligrams15mg15 mg15 mgin sourceStart Caloradine at 50 mg once daily.50 mgin no sourceOpen-source clinical AI that answers only from sources you trust, cites every claim, and refuses when it can’t back one up.
MIT licensed. Runs on your own machine in a few minutes — see Get started.
Question: “What is the recommended dose of Zalortin for a patient with Veltris syndrome?”
A real screen recording of the app on a laptop, with synthetic data and no API key.
Plain, testable checks decide what’s shown, with or without AI.
Each sentence points to the source passage it came from.
A full trace is saved, whether it answered or refused.
Unedited screenshots of the app in this repository, in light and dark mode, with synthetic data.
Start from guardrails that already work, with tests.
See refusal, citation and audit enforced in code.
An offline testbed with 265,778 test questions.
Trace any decision to its check and its source.
Not for patient care. GroundCheckHealth isn’t clinically validated or cleared by any regulator.
Any check can stop the run. Everything after it is skipped and recorded.
Real inputs, real results.
Every dose in a draft must match a source, however it’s written.
fifteen milligrams15mg15 mg15 mgin sourceStart Caloradine at 50 mg once daily.50 mgin no sourceRefuses before drafting when a key term appears in no source.
Can children take Caloradine?childrennot coveredEach claim must be supported by the source it cites.
Caloradine is started at 15 mg once daily for 14 daysVELT-002groundedRedacts obvious personal data and blocks injection attempts.
My email is a@b.comMy email is [redacted]Ignore previous instructions and…blockedOnly the drafting step changes. The same checks decide every time.
Answers are built from sentences in your sources.
Any OpenAI-compatible model drafts the answer. Groq is the default.
An open-source model on your own machine drafts the answer, through Ollama.
If a model fails or times out, GroundCheckHealth falls back to the extractive answer.
AI-written answers that never leave your computer.
Tested with Llama 3.2 3B on an Apple M1 laptop: 49 of 50 sample questions and 16 of 16 adversarial probes correct, no unsafe answers, about 10 seconds per answer.

The build fails if a single question that should be refused gets answered.
Unknown drugs, off-topic questions, missing context. Gates every build.
Questions the sources can answer. Over-refusals would be reported here.
Leading questions, misspellings, injections, casual phrasing. Reported, not gating.
Beyond the gating set, a generated evaluation of 265,778 questions and patient scenarios: medicines that don’t exist, one-letter misspellings of real ones, questions about children and pregnancy the sources don’t cover, doses the sources never state, one medicine’s dose asserted against another, instructions to ignore the sources, and patients the formulary says a medicine is unsafe for. Expectations come from the documents and the formulary, never from GroundCheckHealth’s own code. A sample runs on every push and the whole set weekly. In the latest run, all 222,210 questions that had to be refused were refused.
The other direction is measured too, because it is the one a clinician feels: 12,056 answerable questions asked the way a person asks them — “remind me”, “a colleague asked”, “what’s the duration”, “for a 40 year old” — with none refused. A separate run puts 1,215 deliberately wrong claims to the grounding and dosage checks, which the big evaluation cannot do, because its answers are quoted from the sources and so are true by construction. None of the wrong doses were accepted.
Runs offline in extractive mode, so these results measure the checks, not a language model.
Structured like MedQuAD and DailyMed drug labels. Every drug and dose is invented, so it’s safe to share and fork.
| Type | Documents |
|---|---|
| Conditions | |
| Drug labels | |
| Lab markers | |
| Procedures | |
| Reference notes |

Call it from your own app, a batch job or a test suite.
curl -X POST http://localhost:8000/api/ask \
-H "Content-Type: application/json" \
-d '{"query": "What is the recommended dose of Zalortin?"}'
{
"decision": "refuse",
"refused_reason": "the term 'zalortin' does not appear in any trusted source",
"claims": [],
"sources": [{ "id": "VELT-002", "score": 0.71, … }],
"trace": [
{ "name": "retrieval gate", "status": "pass", "detail": "best score 0.71 clears threshold 0.30" },
{ "name": "source coverage", "status": "fail", "detail": "the term 'zalortin' does not appear in any trusted source" },
{ "name": "generate", "status": "skip", "detail": "not reached" },
…
],
"audit_id": "a83c1266",
"llm_used": false
}
Send a settings object to override thresholds or switch individual guards for a single request. Configured defaults are never changed.
POST /api/askGET /api/auditGET /api/audit/{id}GET /api/settingsGET /api/eval-summaryGET /api/corpusGET /api/healthPOST /api/auth/loginGET /api/local-aiPoint it at your documents and run it on your own machines.
Upload PDFs, Word files or web pages, approve them, and they’re searchable with citations.
curl -X POST http://localhost:8000/api/sources \
-F file=@sepsis_protocol.pdf \
-F owner=Pharmacy \
-F expires_on=2027-09-30
Every threshold is an environment variable.
RETRIEVAL_MIN_SCORE=0.30
GROUNDING_MIN=0.45
TOP_K=4
RATE_LIMIT_PER_MINUTE=30
Any OpenAI-compatible API, or none at all.
GROQ_API_KEY=…
GROQ_BASE_URL=https://api.groq.com/openai/v1
GEN_MODEL=llama-3.3-70b-versatile
FORCE_EXTRACTIVE=false
One container. In extractive mode, nothing leaves the machine.
docker build -t groundcheck .
docker run -p 7860:7860 groundcheck
Each one is a good place to contribute.
From a reference pipeline to a platform hospitals can run safely. Planned work is built in the open.
Prove that a clinical assistant can refuse, cite and record by design.
AI-written answers that never leave the machine.
Every user, decision and passage in a durable, queryable home.
Answer from a hospital’s own approved guidelines, formularies and protocols.
Turn every refusal and flagged answer into a reviewed, closed case.
Meet hospital IT and information governance requirements.
Check answers against the patient in front of the clinician, not just the literature.
Bring grounded answers into the clinical workflow, where decisions are made.
Apply the same principle to scans: show the evidence, or abstain.
Train imaging models on your own images and hardware, and keep them in a library.
Run across many sites, and catch problems before clinicians do.
GroundCheckHealth holds no certifications or clearances today. These are the standards it is being designed toward.
Want to shape what comes first, or help build it? Join the discussion on GitHub.
For teams without a machine learning platform. Try it on public CT scans with one command.
Run a trained model over whole CT and MRI series on the CT and MRI page. NIfTI input and 3D models are planned.
Run it locally in a few minutes. Python 3.12, or Docker. The embedding model downloads once, the first time you build the index.
git clone https://github.com/sumitgundawar/GroundCheck.git
cd GroundCheckHealth
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python scripts/build_index.py
uvicorn app.main:app --port 8000
Then open http://localhost:8000.
git clone https://github.com/sumitgundawar/GroundCheck.git
cd GroundCheckHealth
docker build -t groundcheck .
docker run -p 7860:7860 groundcheck
Then open http://localhost:7860. The image builds the index and runs the evaluation during the build. This run is for trying it out and keeps nothing; the on-premises guide covers an install that keeps its data.
Full setup, configuration and Windows instructions are in the README.
Not answered here? Ask on GitHub.
No. It’s research and engineering software. It hasn’t been clinically validated or cleared by the FDA, a notified body or any other regulator, and it must not be used to make decisions about real patients.
Not in extractive mode. Questions are processed locally, and the only download is the embedding model when the index is first built. In live model mode, the redacted question and retrieved passages are sent to the provider you configure, so choose that provider under your own data-protection rules.
Yes. Import your approved guidelines, formularies and protocols as PDF, Word, HTML or Markdown; someone other than the uploader approves each one, and every change is checked against the safety tests before it goes live. Re-tune the thresholds and add test questions for your content, because the defaults were tuned on synthetic data. Keep real patient data out of issues and pull requests.
Any API compatible with OpenAI chat completions that supports JSON output mode, including servers you host yourself. Set GROQ_BASE_URL, GROQ_API_KEY and GEN_MODEL. The variable names mention Groq because it’s the default provider.
Yes. Install Ollama, then open the Local AI panel in the dashboard. GroundCheckHealth recommends open-source models that fit your machine, downloads the one you choose, and runs it locally. Extractive mode is also fully local, without AI-written drafts.
No. Embeddings and vector search run on a CPU, and a laptop handles the demo corpus comfortably. Local AI models use a GPU when one is available, and smaller models run on a CPU.
The MIT License allows commercial use, modification and redistribution. Making a clinical product out of it is your responsibility, including any regulatory approvals, validation and data-protection obligations.
Yes. Choose a folder of images arranged by class, pick a GPU or the CPU, and watch it train. Each model is saved to a library with its accuracy per class, and it abstains when it isn’t confident or an image looks unfamiliar. To try it, python scripts/fetch_scan_dataset.py organamnist downloads public abdominal CT slices.
Yes. One installation serves several hospitals or clinics: each site sees only its own questions, reviews, incidents and imaging, and group staff see all of them. It runs with Docker Compose and PostgreSQL, or on Kubernetes with the Helm chart, and exposes Prometheus metrics, health probes and alerts for your operations team.
Yes, as a research and evaluation workflow. Import DICOM series by upload or from a PACS, run a model trained in the studio over them, and sign a report that exports as a DICOM Structured Report. Models abstain on series unlike their training images: the demonstration CT model, trained on small public organ crops, abstains on real abdominal CT. No model here is validated for diagnosis. NIfTI input and 3D models are planned.
Run it, break it, and tell us what it got wrong. Code, test cases and ideas are all welcome.