Inspiration

People take herbal products alongside their medicines, and finding out whether that is a problem is harder than it should be. The facts are scattered across EMA herbal monographs, FDA drug labels, NCCIH fact sheets and a lot of papers. Those sources use different names, formats and dates, and they are not equally reliable. A regulator's contraindication, a test-tube enzyme result and a single case report are not the same kind of evidence, yet a normal search lists them side by side. "Nothing found" also sounds like "fine", and a general chatbot will answer confidently without saying where the answer came from.

We kept asking one question: what is actually known about taking this herb with this drug, how good is that evidence, and who said it? HerbaGuard is our answer. It addresses Track 04 (Digital Health & Phytotherapy): herb–drug interactions, evidence explained for patients, and safety signals.

What it does

  • Interaction checker. Pick a herb and a drug (brand names such as Coumadin resolve to warfarin). HerbaGuard returns a class from A to E, with the exact source sentences behind it.
    • A: Documented. An official source names this drug or its class.
    • B: Potential. Partly named, or a shared enzyme.
    • C: Unclear. Sources conflict or aren't clear.
    • D: Nothing reported. This does not mean safe.
    • E: Not enough information.
  • There is no "safe" result. D and E are never shown in green. We never invent a severity; we show the source's own words, such as "is contraindicated". If sources disagree, we show both.
  • Herb Explorer. Browse 16 herbs (21 species), with per-plant coverage across sources.
  • Evidence assistant. Ask a plain question and get a cited answer. A local model writes it, and the code then checks every answer.
  • Sources & methodology. Every dataset is listed with its licence status.

How we built it

  • Data we trust for the verdict: EMA herbal monographs, openFDA drug labels, NCCIH fact sheets, PubMed studies tagged by type, and the FDA enzyme table (CYP3A4, P-gp and others). WFO, RxNorm and ATC give correct plant and drug names. That is 545 interaction statements, each quoted word for word and linked to its source.
  • More data, kept in its place: DDID experimental records, SUPP.AI literature mentions, LiverTox liver-safety information and NIH DSLD manufacturer labels. They appear as extra context and can never change the A–E result.
  • The verdict comes from fixed rules, not a model. The steps are to find the names, collect the statements that name the drug or its class, check the mechanisms, then apply the rules. The first rule that fits wins, so the same input always gives the same answer.
  • The AI assistant is constrained. It uses hybrid retrieval (keyword plus meaning-based search) over our sources, and a local Qwen3-4B model through Ollama, so nothing leaves the machine. Validation then enforces these rules:
    • no citation, no paragraph;
    • a wrong class means no answer;
    • no "safe", no doses, no instructions to patients;
    • animal results can't pass as human ones. If the model is unavailable, it simply quotes the relevant sentences with their sources.
  • Stack: FastAPI, PostgreSQL with pgvector, SQLAlchemy and Alembic on the backend. React, TypeScript, Vite and Tailwind on the frontend. It runs locally with docker compose up --build.

Results

  • Rule engine: 156 real herb–drug pairs classified (147 class A, 9 class C), and checked by hand on known cases, such as St John's wort + warfarin = A and hawthorn + warfarin = D.
  • Search: on 30 test questions, 87% had a relevant source in the top 5, with a median search time of 0.36 s. Combined search beat keyword-only and meaning-only.
  • Assistant: on laptop CPU, 100% of answers matched the rule engine's class and 100% of citations pointed to real sources.
  • Tests: hundreds of automated tests across backend and frontend.

Challenges

  • Weighing evidence. The hardest design question was how to show unequal evidence without implying a quality score. Reference labels and document types describe a source, not how reliable it is.
  • Keeping the model in its place. The language model never decides the class. It only explains what the rules and sources already say, and validation rejects anything else.
  • Speed. A fresh answer takes about two minutes on a laptop CPU. We pre-validate and cache answers for the three suggested questions so they load in about two seconds, and the cache is only served when everything it depends on is unchanged.
  • Data quality and licences. We audited the SUPP.AI data ourselves and found issues. Licensed data (DrugBank, UMLS, SNOMED) stays out of the public repository, and source licences are shown in the app.

What we learned

Showing where a statement comes from, and how weak the evidence can be, is more useful than a confident answer. Saying "we found nothing" without implying "safe" takes deliberate design, and fixed rules plus a checked language model beat an unconstrained one for health information.

Limits and what's next

  • Only 16 herbs so far. No pharmacist has reviewed the answers yet. Traditional use isn't proof a herb works.
  • There is no "which herb should I take" feature, no personal data is stored, and no Indigenous knowledge is used without consent.
  • Next: go from 16 herbs to all 251 EMA monographs, have pharmacists review the AI answers, and link monograph indications to ICD-11 and MeSH.

HerbaGuard is not medical advice. The absence of a reported interaction does not mean a combination is safe.

The team

We are all students at the University of Prishtina: Gresa Hasani, Lizë Syla and Diellart Mulolli.

Built With

Share this project:

Updates

Submission history