AI & modern homeopathy

Trust & Safety

Grounded AI: How Evidence Citations Prevent Hallucinated Answers in Clinical Use

Why Gentle Pills' AI only cites passages it was actually given, stores them as inspectable evidence rows, and says so plainly when it has nothing to cite.

October 23, 2026 · 7 min read · Gentle Pills Engineering

"Grounded AI" gets used loosely enough in product marketing that it's worth being precise about what it actually means in Gentle Pills, because the mechanism is more specific — and more mechanical — than a prompt instruction telling a model to "only use the provided context." That instruction can be ignored. The mechanism described here can't be, by construction.

How a knowledge research answer actually gets built

Two of the system's AI tasks — research_knowledge and compare_remedies — answer open clinical-knowledge questions by synthesizing across the Materia Medica and repertory corpus. Before either task calls a model at all, a retrieval step runs first: it searches the loaded corpus for passages relevant to the question, and only the passages that retrieval actually returns are candidates for being shown to the model.

Each retrieved passage gets tagged with an identifier — E1, E2, E3, and so on — before it's inserted into the prompt as context. The model is instructed to cite its claims using those exact tags, and nothing else. When the task's output comes back, each citation in it is a reference to one of those tagged passages, which are themselves stored as AiEvidence rows tied to the resulting AiAnalysis record.

That storage step matters as much as the tagging does. A citation in the finished answer isn't just a label the model attached to a sentence — it's a pointer to a real, retrievable passage that a doctor can open and read directly, in the same interface, without having to trust that the AI represented the source accurately. The evidence is inspectable, not just claimed.

The mechanical constraint, and why it's different from an instruction

The distinction worth making explicit: the model is not being *asked* to only cite provided context. It is only *given* the tagged passages that retrieval returned, and it can only reference tags that exist in what it was given. There is no E7 to cite if retrieval only returned six passages. This is a structural property of what's in the prompt, not a behavioral instruction the model could follow loosely, interpret differently, or drift away from under different phrasing or a different model family.

That distinction is the entire difference between "grounding" as an architectural constraint and "grounding" as a polite request. A prompt instruction to stay within provided context is a request a sufficiently confident model can override — it has no mechanism preventing it from generating a citation to a source it wasn't given, if its training makes a plausible-sounding citation more likely than an honest "I don't have that." Tagging and tracking exactly which passages were retrieved, and only allowing citations to reference those tags, removes that option at the structural level rather than hoping the model declines it.

What happens when retrieval comes back thin

The behavior that matters most architecturally isn't what happens when retrieval succeeds — it's what happens when it doesn't. If a question falls outside what the loaded corpus actually covers, or retrieval only surfaces marginally relevant passages, the system is designed to say so plainly rather than filling the gap with a plausible-sounding answer synthesized from the model's general training rather than the actual corpus.

This is the real anti-hallucination mechanism in the system, and it matters more than which specific model backs a given tier. A larger or more capable model doesn't make an ungrounded answer safer — it tends to make it *more* convincing, which is worse, not better, in a context where the convincingness of an unsupported answer is exactly the failure mode you're trying to prevent. Retrieval-then-tag-then-constrain is a property of the system's data flow, independent of which model is doing the synthesis at the end of that flow.

Why this matters specifically here

Gentle Pills' Materia Medica corpus is built from public-domain 19th- and early-20th-century sources — Kent, Boericke, Hering, Allen — each with real citation provenance that a working doctor has genuine reason to want to verify, not take on faith. An AI answer that confidently states a position attributed to "classical sources" without a traceable pointer to which source, which passage, is not meaningfully more useful to a doctor than no answer at all — arguably less useful, because its confidence can substitute for the verification step a doctor would otherwise do themselves.

An honestly uncertain answer — "the loaded corpus doesn't contain sufficient material to address this directly" — costs nothing but a moment of friction. A confidently wrong answer, dressed in the same fluent tone as a correct one, costs a doctor's trust in every subsequent answer the system gives, and in a tool meant to assist clinical judgment rather than replace it, that trust is the entire point of building the system carefully in the first place. The citation mechanism exists to make the difference between those two outcomes a property of the architecture, not a hope about model behavior.

Everything described here applies to how the system retrieves and cites *published classical source material* — it says nothing about, and makes no claim regarding, the clinical validity of homeopathic prescribing itself, which remains entirely a matter of the treating doctor's judgment applied to the individual patient in front of them.

See it running, not just described

Try two of these AI tools yourself with no sign-up, or register a free clinic workspace — it's free for the first 50 clinics.

Reminder: this information is published for qualified practitioners. Patients must not self-medicate — homeopathic prescribing depends on the complete individual symptom picture, which only a doctor can evaluate. Please visit a homeopathy doctor.