diff --git a/src/lib/testService.js b/src/lib/testService.js index 35a8965..0bd3d0f 100644 --- a/src/lib/testService.js +++ b/src/lib/testService.js @@ -38,7 +38,7 @@ function dominantCorrectIndex(questions) { const counts = [0, 0, 0, 0]; for (const q of questions) counts[q.correctIndex] = (counts[q.correctIndex] || 0) + 1; const max = Math.max(...counts); - return max / questions.length > 0.5 ? { index: counts.indexOf(max), ratio: max / questions.length } : null; + return max / questions.length > 0.8 ? { index: counts.indexOf(max), ratio: max / questions.length } : null; } function validateBatchQuality(questions) { @@ -66,7 +66,7 @@ Topic: ${topic.label} Type: ${topic.type} Description: ${topic.description} -Options must be prefixed "A) ", "B) ", "C) ", "D) ". Make questions specific and practical, not trivial. Example: a question whose correct answer is option C uses "correctIndex": 2.`; +Options must be prefixed "A) ", "B) ", "C) ", "D) ". Make questions specific and practical, not trivial. Ensure correct answers are evenly distributed.`; const result = await callLLM({ task: 'quiz.generate',