Inspiration

Medical students practice history-taking and breaking bad news on trained actor patients, who are expensive and booked out for weeks. Avelios' VIP challenge at HackaTUM asked for a virtual patient students can talk to anytime. We wanted much more than just a chatbot reciting a case file, so we built a patient with emotions and feelings: one who gets nervous, holds things back until you earn their trust, and notices when you talk over them.

What it does

Patienos is a virtual patient that works with the student's keyboard or voice input. The student just selects a case and a personality, and then talks:

  • Facts revealed only on request. Each case has symptoms, past illnesses, medication, and a life story. Hidden facts come out only when the right question is asked.
  • Distinct personalities. The student may choose between chatty, shy, overly positive, or distrustful personalities, so the same medical case poses a different challenge every time.
  • Feelings that react. Eight feelings, including trust, fear, and anger, decide what the patient shares and how they sound.
  • It hears how the student speaks. Loudness, pace, interruptions, and tone are measured. If you rush the patient, they'll ask you to slow down.
  • Safeguarding. Off-task or unprofessional questions of the student are flagged.
  • An OSCE-style debrief. The student enters a suspected diagnosis, which is graded against the case. Meanwhile, an AI examiner marks the consultation as if it were a real OSCE consultation. The debrief shows:
    • a score out of 100, broken down by section,
    • feedback linked to the exact turns in the transcript as evidence,
    • a chart of how the patient's feelings changed over time,
    • which hidden facts were found or missed.

How we built it

  • Voice pipeline: Pipecat with Deepgram speech-to-text, Claude Sonnet 5.5 as the patient and Cartesia emotional text-to-speech, streamed sentence by sentence.
  • Cases and personalities: strict JSON schemas. The answer key lives in an instructor-only section that never reaches the model.
  • Specialized LLM roles: a Haiku 5.5 safeguard, an appraisal model that drives the feelings, a live fact checker, an OSCE examiner, and a diagnosis grader.
  • Delivery analysis: Deepgram word timings, voice activity detection, and Pipecat's Voice Reader for tone.
  • OSCE mark sheet: computed in code from all of the above, so the debrief renders in milliseconds.
  • Frontend: React and Vite, plus a server-rendered dashboard that updates live.
  • Evaluation: patienos-eval runs scripted doctors against every case. An LLM judge scores naturalness, consistency, and personality, and the harness measures recall, leaks, and latency. Tracing runs through Langfuse.

Challenges we ran into

  • Latency. Slow replies significantly degrade the realism, so we stream everything and run the patient at low effort with no up-front thinking.
  • Selective disclosure. Getting a model to know a fact but hold it back, without lying or blurting it out.
  • Consistency and turn-taking. The patient must never invent or contradict facts, and must handle interruptions and pauses like a person.
  • A slow debrief. The examiner may take up to ~15 s, so it starts marking at hang-up while the student types the diagnosis. Students who skip see loading indicators instead of a blank screen while waiting.

Accomplishments that we're proud of

  • The same disease feels genuinely different with a shy patient than with a distrustful one.
  • A feelings engine that shapes each patient's personality and how guarded they are, so their mood shifts with how you treat them.
  • The patient reacts to how you speak, not just what you say.
  • OSCE-style feedback, with evidence linked to the exact moments.
  • Three patient cases, including breaking bad news and a hard-of-hearing patient.

What we learned

  • Realism lives in small details: lay phrasing, guarded answers, asking you to repeat a rushed question.
  • Small, focused LLM roles beat one model doing everything.
  • How OSCE stations are actually marked.
  • Perceived latency is a design problem: overlap slow work with something the user is busy doing (e.g., examining their consultation while they are entering their suspected diagnosis)

What's next for patienos

  • A teacher tool for creating cases without writing JSON.
  • More specialties and languages.
  • An avatar driven by the feelings engine.
  • Coaching hints and progress tracking across sessions.

Built With

Share this project:

Updates

Submission history