NCDiet AI Playground

Try my dietitian chatbot for people with hypertension, diabetes, dyslipidemia or obesity. It answers only from about 450 clinical guidelines, cites the passage behind every claim as [n], and writes recipes that respect halal or vegetarian diets. Everything runs on one GPU in my homelab, with no cloud APIs, so an answer can take up to half a minute.

Checking the server…
Patient profile

A research demo, not medical advice. Questions are answered one at a time and are not stored.

Why I built it

Diet advice for chronic disease has to be right, has to fit the person's food culture, and should never leave the clinic's machine. General chatbots miss on all three: they state numbers with nothing behind them, suggest pork to a halal patient, and send patient questions to someone else's server.

How it works

Each question goes through four stages. The same pipeline produces the evaluation runs, so the numbers below come from the system you just used.

  1. Index the guidelines. About 450 documents (Malaysian MOH, ESPEN, ASPEN and others, some in Malay) are split into 1,000-character chunks. Scanned pages are OCR'd with Tesseract.
  2. Hybrid retrieval. 30 dense (bge-m3) and 30 keyword (BM25) candidates are merged with reciprocal rank fusion, then a cross-encoder re-ranks them and keeps the top 6.
  3. Grounded prompt. The 6 passages are numbered, and the prompt adds the patient's conditions and diet exclusions. For meal requests, a flavour-pairing graph suggests ingredients that work together.
  4. Generate. Factual questions go to my QLoRA fine-tune of Qwen3.5-9B. Recipe requests go to the base model, which still writes better recipes (76/80 vs 61/80 in a blind test).

What the numbers say

Every change had to beat the previous version on fixed question sets, graded blind.

19/20
right passage in the top 6 (dense search alone: 12/20)
0.85
retrieval MRR, up from 0.53
113/120
correctness + usefulness after hybrid retrieval, up from 92
7 → 3
unsupported claims after fine-tuning

Model choice came from a 30-question blind eval: Qwen3.5-9B scored 163/180 against 140 for Qwen2.5-14B. Thinking mode scored 169 but took about 56 s per answer, so it stays off.