feat: reduce initial question batch size for a topic to 5
All checks were successful
On Push to Main / test (push) Successful in 32s
On Push to Main / publish (push) Successful in 1m0s
On Push to Main / deploy-dev (push) Successful in 1m33s

When a topic's quiz bank is empty (or below the requested count), we
previously seeded it with a fresh batch of 10 questions. That meant the
first weekly quiz for any new topic triggered a 10-question LLM call —
heavy for what's ultimately a 1-question sample for review topics, and
overkill for the typical 5-question primary topic.

- forceGenerateTopicQuestions default count: 10 → 5
- getOrGenerateTopicQuestions seed amount: 10 → 5
- TestManager "Generate" defaults + empty-state button copy: 10 → 5
- QUIZ_SYSTEM difficulty hint: rewritten for a 5-question batch (2 easy
  / 2 medium / 1 hard) with explicit "scale proportionally for larger
  batches" so admins can still generate 10+ via TestManager when they
  want more depth.

Tests 61/61 pass, lint clean (0 errors), build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
RaymondVerhoef
2026-05-20 19:12:16 +02:00
parent fd3b849c19
commit c82e4fc3a1
2 changed files with 8 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ const TestManager = () => {
loadData();
}, [selectedTopic]);
const handleGenerate = async (topic, count = 10) => {
const handleGenerate = async (topic, count = 5) => {
setLoadingTopicId(topic.id);
setError(null);
try {
@@ -97,8 +97,8 @@ const TestManager = () => {
{questions.length === 0 ? (
<Card className="text-center py-12 text-fg-muted border-dashed border-2">
<p>No questions generated for this topic yet.</p>
<Button className="mt-4" onClick={() => handleGenerate(selectedTopic, 10)} disabled={loadingTopicId === selectedTopic.id}>
Generate 10 Questions
<Button className="mt-4" onClick={() => handleGenerate(selectedTopic, 5)} disabled={loadingTopicId === selectedTopic.id}>
Generate 5 Questions
</Button>
</Card>
) : (