Part of VibeRounds — Socratic learning & Guided Discovery · Clinical Cognition Operating System Sibling course: Evidence-Based Medicine for Techies →
03 Clinical Cognition, From First Principles

Building the Differential

From a raw case, to an abstracted problem, to an activated script, to a probability-weighted list, to a list that has survived an attack — the five compressions a differential actually goes through.

Lesson 3 of 9 Builds on Lesson 2 — The Socratic Loop Feeds into Lesson 4 — Bias & Failure Modes Source modules M12, M15, M17, M36, M14, M16, M18, M20, M33, M56
VibeRounds This course is built in the spirit of VibeRounds — Socratic learning (AI that questions rather than answers) and Guided Discovery, part of the wider Clinical Cognition Operating System.

"Build a differential" sounds like one step. It isn't. By the time an experienced clinician has a ranked list of possibilities in front of them, the raw case has already passed through several distinct compressions — each one a place where the list could go wrong before a single diagnosis is even named. This lesson walks the pipeline in order: a raw case becomes an abstracted problem representation, which activates one or more illness scripts, which produces a first-pass differential that gets probability-weighted against the evidence as it arrives, and which finally gets attacked before anyone commits to it.

None of these four stages is optional, and — this is the part usually skipped in teaching — they happen in a specific order for a reason. Do them out of sequence and the whole differential inherits a silent error from whichever stage got skipped.

🩺 For clinicians & students

If you've ever "known enough" to get a case right but still missed it, the miss was probably not a knowledge gap. It was probably one of these four stages done poorly — most often the first one, since it happens fastest and gets checked least.

💻 For techies

Think of this as a four-stage pipeline: feature extraction (qualifiers) → template match (scripts) → weighted ranking (Bayesian update) → adversarial validation (red-team). A bug in stage one silently corrupts every stage after it, and the failure will look, on the surface, like a bug in whichever stage you happen to be debugging.

Stage 1 — Problem Representation: Compress Before You Diagnose

Module 17 is built on a specific empirical finding: expert clinicians, before generating any differential, restate a case using abstract paired qualifiers — acute vs. chronic, focal vs. diffuse, progressive vs. static, proportionate vs. disproportionate. "Cough for three days, getting worse" becomes "acute, progressive, respiratory." Diagnostic accuracy tracks the quality of this restatement more strongly than it tracks raw factual knowledge — a learner who knows a great deal but represents the problem poorly will still generate a worse differential than one with a tighter representation and less knowledge.

The module enforces this by refusing to let a learner name a diagnosis until the qualifier summary exists — and its most instructive drill doesn't test whether you can produce a representation at all, but whether the same raw findings, weighted differently, produce two defensible representations pointing at two different differentials.

Same findings, two representations (Module 17, Step 17.3)

A patient with waxing-and-waning joint pain and a low-grade fever over six weeks can honestly be represented as "acute, focal, progressive" if the most recent flare is weighted most heavily — or as "subacute, diffuse, fluctuating" if the six-week pattern is weighted instead. Each representation activates a different script, and therefore a different differential, from the identical underlying case.

This is the module's core claim made concrete: the differential is downstream of the representation, not the raw findings directly. Representation is a real, independent source of diagnostic error — not just a formatting step on the way to the "actual" reasoning.

🩺 Clinical framing

This is why two competent clinicians can look at the same chart and land somewhere different before either of them is "wrong" about any fact — they weighted the timeline differently at the compression step, long before either of them said a diagnosis out loud.

💻 Techie framing

This is feature extraction, and it's lossy by design. The qualifiers are a small, fixed-dimension encoding of a much larger input — and like any lossy encoding, which details get discarded versus preserved determines everything the downstream model can possibly output.

Stage 2 — Illness Scripts: Fast Retrieval, Not Slow Construction

