Inspiration

Medical students learn history-taking by talking to patients, but practising with actors is expensive and rare. Most AI "virtual patients" fail at the one thing that makes history-taking hard: they tell you everything as soon as you ask anything. We wanted a patient who behaves like a real one. They only answer what you ask, hold back until they trust you, and react to how you speak to them.

What it does

Ninti is a virtual patient you interview by voice.

  • Pick a patient from the library or build your own. Each one has a backstory, a personality and a lip-synced 3D avatar.
  • Read the door note, walk in and take the history. The patient answers naturally, but only reveals what your questions earn.
  • The patient reacts to your manner. Empathy builds trust and opens them up; jargon, judgement or interrupting makes them guarded. Their live mood and trust show over the avatar.
  • A live coach tracks which history areas you've covered and flags your communication moments in your own words.
  • Afterwards you get feedback: which facts you reached or missed (with questions to try), how precise your questions were, whether you got the diagnosis, a written summary, and the full transcript.
  • Every interview is saved to a history, and transcripts export to Excel for teachers.

How we built it

  • The voice model never sees the case. OpenAI Realtime handles the conversation over WebRTC, but it only learns facts through a server-side recall tool. Behind it, a pure, deterministic gate decides per turn what may be said, based on trust, what was asked and what was already told. Selective disclosure is enforced by code, not by instructions the model might ignore.
  • One judging call per turn. A Decisions API router reads each student turn against the whole case (about 275 ms) and picks which fact it touches, how deep to go, and the student's manner. Code then enforces the guarantees: trust gates, what's already been said, and that only released text reaches the voice model.
  • Cases come from real data, not invention. A reasoning model turns each case (from the AgentClinic MedQA dataset, or a teacher's form) into an interview sheet. Every fact must quote its source, and any fact that names the diagnosis is dropped.
  • Personalities are trait sets compiled by plain code, so the same case can be played by an anxious, a downplaying or a distrustful patient with identical facts, and a teacher's free text never reaches the model.

Challenges we ran into

  • Keeping the patient quiet. Language models want to be helpful and volunteer everything. Moving disclosure into a server-side gate solved it.
  • Latency vs. control. Waiting for our backend before every reply made turn-taking fragile. Letting the model speak on its own and fetch facts through a tool kept it fast and still gated.
  • Hand-written rules kept failing in live tests. Regex signals, embeddings and thresholds each produced wrong results. One model judging each turn with the full context worked better, with code keeping only the hard guarantees.
  • No invented facts. Generated patients contradict themselves, so every planned fact must trace back to its source.

Accomplishments that we're proud of

  • Selective disclosure by construction. The voice model only ever receives facts the gate has released.
  • A 3D patient that feels alive. The avatar lip-syncs to the voice in real time, and its face changes with the patient's mood: anxious, irritated, relieved as the conversation turns.
  • A patient that feels different under different personalities, with identical medical facts. This is covered by tests.
  • A live coach during the interview. It tracks which history areas you've covered and flags empathy, jargon, judgemental remarks, interruptions and stacked questions in your own words, as you speak.
  • Fast, natural voice: about 360–460 ms to first audio.
  • Deployed and usable now:
    • 7 patients from real case data, each with their own avatar;
    • persistent interview history;
    • teacher tools (build a patient, create personalities, reveal a case).

What we learned

  • Put guarantees in code and judgement in the model. Asking a model to keep a secret is weaker than never giving it the secret.
  • One well-informed model call beat a stack of hand-tuned heuristics.
  • In medical education, credibility comes from traceability: every answer the patient gives should come from the case.

What's next for Ninti

  • More realistic avatars, designed in Blender, for patients that look as real as they sound.
  • Smarter real-time guidance: beyond today's coverage and behaviour tracking, hints during the interview, such as a nudge toward an area you haven't explored yet.
  • An exam-style mode with a timer and an OSCE checklist score.
  • More cases and specialties.

Built With

Share this project:

Updates

Submission history