The old prompt's 'every factual claim comes from a chunk, otherwise refuse'
rule was too rigid for clinical reasoning. Users asking 'patient presents
with X, Y, Z - what could this be?' were getting the canonical refusal
even when the chunks contained the relevant criteria, because no single
chunk explicitly labelled that symptom constellation as a diagnosis.
New prompt allows pattern-matching: the model may apply chunk-sourced
criteria to user-described hypothetical facts, and report which conditions
are consistent with the described features. Guard-rails preserved:
- All clinical facts (criteria, prevalence, treatment, features) still
require chunk citations.
- Hedging language ('consistent with', 'could meet criteria for',
'overlaps with'), not diagnostic language ('the patient has').
- Explicit differential-question rule: list every supported candidate
with distinguishing features, cited.
- Polarity check kept unchanged.
- Refusal narrowed: only when the chunks do not cover …
Double DEFAULT_MAX_TOKENS from 1024 to 2048 and loosen the 'aim for 2-4
sentences' instruction. The new system prompt tells the model to match
length to the question: short answers for factual one-shot queries,
full detail (criteria, differentials, treatment lists, etc.) when the
question actually calls for it, with bullets or short paragraphs when
long answers need structure.