feat: support choice+open dual question generation with judgment anchors

- Add judgment and followupHints fields to QuestionBankItem entity
- Rewrite generateQuestions prompt for 3:7 choice:open ratio
- Extract parseGeneratedQuestion function with type-aware parsing
- Add 29 unit tests: 14 prompt content + 15 parse logic
- Total: 97 tests passing (59 baseline + 38 new)
This commit is contained in:
Developer
2026-05-21 01:04:08 +08:00
parent 17ddfa83bf
commit e782d180d7
4 changed files with 531 additions and 62 deletions
@@ -86,6 +86,12 @@ export class QuestionBankItem {
@Column({ type: 'text', nullable: true })
basis: string | null;
@Column({ type: 'text', nullable: true })
judgment: string | null;
@Column({ type: 'simple-json', nullable: true, name: 'followup_hints' })
followupHints: string[] | null;
@Column({ name: 'created_by', nullable: true, type: 'text' })
createdBy: string | null;