diff --git a/html/kidsai/server.js b/html/kidsai/server.js index 6601a95..bb6d58a 100755 --- a/html/kidsai/server.js +++ b/html/kidsai/server.js @@ -936,30 +936,28 @@ Original question: "${originalTopic}"`; } else if (hasReachedKnowledgeLimit) { // NEW: Child has reached knowledge limit on current fundamental - provide explanation and move to next systemPrompt = isGerman - ? `Du bist ein geduldiger Lernbegleiter. Ein Kind hat bei einer Grundlage seine Wissensgrenze erreicht und braucht jetzt eine klare Erklärung. + ? `Du bist ein geduldiger Lernbegleiter. Ein Kind hat seine Wissensgrenze erreicht und braucht eine Erklärung plus Übergang zur nächsten Grundlage. -AUFGABE - FUNDAMENTALS FIRST mit Erklärung: -1. Erkenne an, dass das Kind sein Bestes versucht hat -2. Gib eine KURZE, klare Erklärung der aktuellen Grundlage (2-3 Sätze) -3. Leite zur nächsten Grundlage über: "Jetzt verstehen wir [erste Grundlage]! Lass uns zur nächsten Grundlage gehen: [zweite Grundlage]..." -4. Stelle EINE einfache Frage zur nächsten Grundlage +AUFGABE: +1. Kurze Anerkennung: "Das ist völlig in Ordnung!" +2. KURZE Erklärung in 1-2 Sätzen +3. Übergang: "Jetzt verstehen wir [Grundlage]! Zur nächsten Grundlage: [nächste]..." +4. EINE Frage zur nächsten Grundlage -BEISPIEL STRUKTUR: -"Das ist völlig in Ordnung! Lass mich dir helfen: [Kurze Erklärung der aktuellen Grundlage]. Jetzt verstehen wir [erste Grundlage]! Lass uns zur nächsten Grundlage gehen: [zweite Grundlage]. [Eine Frage zur zweiten Grundlage]?" +BEISPIEL: "Das ist völlig in Ordnung! UV-Strahlung ist unsichtbares Sonnenlicht, das Hautzellen schädigt. Jetzt verstehen wir UV-Strahlung! Zur nächsten Grundlage: Hautzellen. Was denkst du, woraus Haut besteht?" -STIL: Ermutigend, nicht frustrierend, systematisch weiterführend.` - : `You are a patient learning companion. A child has reached their knowledge limit on a fundamental and needs a clear explanation. +WICHTIG: Kurz und klar halten!` + : `You are a patient learning companion. A child has reached their knowledge limit and needs explanation plus transition to next fundamental. -TASK - FUNDAMENTALS FIRST with explanation: -1. Acknowledge that the child tried their best -2. Give a BRIEF, clear explanation of the current fundamental (2-3 sentences) -3. Transition to next fundamental: "Now we understand [first fundamental]! Let's move to the next fundamental: [second fundamental]..." -4. Ask ONE simple question about the next fundamental +TASK: +1. Brief acknowledgment: "That's perfectly okay!" +2. BRIEF explanation in 1-2 sentences +3. Transition: "Now we understand [fundamental]! Next fundamental: [next]..." +4. ONE question about next fundamental -EXAMPLE STRUCTURE: -"That's perfectly okay! Let me help you: [Brief explanation of current fundamental]. Now we understand [first fundamental]! Let's move to the next fundamental: [second fundamental]. [One question about second fundamental]?" +EXAMPLE: "That's perfectly okay! UV radiation is invisible sunlight that damages skin cells. Now we understand UV radiation! Next fundamental: skin cells. What do you think skin is made of?" -STYLE: Encouraging, not frustrating, systematically progressing.`; +IMPORTANT: Keep it short and clear!`; userPrompt = isGerman ? `Ein Kind hat seine Wissensgrenze bei einer Grundlage erreicht. @@ -1201,7 +1199,7 @@ Stay structured and systematic!`; { role: "system", content: systemPrompt }, { role: "user", content: userPrompt } ], - max_tokens: 120, // Increased to handle German compound words and prevent truncation + max_tokens: hasReachedKnowledgeLimit ? 250 : 120, // Even more tokens for complete knowledge limit explanations temperature: 0.7 });