KatInterview

Designing a Safe Patient-Facing Medical QA Assistant

Machine LearningModel answer
MediumModel answerMachine Learningragllm-safetyevaluation

Last updated

Design the data pipeline, grounding architecture, hallucination and safety evaluation, and fairness controls for a clinical Q&A assistant that must never diagnose.

Context

A hospital wants a conversational assistant embedded in its patient portal. Patients will use it to ask general health questions and to get plain-language explanations of their own lab results. The assistant must give educational information only: it must never issue a diagnosis, never recommend a dose, and never stand in for a clinician. Emergencies must be routed to humans immediately.

You have three kinds of material available:

  • A very large archive of clinical notes from the hospital's records system.
  • A curated library of clinical guidelines and reference summaries.
  • A small set of Q&A pairs written and reviewed by clinicians.

What to Deliver

Work through the design as you would in a technical screen, covering:

  1. Data plan. What role does each source play — training, retrieval, or evaluation? How do you de-identify records, and how do you stop the model from memorizing or leaking patient-specific details?
  2. Architecture trade-off. Compare fine-tuning a language model on clinical notes against retrieval-augmented generation over the guideline library. Make a recommendation and justify it.
  3. Evaluation protocol. How do you operationalize "hallucination" and "safety"? Name concrete automated metrics, describe the human review process, and state launch gates.
  4. Risk controls. How do you detect and reduce performance differences across patient subgroups, and how do you handle queries whose style or vocabulary drifts away from the clinical training distribution?

State your assumptions about users, scale, latency, and regulatory constraints before you design.

Hints

Hint 1

Decide early what each data source is *for* — notes and guidelines are not interchangeable, and the tiny expert Q&A set is worth more as a test set than as training data.

Hint 2

Grounding beats memorization in medicine: if every claim must point at a retrieved passage, hallucination becomes a measurable, checkable property rather than a vibe.

Hint 3

Grade answers claim by claim, not with BLEU or ROUGE — a fluent wrong answer scores well on surface overlap and can still harm someone.

Hint 4

Refusal is a feature in both directions: track unsafe answers *and* over-refusals, because an assistant that says no to everything is also a failure.