Inspiration
Health information is available, but it is hard to use. A lab report is a grid of numbers, often in a language or at a reading level the patient can't follow. People who take several medicines have no easy way to know whether two of them clash. General chatbots answer these questions from memory, and in medicine a fluent, confident wrong answer ("no interactions") is the most dangerous failure. And when someone types "chest pain" into an AI app, the response should never depend on whether a language model happens to behave.
The ForgeHacks AI + Healthcare prompt asked for healthcare information that is clearer, more accessible, or easier to act on. We took that as a challenge to build AI that is honest about what it knows.
What it does
Vitalis is an AI healthcare copilot with a trust layer around the models. Every AI output is verified by code, grounded in a cited source, or clearly labelled as unverified, and the user can see which.
- Plain-language report explainer: upload or photograph a lab report, then pick one of 9 languages (including Hindi, Spanish, Bengali, Tamil and Arabic with right-to-left support) and a reading level. It can read the explanation aloud.
- Verified lab flags: the vision model transcribes the report, then code re-computes every low/normal/high flag from the reference range printed on that report. Disagreements are corrected and shown. Ranges it can't parse are marked "not auto-checked".
- FDA-grounded medication safety: it retrieves real FDA drug-label text (openFDA) and shows the verbatim excerpt and source. The model may only summarise excerpts it is given, and the advice is a fixed template, so it can never tell someone to stop a medicine. If the lookup fails, the result is labelled "AI only · unverified", and "nothing found" never means "safe".
- Emergency detection that doesn't depend on a model: an 11-category red-flag detector runs live in the browser as you type and again on the server before any model call. The symptom checker's urgency is enforced in code and still returns an emergency result if the AI is down. Emergency numbers adapt to the user's country instead of assuming 911.
- Visit Prep: the last 30 days on one printable page, with vital trends, flagged labs with previous values and repeated symptoms. All numbers are computed in code; the AI only suggests questions to ask.
- One-click demo: a sample patient and a sample lab report, with no sign-up.
How we built it
Next.js 16 (TypeScript), Firebase Auth and Firestore, Groq (Llama 3.3 70B) for fast chat and summaries, and Google Gemini for vision, structured JSON and deep chat. The design principle is that models read and write, while deterministic, tested code checks, retrieves evidence and enforces safety.
- A red-flag engine with negation handling, region-aware emergency numbers, and an urgency floor.
- A reference-range parser for real-world lab formats (
70-99,< 5.7,≥60,4,500-11,000, decimal commas) that refuses sex-specific or categorical ranges. - openFDA retrieval with drug-name normalisation, 13 drug classes, label-language classification (contraindicated / avoid / monitor), caching and timeouts.
- zod validation on AI output, per-user and per-IP rate limits so anonymous demo sessions can't drain quota, and a Gemini model-fallback chain.
- 60 automated tests, including a safety evaluation set of 29 emergency phrasings that must trigger and 16 benign or negated phrasings that must not, plus CI.
Challenges we ran into
- Making "don't trust the AI" concrete. It's easy to say; harder to build. Every feature needed a deterministic check next to the model call, and a designed failure mode for when that check can't run.
- Our own tests found real bugs. The emergency detector missed "numbness in my left arm" and "bleeding heavily", and our lab logic wrongly called a value of
<0.5normal against a0.3–1.0range when it could equally be low. We fixed the code, not the tests. - Live AI reliability. During deployment a Gemini call failed, so we added automatic fallback to other models, clearer error messages, and a larger output budget for models that count "thinking" tokens.
- Honest limits. Drug interaction checking depends on label wording and coverage. Absence of a mention is not evidence of safety, and the UI says so.
What we learned
For health AI, trust comes from the surrounding system, not from a better prompt. Showing users where an answer came from (code, a cited FDA label, or unverified AI) changes how they can use it. Small, tested, deterministic pieces make an AI product easier to demonstrate and to trust.
Built during ForgeHacks vs. pre-existing
Vitalis existed before the hackathon as a health-tracking app with AI chat, a 3D symptom checker and basic document upload. The trust layer, plain-language multilingual explainer, FDA-grounded interaction checker, Visit Prep, demo mode, 60-test suite and CI are all new for this event. The full list is in the repository README.
What's next
Clinician-reviewed critical-value thresholds, emergency detection for non-English input, a pharmacist-reviewed interaction knowledge base, medication reminders, and FHIR import.
Vitalis provides general health information. It is not a medical device and does not diagnose.
Log in or sign up for Devpost to join the conversation.