Clinical Prompting Flowchart
How RTF, BRAIN, CoT & Domain-Specific Templates work together — from diagnosis to treatment
Version 2 — Eduardo Mayorga, MD — 2026
The Nested-Layer Model
These aren’t competing frameworks — they’re layers of increasing specificity. Start simple, add precision as stakes rise, and freeze repeated patterns into reusable templates.
Domain-Specific Template
Reusable, pre-filled prompt for a specific scenario
BRAIN
Background + Role + Approach + Instructions + Nuance
RTF
Role + Task + Format
RTF is the grammar → BRAIN is the full sentence → Domain Templates are the pre-written paragraphs you keep on hand
Patient Presents — You Reach for an LLM
De-identify → Choose your framework depth → Diagnose → Work up → Treat → Verify
1
De-identify All Patient Data
Strip names, DOB, MRN, facility names, dates. Use age and relative timing instead.
How complex is the clinical question?
This determines which layer of the model you start with.
Simple RTF
Focused question, single system, pattern recognition. Three elements: Role + Task + Format.
Use for: Quick differentials, guideline lookups, drug dosing checks.
Complex BRAIN
Multi-system, high-stakes, many comorbidities. Five elements: Background + Role + Approach + Instructions + Nuance.
Use for: Treatment plans, multi-drug regimens, unfamiliar subspecialty cases.
Repeated Domain Template
A scenario you see often enough to have a reusable prompt. Pre-filled BRAIN with domain vocabulary + input slots + guardrails.
Use for: Standard consult types, recurring workups, specialty-specific evaluations.
↓ All paths follow the same clinical reasoning sequence ↓
2
Diagnostic Phase
Generate differential diagnosis. Optionally add a Chain-of-Thought (CoT) reasoning style via BRAIN’s [A]pproach element to improve accuracy on complex cases.
Safety checkpoint: Include must-not-miss diagnoses, atypical presentations, and counter-evidence prompts to prevent anchoring bias.
3
Iterative Workup
Request stepwise diagnostic studies. Feed back results as they arrive. Update differential iteratively.
Safety checkpoint: Account for patient constraints (eGFR, allergies, pregnancy) in every test recommendation.
4
Treatment Phase — Upgrade to BRAIN
If you started with RTF, switch to BRAIN now. Treatment decisions carry the highest risk and need evidence standards, safety constraints, and patient nuance built in.
Safety checkpoint: Request drug interactions, renal-adjusted dosing, contraindication checks, and confidence ratings on every recommendation.
5
Verify — NEVER Skip
Run self-critique prompts on every AI output. Watch for hallucinated criteria, outdated guidelines, missed interactions, overconfident estimates, fabricated references. AI output is always a first draft.
6
Build Your Template Library
Did you just write a BRAIN prompt you’ll use again? Freeze it into a Domain-Specific Template with input slots, pre-filled roles, embedded terminology, and guardrails. Next time, you’ll just fill in the blanks.
Safety / Privacy
Diagnosis
Workup
Treatment
Verification
Domain Template
Decision Point
How the Frameworks Map onto Each Other
| Concept | RTF Element | BRAIN Element | Domain Template Element |
|---|---|---|---|
| Who is the AI? | Role | Role (+ co-management scope) | Pre-filled expert role with subspecialty vocabulary |
| What do you need? | Task | Instructions (task + safety rules) | Structured input slots with domain-specific data fields |
| How should it respond? | Format | Instructions (includes format specs) | Output format matching real clinical workflows (SOAP, differential table, etc.) |
| Clinical context | Not included | Background (stage, context, case summary) | Embedded in template structure |
| How should it reason? | Not included | Approach (CoT style + evidence standards) | Pre-specified reasoning method & guideline citations |
| Patient-specific factors | Not included | Nuance (comorbidities, allergies, preferences) | Input slots for patient-specific variables |
| Standards of care | Not included | Approach (guideline citations) | Built-in guardrails and domain constraints |
Key insight: BRAIN adds three dimensions that RTF lacks — clinical context (B), reasoning control (A), and patient specificity (N). Domain templates pre-fill all of this for reuse.
Patient Presents — Choose Your Framework Depth
De-identify first. Then match framework complexity to clinical complexity.
1
De-identify All Patient Data
Before typing anything, strip: names, DOB (use age), MRN/SSN, facility names, room numbers, dates (use “Day 1, Day 3”).
Instead of
"John Smith, DOB 03/15/1974, MRN 123456, admitted to Bascom Palmer on 3/28/2026..."
Write
"A 52-year-old male, admitted Day 1 to an academic eye center..."
Frame Your Prompt
Decision: How complex is the question? Do you have a template?
Simple & focused → RTF | Complex / high-stakes → BRAIN | Seen this before → Domain Template
Layer 1 RTF
| Element | You Write… |
|---|---|
| Role | Specialty + expertise level |
| Task | Exactly what you need |
| Format | Output structure |
RTF Example
"You are a retina specialist [R]. Generate a top-5 differential for a 68-yo with acute painless vision loss and cherry-red spot [T]. Present as a table: Diagnosis | Probability | Evidence | Must-Not-Miss [F]."
Layer 2 BRAIN
| Element | You Write… |
|---|---|
| Background | Context, stage, case summary |
| Role | Specific persona |
| Approach | Evidence & CoT reasoning |
| Instructions | Task + safety + format |
| Nuance | Patient-specific factors |
BRAIN Example
[B] Neuro-ophtho consult. 52-yo F, sudden vision loss, APD, swollen disc.
[R] Fellowship-trained neuro-ophthalmologist.
[A] Bayesian reasoning. Cite AAO PPPs, NANOS guidelines.
[I] Top-5 differential with probabilities, evidence, must-not-miss, first-line test.
[N] PMH: T2DM, HTN. Sulfa allergy. eGFR 45.
Layer 3 Domain Template
| Element | Pre-filled + Slots |
|---|---|
| Expert role | Pre-set subspecialist persona |
| Domain terms | Field vocabulary embedded |
| Input slots | [findings], [PMH], [meds] |
| Output format | Workflow-matching structure |
| Guardrails | Standards of care built in |
Domain Template Example
"You are a retina specialist reviewing OCT. Given findings: [___], provide differential by likelihood, noting urgent referral criteria. Cite AAO PPP for AMD management."
↓ All paths follow the same clinical reasoning sequence ↓
Diagnostic Phase
2
Generate a Differential Diagnosis
Two-Step Prompting separates analysis from ranking to reduce anchoring bias:
Step 1 — Analyze
"Analyze the following clinical data. Weigh each finding, identify patterns, and note red flags. Do NOT generate a differential yet."
Step 2 — Rank
"Now generate a ranked differential (top 5–7). For each: Estimated Probability | Supporting Evidence | Refuting Evidence | Must-Not-Miss Flag | One atypical presentation."
Chain-of-Thought (CoT) — Plugs into BRAIN’s [A]pproach Element
CoT is a technique, not a framework. You select a CoT style and insert it into the [A]pproach slot. For RTF users, append it after the Task element.
| CoT Style | Add This to Your Prompt | Best For |
|---|---|---|
| Bayesian | “Assign a prior, update as each finding is weighed.” | Differentials with labs/imaging |
| Hierarchical | “Reason from broad organ systems to specific diagnoses.” | Undifferentiated presentations |
| Causal Abduction | “Generate hypotheses, then seek confirming AND disconfirming evidence.” | Complex / atypical cases (best overall per Dai et al.) |
| Skip CoT | Don’t add a reasoning instruction. | Simple pattern-recognition (CoT can reduce accuracy here — NEJM AI, 2025) |
Anti-bias safety lines — append to every differential prompt:
1. “Always consider dangerous diagnoses that could be fatal if missed.”
2. “For each top diagnosis, list at least one atypical presentation.”
3. “List the strongest evidence AGAINST each of your top 3 diagnoses.”
1. “Always consider dangerous diagnoses that could be fatal if missed.”
2. “For each top diagnosis, list at least one atypical presentation.”
3. “List the strongest evidence AGAINST each of your top 3 diagnoses.”
3
Iterative Diagnostic Workup
Workup Prompt
"Recommend a stepwise workup ordered by pre-test probability and cost-effectiveness. Account for: [eGFR / allergies / pregnancy]. For each test, state what result would confirm or rule out each top diagnosis."
Feed-Back Loop — Repeat as Results Arrive
Feed-Back Prompt
"Results are back: [paste results]. Update the differential: remove ruled-out diagnoses, adjust probabilities, recommend next diagnostic step."
Safety checkpoint: Verify each recommended test accounts for patient constraints. Ask: “Are there contraindications to any of these tests given this patient’s profile?”
Treatment Phase — Upgrade to BRAIN
4
Develop the Treatment Plan
If you started with RTF:
Treatment carries the highest risk. Switch to BRAIN now to add evidence standards, safety constraints, and patient nuance.
If you started with BRAIN:
Continue your structure. Update [B]ackground with workup results and confirmed diagnosis, then refine [I]nstructions for treatment.
BRAIN Treatment Prompt
[B] Working Dx: arteritic AION in 72-yo F. ESR 88, CRP 54, biopsy+. eGFR 38.
[R] Neuro-ophthalmologist with rheumatology co-management.
[A] Follow AAO and ACR guidelines. Cite specific recommendations.
[I] Propose treatment:
• 1st/2nd-line therapies with dosing
• Renal-adjusted for eGFR 38
• Drug interactions with current meds
• Contraindication check
• Monitoring parameters & follow-up
• Confidence rating per recommendation
[N] Anxious about steroids. Hx GI bleed. Lives alone, limited mobility.
Safety checkpoint: Metacognitive prompting (asking for confidence ratings) reduced harmful recommendations by 45% (Esmaeilzadeh). Always request drug interaction and contraindication checks.
5
Verify — NEVER Skip This Step
Run these self-critique prompts on every output:
| Ask the AI | What It Catches |
|---|---|
| “What diagnoses might I be missing?” | Blind spots, rare differentials |
| “What are the strongest arguments against this plan?” | Adversarial self-evaluation |
| “Identify any inconsistencies in the reasoning above.” | Logical errors, contradictions |
| “Are cited guidelines current?” | Outdated protocol recommendations |
| “Cross-check full medication list for interactions.” | Missed drug interactions |
Failure modes to watch for: Hallucinated criteria • Outdated guidelines • Missed drug interactions • Overconfident estimates • Fabricated references • Consistent ≠ Correct
6
Freeze into a Domain-Specific Template
If this is a scenario you encounter regularly, convert your BRAIN prompt into a reusable template:
| Template Element | What to Pre-fill | What Becomes a Slot |
|---|---|---|
| Expert Role | “Fellowship-trained neuro-ophthalmologist” | — |
| Domain Vocabulary | APD, disc edema, NANOS criteria | — |
| Input Slots | — | [findings], [PMH], [meds], [eGFR] |
| Output Format | Ranked differential table with must-not-miss flags | — |
| Guardrails | “Note urgent referral criteria; cite AAO PPP” | — |
Patil et al. (2024): Role-specified, domain-vocabulary prompts measurably improve relevance, specificity, consistency, and expertise depth.
Remember: Clinical reasoning is iterative. New data at any stage sends you back to update, refine, or adjust.
Safety / Privacy
Diagnosis
Workup
Treatment
Verification
Domain Template
Full Clinical Walkthrough
A 52-year-old woman presents with sudden painless monocular vision loss. Follow the complete prompt engineering journey from first contact to treatment plan.
1
De-identify the Case
Raw clinical data (DO NOT enter this)
Maria Gonzalez, DOB 05/12/1974, MRN 789456, presented to Bascom Palmer ER on 04/10/2026 with sudden L eye vision loss. PMH: diabetes diagnosed 2019, HTN. Meds: metformin 1000mg BID, lisinopril 20mg daily, atorvastatin 40mg daily. Allergies: sulfa.
De-identified version (enter this)
52-year-old female presenting to an academic eye center ER, Day 0, with sudden painless monocular vision loss OS. PMH: T2DM (A1c 8.2, diagnosed 7 years ago), HTN, obesity. Meds: metformin 1000mg BID, lisinopril 20mg daily, atorvastatin 40mg daily. Allergy: sulfa. eGFR 45. Exam: APD OS, swollen optic disc OS, visual acuity 20/200 OS.
Phase 1 — Differential Diagnosis
Framework Decision: This is an acute optic nerve presentation with comorbidities.
Single-system but high-stakes with comorbidities → We could start with RTF for a quick differential, but the comorbidity burden suggests BRAIN will serve us better from the start.
Option A Start with RTF (simpler)
RTF Prompt
[R] You are a fellowship-trained neuro-ophthalmologist at an academic center.
[T] Generate a ranked differential (top 5) for a 52-yo F with sudden painless vision loss OS, APD, and a swollen optic disc.
[F] Table format: Diagnosis | Probability | Supporting Evidence | Refuting Evidence | Must-Not-Miss.
Pros: Fast, simple, good for initial orientation. Cons: No reasoning method specified, comorbidities not front-loaded, no evidence standards.
Option B Start with BRAIN (recommended here)
BRAIN Diagnostic Prompt
[B] Neuro-ophthalmology consult. 52-yo F with sudden monocular vision loss OS, APD, swollen disc. I need a structured differential before ordering workup.
[R] You are a fellowship-trained neuro-ophthalmologist at an academic center.
[A] Use Bayesian reasoning. Cite current AAO PPPs and NANOS guidelines. Show probability updates as you weigh each finding.
[I] Generate a top-5 differential:
• Estimated probability
• Key supporting/refuting evidence
• Must-not-miss flag
• First-line diagnostic test for each
• At least one atypical presentation per diagnosis
• List evidence AGAINST your top 3
[N] PMH: T2DM (A1c 8.2), HTN, obesity. Allergy: sulfa. eGFR 45. Meds: metformin, lisinopril, atorvastatin. Patient is anxious about vision prognosis.
Pros: Bayesian CoT reasoning built in, anti-bias prompts included, comorbidities front-loaded, evidence standards specified. Best choice for this case.
↓ We proceed with BRAIN (Option B). The AI returns a differential. ↓
AI
AI Returns a Differential (summary)
| Rank | Diagnosis | Prob | Must-Not-Miss |
|---|---|---|---|
| 1 | Anterior ischemic optic neuropathy (NAION) | 40% | Yes |
| 2 | Arteritic AION (GCA) | 25% | Yes — urgent |
| 3 | Optic neuritis (demyelinating) | 15% | Yes |
| 4 | Central retinal vein occlusion | 10% | No |
| 5 | Compressive optic neuropathy | 5% | Yes |
✓
Verification Checkpoint — Differential
“What diagnoses might I be missing? Are there any atypical presentations of GCA that could mimic this picture?”
“Identify any inconsistencies in your Bayesian reasoning above.”
“Identify any inconsistencies in your Bayesian reasoning above.”
Phase 2 — Diagnostic Workup
3
Iterative Workup
Workup Prompt
"Based on this differential, recommend a stepwise workup ordered by pre-test probability and cost-effectiveness. Account for eGFR 45 and sulfa allergy. For each test, state what result would confirm or rule out each top diagnosis. Prioritize ruling out GCA given its urgency."
Feed-Back Loop — Results Arrive
Feed-Back Prompt (Round 1)
"Lab results are back: ESR 88 mm/hr, CRP 54 mg/L, CBC with platelets 450K. Update the differential and recommend next steps."
AI updates: GCA probability rises to 65%. Recommends urgent temporal artery biopsy. NAION drops to 15%.
Feed-Back Prompt (Round 2)
"Temporal artery biopsy result: positive for granulomatous inflammation with giant cells. Working diagnosis: arteritic AION secondary to GCA. Update assessment and prepare for treatment planning."
Phase 3 — Treatment (BRAIN Required)
4
Treatment Plan with Full BRAIN Prompt
Framework transition: Even if you started with RTF, you MUST upgrade to BRAIN here. This patient has eGFR 38 (renal dosing), history of GI bleed (steroid risk), sulfa allergy (constrains choices), and lives alone (adherence factors). Cookie-cutter treatment could cause harm.
Full BRAIN Treatment Prompt
[B] Working diagnosis: arteritic AION secondary to GCA in a 52-yo F. ESR 88, CRP 54, temporal artery biopsy positive for granulomatous inflammation. eGFR 38. Currently on metformin 1000mg BID, lisinopril 20mg daily, atorvastatin 40mg daily.
[R] You are a neuro-ophthalmologist managing this patient with rheumatology co-management.
[A] Follow current AAO and ACR/EULAR guidelines for GCA management. Cite specific guideline recommendations. Use stepwise reasoning for each treatment decision.
[I] Propose a comprehensive treatment plan:
• 1st-line, 2nd-line, and alternative therapies with exact dosing
• Renal-adjusted dosing given eGFR 38
• Drug interactions with metformin, lisinopril, atorvastatin
• Contraindication check against all comorbidities
• GI prophylaxis given history of GI bleed
• Steroid taper schedule
• Monitoring parameters and follow-up timeline
• Rate your confidence in each recommendation (high/moderate/low)
[N] Patient is anxious about long-term steroid side effects. History of GI bleed 2 years ago. Lives alone with limited mobility — consider adherence burden. Allergy: sulfa. T2DM with A1c 8.2 — steroids will worsen glycemic control.
Critical safety factors this BRAIN prompt captures that RTF would miss:
• eGFR 38 requires renal-adjusted dosing for all medications
• GI bleed history demands gastroprotection with high-dose steroids
• T2DM + steroids = hyperglycemia risk requiring glycemic monitoring plan
• Lives alone = must consider regimen complexity and follow-up access
• Sulfa allergy constrains certain steroid-sparing agents
• eGFR 38 requires renal-adjusted dosing for all medications
• GI bleed history demands gastroprotection with high-dose steroids
• T2DM + steroids = hyperglycemia risk requiring glycemic monitoring plan
• Lives alone = must consider regimen complexity and follow-up access
• Sulfa allergy constrains certain steroid-sparing agents
5
Final Verification — Run All Safety Checks
| Self-Critique Prompt | What You’re Checking |
|---|---|
| “What are the strongest arguments against this treatment plan?” | Forces the AI to challenge its own recommendations |
| “Cross-check metformin + lisinopril + atorvastatin + the proposed regimen for ALL drug interactions.” | Catches missed interactions, especially with new agents |
| “Are the cited ACR/AAO guidelines current as of 2025? What is the most recent recommendation?” | Catches outdated protocols (common failure mode) |
| “Given the GI bleed history, is the proposed gastroprotection sufficient?” | Patient-specific safety validation |
| “Is the steroid taper schedule appropriate for the degree of inflammation? What are the signs of undertreating?” | Prevents both over- and under-treatment |
Remember: AI output is ALWAYS a first draft. Verify dosing against current formulary. Check interactions in a drug database. Confirm guideline currency. You are the decision-maker.
6
Convert to a Domain-Specific Template
You’ve now built a robust GCA/arteritic AION workup-to-treatment prompt. If you see this scenario regularly, freeze it:
Reusable GCA Workup-to-Treatment Template
You are a neuro-ophthalmologist managing suspected GCA with rheumatology co-management.
CASE: [age]-year-old [sex] with [visual symptoms]. ESR [___], CRP [___], platelets [___]. Biopsy: [result].
PATIENT FACTORS: eGFR [___]. Allergies: [___]. PMH: [___]. Current meds: [___]. Social: [living situation, mobility, adherence barriers]. Preferences: [___].
TASK: Follow AAO and ACR/EULAR guidelines (cite specific recommendations). Propose:
1. Treatment plan: 1st/2nd-line with renal-adjusted dosing
2. Drug interactions with current medications
3. GI prophylaxis plan (note any GI history)
4. Glycemic monitoring if diabetic
5. Steroid taper schedule
6. Monitoring parameters and follow-up timeline
7. Confidence rating per recommendation (high/moderate/low)
GUARDRAILS: Flag any contraindications. Note urgent referral criteria. Consider adherence burden given social factors.
Next time you see a GCA case: Fill in the [slots], submit. No prompt engineering needed — the expertise is baked in.
What This Walkthrough Demonstrated
RTF → BRAIN Transition
Started with framework selection, upgraded to BRAIN when treatment risk demanded precision.
CoT as a Plug-In
Bayesian CoT was inserted into BRAIN’s [A]pproach element to control diagnostic reasoning.
Domain Template as Output
The final step converted the whole journey into a reusable template for future GCA cases.
Safety verification was performed at every transition point — not just at the end.
Safety / Privacy
Diagnosis
Workup
Treatment
Verification
Domain Template
Companion to: LLMs as Your Diagnostic and Treatment Assistant — Eduardo Mayorga, MD — 2026