Inspiration

Medical students learn to talk to patients by practising with trained actors. There are many students and few actors, so everyone gets a handful of slots and walks into them nervous. Avelios asked for the missing piece: a patient you can practise with whenever you want, as often as you want, with nobody watching.

What it does

Doctotrain is a whole doctor's visit with a virtual patient, in the browser.

  • The instructor picks what the student should find, for example poorly controlled blood pressure. Doctotrain generates a fitting patient: body, lifestyle, earlier conditions and their story.
  • The student runs the visit by voice in a 3D consulting room: reads the referral, lets the patient in, takes the history, examines (pulse, blood pressure, oxygen saturation, blood draw, stethoscope with real heart and lung recordings) and writes the record.
  • The patient has a personality and tells the real story only when asked, in everyday language.
  • The debrief rates seven communication skills and the medical decisions, each with the student's own quotes and a better wording. An optional webcam shows how often the student looked at the patient.

Examination Scenarios

Examinations start by saying what you are about to do ("I'm going to measure your blood pressure"). The patient walks to the chair or the couch and offers an arm, and the student performs each step:

  • Blood draw: tourniquet, needle and tubes; the lab report arrives on the computer.
  • Blood pressure: cuff and manometer.
  • Oxygen saturation: pulse oximeter.
  • Heart rate: counting the radial pulse.
  • Heart and lungs: a stethoscope on ten spots on the chest and six on the back, with real recordings that fit the patient's condition. Afterwards the student says what they heard and sees what was really there

How we built it

  • React, TypeScript and Vite; three.js for the room and a parametric 3D human we compute live from age, sex, height and weight (built on MakeHuman's open data, with motion-capture clips for walking, sitting and lying down).
  • A Bayesian network learned from the US NHANES health survey samples a consistent background for each patient; a language model writes the case from it.
  • OpenAI Realtime or Gemini Live for the spoken conversation, with lip sync and facial expressions.
  • A rule-based assessment in the browser, plus a review by Claude; MediaPipe for on-device gaze tracking.

Challenges we ran into

  • Keeping the patient believable: they know the whole case but must not volunteer it, invent facts or contradict themselves.
  • Making speech feel natural: short answers, fast replies, interruptions.
  • A body that looks right for any age and weight, and that sits down and lies on the couch without glitches.
  • Giving feedback that describes what happened without judging what a webcam cannot know.

Accomplishments that we're proud of

  • It is a complete visit, from the referral to the debrief, not only a chat.
  • Every patient is new but plausible, because the background comes from population data and not from a fixed list.
  • The patient is generated in the browser from a few numbers, and can be examined.
  • The whole flow still runs without API keys, with a typed conversation.

What we learned

  • A believable patient is mostly about what they do not say: rules for when to reveal something mattered more than extra medical detail.
  • Statistics and language models work well together: the network decides the facts, the model tells the story.
  • Voice changes the interface: the less is on screen, the more it feels like a consultation.
  • Feedback only helps when it points to the student's own words.

What's next for Doctotrain

  • Try it with real students and instructors, and compare the feedback with expert ratings.
  • More examinations, more specialties and harder conversations such as breaking bad news.
  • Handing a prepared patient from the instructor to students on other devices.
  • Follow-up visits, where the patient remembers the last one.
Share this project:

Updates

Submission history