Once a case is represented abstractly, an experienced clinician doesn't build a differential from first principles — they retrieve a compiled illness script: a bundle of enabling conditions (who gets this, when, where), a fault (the underlying process), and consequences (the findings that follow). Module 15 trains this retrieval directly, and deliberately withholds findings rather than the answer — a different, earlier point in the reasoning chain than Module 1's withholding.

The module's highest-value drill isn't building a script from scratch — it's discriminating between two scripts that are commonly confused, because expert reasoning is less about generating long differentials and more about efficiently telling a small number of activated scripts apart.

#VibeRounds prompt — Module 15, Step 15.3 (Script Discrimination)
Give me two conditions whose scripts are commonly confused — similar enabling conditions or overlapping consequences but a different fault. Present a single case that could plausibly trigger either script. Ask me to state which script I activate first, then ask: what is the one enabling condition or consequence that would most efficiently discriminate between the two? Only after I answer, tell me the actual discriminating feature.

Just as important is what the module trains a learner to notice: the moment no script fits well. Module 15 treats that noticing — not the script retrieval itself — as the single most safety-critical skill in the whole sequence, because it's the trigger that should send reasoning back to slow, stepwise analysis rather than forcing an atypical case into the nearest familiar shape.

🩺 Clinical framing

Recognizing "this doesn't quite fit" is a harder-won skill than recognizing "this looks like X" — it requires enough exposure to know what X is supposed to look like well enough to notice the deviation, which is exactly why it's trained as its own explicit drill rather than assumed to develop on its own.

💻 Techie framing

This is template matching against a compiled library, with an explicit out-of-distribution detector as a first-class requirement — not an afterthought. A system that always returns its closest template match, with no confidence-based fallback to a slower general-purpose reasoner, is exactly the failure mode this stage is built to prevent.

Stage 3 — Weighting the List: Sequential Bayesian Updating

A retrieved script gives you candidates, not a ranking. Module 36 trains the habit of updating each candidate's probability explicitly as each new finding arrives — not with statistical precision, but with directional calibration: does this finding make the diagnosis more or less likely, and by roughly how much? The module refuses vague answers; "likely" is not an acceptable response — it insists on a rough percentage, because a learner who says "PE is 40%, elevated but not dominant" will make a different, better-calibrated decision than one who only says "PE is likely."

Each finding is applied one at a time, never in bulk, and after each finding the learner restates an updated probability for every diagnosis still in play before the next finding is revealed. The workup itself is then guided by two thresholds, not by feeling: a treatment threshold above which you'd act without further testing, and a test threshold below which the diagnosis is unlikely enough that further testing isn't warranted. The most valuable question the module asks is not "what's your estimate" but which single next test would most efficiently push you across whichever threshold you're closest to.

StepQuestion forcedWhat it prevents
Pre-test anchoringWhat's my starting percentage, before any results?Anchoring silently on the first test result instead of the base rate
Finding-by-finding updateDoes this specific finding move me up or down, and how much?Treating every abnormal finding as equally confirmatory
Threshold checkAm I above treat, below test, or in between?Ordering more tests out of habit once the answer is already clear
High-LR huntWhat single result would move me the furthest?Ordering a battery of low-yield tests instead of the one that matters

The closing step of Module 36 is worth naming explicitly: it asks the learner to compare their probability-derived conclusion against their original gut feeling from the start of the case — not to declare a winner, but to check whether the two were tracking the same high-yield findings all along, or whether intuition quietly misfired on something specific. That's the bridge back to the System 1 / System 2 toggle from Lesson 2.

🩺 Clinical framing

This is the discipline of writing down "60%" instead of thinking "probably" — an uncomfortable habit at first, and the exact habit that makes it possible to notice, later, that your gut and your numbers quietly disagreed on something.

💻 Techie framing

This is literally a Bayesian classifier run by hand, one observation at a time, with the prior explicitly logged before each update — the point isn't the arithmetic, it's refusing to let the posterior silently overwrite the prior without a visible update step in between.

