Inspiration
Med students need to practise history taking, but trained patient actors are expensive and always booked. We wanted a patient who's available any time, as often as you like.
What it does
Anamnesis is a virtual patient you talk to out loud. Each patient has a real medical backstory and a distinct personality (anxious, chatty, "it's probably nothing"…). They reveal facts only when you ask the right questions, in everyday words, and they stop when you interrupt.
After the talk you get feedback:
which facts you found, with the patient's words as proof; whether your diagnosis was right; a communication checklist; a "Try saying…" example for each improvement.
You can try again with the same patient and see your progress. Teachers can describe a patient in plain words and publish it as a new case.
How we built it
Patient engine: Python and OpenAI, using case files, 7 personalities and a memory of what the patient has already said. Voice: ElevenLabs. Replies are streamed, so the patient starts talking in about 2 s. Real cases: 544 cases from recorded interviews (Fareez et al., PriMock57, AgentClinic). Every fact is checked against the source transcript. Feedback: an LLM judge, with code checking every quote it gives. Tracing: cost and latency for every call, because we had a $30 budget. Frontend: React, Vite and Tailwind.
Challenges we ran into
Stopping the LLM from volunteering everything. Models tell the whole case at once, so we split each case into separate facts and only let the patient reveal the one that was asked for. Keeping facts consistent over a long talk. Models forget and make things up, so before every reply the patient gets a memory note of what it already said and denies anything not in its case. Making interruptions feel natural. When the student cuts in, the patient stops, and its memory keeps only the words the student actually heard. Fair, useful feedback. Every point is backed by a quote from the transcript that code checks. Students get at most three improvements with "Try saying" examples, then retry the same patient to see their progress.
Accomplishments that we're proud of
We replayed 220 real doctors' questions to our patient. It invented 0 medical facts and used no jargon, at a median of 1.35 s and under $0.001 per reply.
What we learned
Realism comes from what the patient doesn't say. Let code check what the AI claims. Measure cost and latency from day one.
What's next for Anamnesis
Remove the last contradictions (1.8% of answers now), test it with real students.
Built With
- llm
- openai
- python
- react
- tailwindcss
- typescript
- vite
