Keep rationales on what the question tests
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 30s

Med math rationales were padded with unrelated drug facts (TSH and heart
rate for a levothyroxine tablet calculation) because the math prompt
asked for "one safety check" and the rationale format asked for at
least two bullets.
- Rationales take 1 to 4 bullets, each about what the question tests,
  with fewer bullets preferred to padding.
- Med math rationales explain only the calculation: the conversion, the
  method and an arithmetic check.
- The second review rewrites a rationale or "why" that brings in facts
  the question does not test.
- The outside-chatbot instructions say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-16 15:33:38 -07:00
parent 0ad6290250
commit fe94dbf876
4 changed files with 11 additions and 6 deletions

View file

@ -346,7 +346,7 @@ export function plainChoice(text: string): string {
/** How a rationale is laid out, so it reads at a glance instead of as one block of text. */
const RATIONALE_FORMAT =
'Format the rationale in Markdown for quick reading: one bold sentence with the key point, then 2 to 4 short bullet points (one idea each, such as the principle or framework, the physiology or drug action, the safety point). No long paragraphs, and do not repeat the choices\' "why" text, which is shown beside each choice.';
'Format the rationale in Markdown for quick reading: one bold sentence with the key point, then 1 to 4 short bullet points (one idea each, such as the principle or framework, the physiology or drug action, the safety point). Every bullet must be about what this question tests: never add monitoring, lab values, side effects or other facts the question does not ask about just to fill out the list, and use fewer bullets rather than pad. No long paragraphs, and do not repeat the choices\' "why" text, which is shown beside each choice.';
const QUESTION_SCHEMA = {
type: 'object',
@ -955,7 +955,7 @@ async function runGeneration(app: AppContext, draftId: string, req: GenerateRequ
`Write ${want} medication math (dosage calculation) questions, all of type "numeric": the student types the number.`,
`Difficulty ${difficulty}: ${MATH_LEVELS[difficulty] ?? MATH_LEVELS.mixed}.`,
'These do not need to come from the course material: write standard nursing med math with realistic orders, labels and client weights, using generic drug names (drugs from the material are welcome where they fit).',
'Each stem gives the order and what is on hand, and states the unit and the rounding rule ("Round to the nearest tenth."). Exactly one option: the correct answer with its unit, marked correct, with "why" showing the working step by step (dimensional analysis or desired over have). The rationale explains the method and one safety check.',
'Each stem gives the order and what is on hand, and states the unit and the rounding rule ("Round to the nearest tenth."). Exactly one option: the correct answer with its unit, marked correct, with "why" showing the working step by step (dimensional analysis or desired over have). The rationale explains only the calculation: the conversion, the method (dimensional analysis or desired over have) and a quick check that the answer is reasonable for the arithmetic (for example "75 mcg is three 25 mcg tablets"). Do not add drug monitoring, lab values, side effects or dose-limit checks unless the stem asks about them.',
'Set the topic to "Dosage calculation". Vary the problem types.',
]
: isQuiz