Write quiz questions in the style of the course's real exams
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 30s

Modelled on a real 50-question course exam and the V1 question set:
- Stems are short and plain (usually 15-30 words, one paragraph, no
  scene-setting), end in the exam's own question phrasing, and about a
  third may ask directly about a fact the nurse uses.
- Bold and underline are stripped from generated stems (plainStem).
- Choices are concise and parallel: a term or value, a 4-12 word action
  or finding, or quoted speech; explanations go in "why" (1-2 sentences).
- Distractors come from related facts in the material.
- Select-all items have 6 choices with 2-5 correct, mostly 3 or 4.
- The planner varies the kind of question instead of setting and role.
- Review, proofread, "improve questions" and the outside-chatbot
  instructions follow the same rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-16 14:56:14 -07:00
parent 5fef59b07b
commit 39a85ebb0c
6 changed files with 55 additions and 21 deletions

View file

@ -45,3 +45,12 @@ describe('question openers', () => {
expect(acceptRewording(original, 'A 72-year-old client on the unit has a potassium of 3.1 mEq/L and a heart rate of 52.', repeated)).toBeNull();
});
});
describe('plain stems', () => {
it('drops bold and underline emphasis from generated stems but keeps the words', async () => {
const { plainStem } = await import('../server/ai/generate.ts');
expect(plainStem('Which instruction is **most important for absorption**?')).toBe('Which instruction is most important for absorption?');
expect(plainStem('Give __elexacaftor__ with fat.')).toBe('Give elexacaftor with fat.');
expect(plainStem('A dose of 2 * 3 mg is ordered.')).toBe('A dose of 2 * 3 mg is ordered.');
});
});