Inspiration

Medical students practise history-taking and breaking bad news on simulated-patient actors: paid by the hour, a handful of slots, every one counts. What's missing is practice on demand – at 11 pm, as often as you like, with no one watching.

What it does

  • Talk to a patient by voice (push-to-talk, or type). Derek, 68, and Claire, 47, have the same liver disease and completely different personalities. They answer in lay words, only what you ask, and hide things until you earn trust (Derek's drinking, Claire's morning drink). Ask "Do you smoke?" and you get "Now and then"; ask "How many a day?" and they own up.
  • Examine the 3D patient by asking: "look up", "say ah", "lift your tongue", "show me your palms". Findings appear only for what you actually looked at (Normal / Abnormal), with how-to-examine steps. Vital signs: count the pulse and breaths yourself, measure the rest, get a NEWS2 score.
  • Feedback after the talk: did the patient open up and why, the trust curve with your own quotes, what to work on (with retry-this-moment), what went well, history vs the true chart, the OSCE checklist, measured reply time.
  • Hand over to an AI registrar (English or German, for the Fachsprachprüfung) who holds the true chart: every claim is checked – backed, not established, contradicted or invented.
  • Note: an admission note with only what the patient told you, exportable as FHIR R4.
  • Next patient: your weak spot becomes your next patient, generated from a synthetic FHIR record.
  • Teachers: create a new patient from a FHIR record in ~20 s, a class overview that ranks who needs the scarce actor slot first, and a quality badge from automated test interviews of every patient.

How we built it

  • Design rule: the engine decides what the patient may say; the LLM only voices it. Case files hold every fact with its lay wording; a deterministic state machine (trust, emotion, conduct ladder) decides what is in the prompt each turn. A trust-gated secret is not in the prompt until unlocked; question-gated facts need the specific question.
  • Voice: OpenAI gpt-realtime-2.1 over WebRTC; the engine steers it mid-conversation with session updates. Per-turn analysis of the student's line by a separate model + a fine-tuned DeBERTa skills classifier (ONNX, on CPU).
  • Face: TalkingHead / three.js avatars with lip-sync, per-sentence expressions, listening nods timed from the student's prosody, and jaundice colours computed from the case's lab values with a physical tissue-optics model.
  • Stack: backend FastAPI + pydantic, 423 tests; frontend React + TypeScript + Vite + Tailwind.
  • Evaluation harness: simulated students in 6 styles + the brief's 12 acceptance tests, scored in code, Wilson 95 % CIs.

Challenges we ran into

  • Keeping the story straight. Our first full evaluation failed 2 of the 12 acceptance tests: Derek said the yellowing started "a few weeks" ago in 70 % of answers (record: 6 days) because the number was only in the chart, not in his own words. We fixed the case files and re-ran: 0 invented numbers in 152 consults.
  • Timing a voice model. A gated fact must be in the instructions before the reply starts; on a fast follow-up the gate opened 25 ms after the reply had already been requested, and the patient's correction was dropped. Found while recording the demo, fixed (the correction now waits for the first reply).
  • Honesty in the numbers. We report failures and negative results (e.g. a contradiction detector we rejected after a hand audit) instead of only the good runs.

Accomplishments that we're proud of

  • The secret opens to good communication, not to anyone: empathetic simulated students unlock it 81 % [57–93] of the time, all other styles 3 % [1–11]; premature disclosure 0/76 consults.
  • 11 of 11 applicable acceptance tests from the brief pass in the retest, 0 invented numbers in 152 consults.
  • Derek and Claire are told apart in 89 % of replies to identical questions (chance 50 %).
  • Text-mode time to first token p50 0.75 s; the debrief shows the measured voice reply time of each consult.

What we learned

Realism is a contract, not a prompt: if a number isn't in the patient's own words, the model invents one. Measure it, don't assume it.

What's next

Clinician review of the cases (values marked [verify]); human-labelled validation of the classifiers; German patients (not only the German handover); licensed avatars for a product; LTI 1.3 for learning platforms.


Patient avatars: Ready Player Me / TalkingHead example avatars, used for this non-commercial hackathon demo. Synthetic FHIR records only; no real patient data.

Built With

Share this project:

Updates

Submission history