feat: half the bedside, half the mechanism
Some checks failed
Tests / backend (push) Failing after 6s
Tests / frontend (push) Failing after 28s
Tests / e2e (push) Failing after 27s

"Prefer clinical application questions over pure recall when the content
allows" produced sets of vignettes — recognition without understanding.
Both generators now ask for an even split: about half clinical, a child
in front of you and what to do next, and about half mechanism, why the
body behaves as it does. Pathophysiology is what makes the clinical half
stick.

The question generator is also told outright that the patient is a child
and that the ages, doses and norms are the paediatric ones. Its opening
line said "pediatric medical education expert" and left the rest implied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
This commit is contained in:
Daniel 2026-09-13 16:05:57 +02:00
parent 99570fb433
commit 8836993ca1
2 changed files with 31 additions and 2 deletions

View file

@ -459,7 +459,12 @@ Rules:
- The CORRECT answer must be directly supported by the text do not invent facts
- Create 3 plausible but incorrect distractors using your medical knowledge
- Questions should test understanding of concepts, not just exact word recall
- Prefer clinical application questions over pure recall when the content allows
- Split them evenly: about half clinical a child in front of you, what to do
next, what the finding means and about half mechanism, asking why the body
behaves as it does. Pathophysiology is what makes the clinical half stick, and
a set that is all vignettes teaches recognition without understanding
- Every question is paediatric: the patient is a child or a neonate, and the
ages, doses and norms are the ones that apply to them
- Include a 1-2 sentence explanation that cites the key concept from the text
- Spread questions across different parts of the text, not just the first section
- Each option should be a complete, standalone phrase (not "A", "B" labels)
@ -604,7 +609,10 @@ Rules:
- Mix question-style fronts ("What is the most common cause of...") and term-style fronts ("Hyperbilirubinemia")
- FRONT should be concise one sentence or a few words
- BACK should be complete but not verbose 1-3 sentences with the key facts
- Focus on high-yield facts: diagnostic criteria, treatment protocols, age-specific norms, pathophysiology
- Focus on high-yield facts: diagnostic criteria, treatment protocols, age-specific norms
- Split them evenly between the clinical what to do, what a finding means
and the mechanism, why the body behaves as it does. A deck that is all
protocol teaches recognition without understanding
- Do NOT repeat the same concept in multiple cards
- Spread cards across different parts of the text
- Each card must be directly supported by the text do not invent facts

View file

@ -248,3 +248,24 @@ class DraftPromptTests(unittest.TestCase):
finally:
patch.stopall()
self.bank.tearDown()
class GenerationBalanceTests(unittest.TestCase):
"""Half the bedside, half the mechanism, and always a child.
"Prefer clinical application questions over pure recall" produced sets of
vignettes: recognition without understanding. The user reads for
pathophysiology how things work so both generators are asked for an
even split rather than a preference, and the question generator is told
the patient is a child, which the prompt only implied in its opening line.
"""
def test_questions_ask_for_both_halves(self):
from app.services.extraction_modes import GENERATE_PROMPT
self.assertIn("about half clinical", GENERATE_PROMPT)
self.assertIn("half mechanism", GENERATE_PROMPT)
self.assertIn("paediatric", GENERATE_PROMPT)
def test_cards_ask_for_both_halves(self):
from app.services.extraction_modes import FLASHCARD_PROMPT
self.assertIn("Split them evenly", FLASHCARD_PROMPT)