fix
This commit is contained in:
@@ -38,7 +38,7 @@ function dominantCorrectIndex(questions) {
|
|||||||
const counts = [0, 0, 0, 0];
|
const counts = [0, 0, 0, 0];
|
||||||
for (const q of questions) counts[q.correctIndex] = (counts[q.correctIndex] || 0) + 1;
|
for (const q of questions) counts[q.correctIndex] = (counts[q.correctIndex] || 0) + 1;
|
||||||
const max = Math.max(...counts);
|
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) {
|
function validateBatchQuality(questions) {
|
||||||
@@ -66,7 +66,7 @@ Topic: ${topic.label}
|
|||||||
Type: ${topic.type}
|
Type: ${topic.type}
|
||||||
Description: ${topic.description}
|
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({
|
const result = await callLLM({
|
||||||
task: 'quiz.generate',
|
task: 'quiz.generate',
|
||||||
|
|||||||
Reference in New Issue
Block a user