Inspiration

Medical students learn to take a patient history by practising on actors: a few paid slots per term, always with someone watching. The skill that matters most, asking the right question in the right way, gets the least practice. We wanted a patient you can interview by voice at eleven at night, as often as you need, who reacts like a real person: guarded when you rush, open when you are kind, and never handing you the diagnosis for free.

What it does

MedBot is a virtual interview patient. You pick a patient (neuroscience, memory and dementia, cardiology) and interview them by video, voice or text.

  • Every patient is an iceberg. Each case is a fixed set of facts on three levels: what they tell you if you ask, what comes up only with a follow-up, and what they reveal only once they trust you.
  • Same illness, different person. Daniel (stoic) and Lena (worrier) have the same thunderclap headache, a suspected brain bleed. Daniel reports three red flags in a perfectly calm voice. Lena volunteers her fear before you even ask.
  • Trust is earned. Open questions, empathy and explaining why raise trust. Jargon, interrupting and rapid-fire closed questions lower it.
  • The reveal. At the end you give your diagnosis and the water drains away. You see which facts you found, which red flags you missed and why they matter, a Calgary-Cambridge communication score, and a clinical note that can be exported as FHIR.
  • Formats. Practice mode with hints, an OSCE station (60 s door note, 8 minutes) and a 3-minute red-flag sprint.
  • For teachers. A case creator turns a two-line brief into a full patient case, then validates and stress-tests it.

How we built it

  • Disclosure gate. Every student turn is classified, and deterministic rules decide which facts it unlocks. The voice model only ever sees the facts that are unlocked, so it cannot leak what it does not know.
  • Voice. OpenAI Realtime handles speech. A live Deepgram transcript lets the gate run while the student is still talking, so the answer starts about 1.5 s after the last word. An Anam avatar adds a lip-synced face whose expression follows the patient's mood.
  • Fact ledger. After every answer, deterministic checks and an LLM claim check look for leaks, jargon, contradictions and character breaks. Slips are corrected on the next turn, never by revealing a locked fact.
  • Persona dials. Anxiety, talkativeness, downplaying, health literacy, starting trust and humour compile into answer length, tone, disclosure speed and voice.
  • Stress-test harness. Simulated students (rushing, jargon, interrupting, trick questions and jailbreaks) run full interviews while a judge checks every answer.
  • React + TypeScript frontend, Express API on Vercel, Upstash Redis for sessions.

Challenges we ran into

  • Keeping an LLM from inventing medicine. Prompting alone was not enough. We moved the decision of what the patient knows out of the model and into our own rules.
  • Latency vs. control. Checking every answer costs time. Running the gate on the live transcript, before the student finishes, removed the extra model pass.
  • Staying in character. We measured Gemini Live: it was slightly faster, but it added medical disclaimers that broke the character, so we stayed with OpenAI Realtime.
  • A face without lag. The avatar adds about 1 to 1.5 s, so captions, barge-in and latency are timed to when the student actually hears the face.

Accomplishments that we're proud of

  • 367 simulated interviews. In the latest run (18 interviews, 215 answers): 0 invented medical facts, 0 contradictions, 0 character breaks, 0 % jargon, and only 0.9 % of answers said more than was asked.
  • A blind judge, reading only the patient's lines, named the personality correctly in 17 of 18 interviews.
  • The iceberg report: you can see how deep into a patient's trust you got.

What we learned

  • Reliability comes from architecture, not from prompts: decide the facts first, then let the model speak.
  • Measure, don't demo: one good conversation proves nothing, a few hundred checked ones do.
  • We only read behaviour (pace, pauses), not the student's emotions, which the EU AI Act prohibits inferring in education (Art. 5(1)(f)).

What's next for MedBot

  • Cases reviewed by clinical mentors (all current cases are marked unreviewed).
  • Breaking bad news and other hard conversations.
  • FHIR export into hospital and university systems.

Built With

Share this project:

Updates

Submission history