Stage 4 — Attacking the List: Devil's Advocate Mode

A ranked, probability-weighted differential is still just a hypothesis until it's been stress-tested. Module 12 is the first module in the whole VibeRounds set where the AI's job is not to coach but to attack — and its structure is deliberately sequenced so the attack can't be softened. The AI must land three genuine challenges against the working diagnosis before it's allowed to affirm anything, and it must attack first, before offering a single alternative, so it can't retreat into "here's what it could be instead" the moment the pressure gets uncomfortable.

#VibeRounds prompt — Module 12, Step 12.1 (the first assault)
My working diagnosis is [STATE DIAGNOSIS]. Here is the case: [PASTE CASE SUMMARY]. Begin the adversarial stress-test. Give me your three strongest arguments against this diagnosis being correct. For each argument, cite the specific case feature that undermines my diagnosis and name the cognitive bias that could explain why I landed here anyway. Do not offer alternatives yet — only attack first.

Two features of this module are worth naming. First, every challenge the learner can't rebut is logged as an UNRESOLVED VULNERABILITY — not dismissed, not softened, carried forward as a persistent audit trail for the rest of the session. Second, buried inside the adversarial structure is a single deliberate Socratic pivot (Step 12.7): after every attack has landed, the module asks a counterfactual question — if the one atypical feature in this case had instead been typical, would you still have reached the same diagnosis? — because at that point in the session, one question designed to help the learner reintegrate their reasoning matters more than one more attack.

🩺 Clinical framing

The Unresolved Vulnerability log is arguably the most clinically useful output of the whole lesson — it's not a grade, it's a to-do list of exactly what still needs investigating before the differential can honestly be called closed.

💻 Techie framing

This is adversarial red-teaming of your own output, with a structured findings log instead of a pass/fail verdict — attack before mitigation is proposed, exactly the same discipline as a real security review that refuses to let "but here's the fix" cut a vulnerability discussion short.

Worked Example: One Case Through All Four Stages

Raw case

34-year-old woman, three weeks of intermittent low-grade fevers, a migratory ache that's moved from one knee to the other wrist, and a faint rash she describes as coming and going. No recent travel. No known sick contacts.

Stage 1 — Representation (Module 17)

Subacute, migratory, systemic, fluctuating. Note what got discarded: the specific joints. That's deliberate abstraction — but it's also a risk, flagged explicitly in Module 17's own critical-awareness step, if migratory-pattern-specific detail turns out to matter later.

Stage 2 — Script activation (Module 15)

"Subacute, migratory, systemic, fluctuating" activates a reactive or autoimmune inflammatory script well — but also, less comfortably, an infective endocarditis script, since migratory joint pain with fever is a classic (if easy-to-miss) enabling condition for it. Two scripts, overlapping consequences, different fault. This is exactly the near-miss pair Module 15's discrimination drill is built for.

Stage 3 — Probability weighting (Module 36)

Pre-test: autoimmune ~45%, endocarditis ~15%, viral ~25%, other ~15%. A new murmur on exam is a strong-LR finding — it pushes endocarditis up sharply and everything else down, and crosses the test threshold for a blood culture and echocardiogram before anything else is ordered.

Stage 4 — Attack (Module 12)

Devil's Advocate mode doesn't accept "autoimmune, probably" as settled just because it started as the leading candidate. It attacks: what specifically rules out endocarditis right now, given the murmur? What's the single highest-mortality-if-missed alternative? If the murmur is confirmed and cultures are still pending, is empiric treatment for the autoimmune process actually safe to start yet — or does that decision belong to the Unresolved Vulnerability log until cultures return?

Notice that the case never got "solved" cleanly — it moved through all four stages and came out the other side with a ranked, weighted, attacked differential and one open vulnerability still on the log. That's not a failure of the process. A closed, tidy differential on a genuinely ambiguous case is usually a sign one of the four stages was skipped, not a sign the case was actually simple.

