Inspiration

Medical students learn history by talking to patients, but trained actor-patients are expensive and rare. The few AI patient simulations that exist have the same problems. They reveal too much without being asked, contradict themselves, use jargon and are far too cooperative. We wanted a virtual patient that feels real and stays medically consistent.

What it does

VIP is a virtual patient you talk to in real time, in English, by voice. It reveals symptoms, medication and life details only when the student asks the right question, and it answers in lay language. It never invents symptoms or contradicts itself. Each case comes with two distinct personalities whose mood changes during the conversation and can be heard in the voice, and with the optional avatar also seen on the face. Students can see pain on a body figure and order an X-ray or MRI by voice. At the end they get a score card for medical history and communication.

How we built it

•⁠ ⁠TypeScript monorepo: React frontend, Fastify backend, a LiveKit Agents voice worker. •⁠ ⁠Voice: OpenAI gpt-4o-transcribe → patient engine → gpt-4o-mini-tts, with emotion set for each reply. An Anam avatar is optional. •⁠ ⁠The truth lives in data: cases are structured JSON files. A fast rule-based Director decides which facts a question unlocks. The Speaker LLM only sees those facts, so it can't leak the rest. •⁠ ⁠Grounded personas based on Nemotron-Personas-Germany, plus a structured log line for every turn so we can evaluate.

Challenges we ran into

Real time vs. quality: smarter models answer better but too slowly. Our fix: deterministic rules handle the hot path, and the LLM gets a strict time budget. On top of that, telling interruptions apart from pauses, and a limited budget so all runs had to be coordinated.

Accomplishments that we're proud of

A working voice patient that stays in character and reveals facts only when asked. Two patients with the same disease that feel clearly different. And an architecture that prevents leaks by design.

What we learned

Real-time applications are hard, especially in medicine. Putting the facts in structured data and letting the LLM only choose the words was the key to being both fast and correct.

What's next for LSD

More cases from an automated case factory reviewed by medical experts, an automatic consistency checker, guideline-based feedback for students, and lower latency.

Built With

Share this project:

Updates

Submission history