Stage 5 — Closing the Loop: Self-Critique Before Commitment

The four stages above build and stress-test a differential, but they still end at the same place every unaudited differential ends: a ranked list the learner is confident enough in to act on. Two more modules add a final, quieter step — turning the critique inward, onto the reasoning itself rather than the diagnosis. Module 18 asks the learner to re-read their own Stage 1–4 trace and name the single weakest inferential link in it — not the weakest finding, the weakest step connecting two findings. Module 20 then asks for an explicit confidence rating on that weakest link specifically, not on the differential as a whole, because a single global confidence number tends to hide exactly the local weak point Module 18 just surfaced.

#VibeRounds prompt — Module 18, Step 18.2
Re-read your own reasoning trace from Stages 1 through 4. Identify the single inferential step you trust least — not the finding you're least sure of, the step where one finding was used to justify moving toward or away from a diagnosis. State it in one sentence, and rate your confidence in that step alone from 0-100.

Three shorter drills round out the toolkit and are worth knowing even though they don't need a full worked pass here. Module 14 checks the differential against population base rates, flagging when a rare diagnosis has been ranked above a common one without a specific finding that justifies the reordering. Module 16 generates deliberate near-miss pairs — two diagnoses that share most features but differ in one decisive way — as a discrimination drill separate from whatever pair happened to arise naturally in the case. Module 33 is a lightweight iterative-refinement pass: re-run Stage 3's probability weighting once new data arrives, rather than treating the pre-test differential as fixed. Module 56 logs the finished differential into a cross-case pattern bank, so a near-miss pair encountered today — like the autoimmune/endocarditis pair above — is available as a ready-made Module 16 drill the next time a similar case appears.

🩺 Clinical framing

Naming your single weakest link out loud, before anyone asks, is a very different habit from waiting for a supervisor to find it for you — and it's the difference between a differential you can defend and one you're merely hoping holds up.

💻 Techie framing

Modules 18 and 20 are self-critique on the reasoning trace, not the output — closer to a model critiquing its own chain-of-thought for the weakest inferential hop than to a confidence score on the final answer. Module 56's pattern bank is just a growing eval set of near-miss pairs, seeded from real cases instead of synthetic ones.

Homework for Lesson 3

  1. Take the case you carried forward from Lesson 2. Write its one-sentence semantic-qualifier representation (Module 17, Step 17.1) before you write anything else — no diagnosis names allowed in that sentence.
  2. Name the illness script that representation activates for you, and then deliberately try to name a second, less obvious script with overlapping consequences but a different underlying fault (Module 15, Step 15.3). What's the one feature that would discriminate between them?
  3. Assign a rough starting percentage to your top two diagnoses, then run one finding from your case through a probability update (Module 36, Step 25.2). Did your gut-feel diagnosis and your percentage-weighted one agree? Bring whichever one felt shakiest forward — we'll need it in Lesson 4, where we look at exactly where reasoning like this breaks down under bias.

This lesson draws directly on Module 12 — Differential Diagnosis Deepdive (Devil's Advocate Mode), Module 15 — Illness Script Acquisition, Module 17 — Semantic Qualifiers & Problem Representation, and Module 36 — The Bayesian Probability / Likelihood Ratio Engine, together with Modules 14, 16, 18, 20, 33, and 56 on base-rate checking, near-miss discrimination, self-critique, confidence rating, iterative refinement, and cross-case pattern logging, all from the VibeRounds Prompt Directory. Module 17's theoretical basis is Bordage & Lemieux (1991) on semantic structures in diagnostic thinking; Module 15's is Schmidt & Rikers (2007) script theory. If you're coming from the evidence side, the companion Evidence-Based Medicine for Techies course pairs well with this one — its treatment of likelihood ratios and pre/post-test probability is the natural statistical companion to Module 36's clinical-habit framing here. Neither course is a clinical decision tool; see the VibeRounds disclosure statement for full terms.