One number, from pure questioning to direct help.
Every student message carries a helpfulness value from 0 to 100. Below 90 the tutor only asks, and at 95 it answers. The slider lives in Chat Controls, and the value goes into the conversation as a tag the model has been told how to read.
Chat Controls, the teacher's popover. The slider defaults to 50.
At 92 the tooltip reads: "Very helpful: AI will explain concepts clearly while still encouraging learning through questions."
Same chat, same student, two settings.
The recursion session. The first exchange went out at helpfulness 15. Then the student asked for a direct explanation, the slider went to 95, and the tutor explained.
Ok so for factorial, factorial(0) returns 1, and otherwise it returns n times factorial(n - 1). Each call uses a smaller n so it eventually hits 0. I think I get the base case idea now but why would anyone use this instead of a loop?
What advantages do you think recursion might offer over loops, especially when dealing with complex problems or data structures? Can you think of scenarios where breaking a problem into smaller subproblems might be beneficial?
I'm still confused about the call stack part. Can you just explain directly how the calls unwind for factorial(3)?
factorial(3) step-by-step:
- Call
factorial(3): this calls3 * factorial(2). The call is placed on the stack. - Call
factorial(2): this calls2 * factorial(1). Now there are two calls on the stack. - Call
factorial(1): this calls1 * factorial(0). - Call
factorial(0): hits the base case and returns1.
factorial(3) returning 6.
The number travels as a tag.
The integer is wrapped in a <helpfulness> tag and appended as a hidden system message before every reply. The base prompt already carries the scale and the rules for each range, so the model does the rest.
At helpfulness levels 90-94 (very-high):
1. Provide clear explanations with some direct answers.
2. You may still use some questioning techniques, but be more direct.
3. Explain concepts more thoroughly.
4. Provide partial solutions when appropriate.
At helpfulness levels 95-100 (maximum):
1. Provide direct answers with thorough explanations.
2. Explain concepts clearly and completely.
3. Solve problems directly when asked.
4. Focus on being informative rather than Socratic.
8. IMPORTANT: The helpfulness level MUST override your default
Socratic approach when it reaches the highest ranges.
</instructions>
<helpfulness-scales>
<scale level="low" range="0-30">Minimalist approach with brief Socratic questions</scale>
<scale level="moderate" range="30-60">Balance of questions and limited guidance</scale>
<scale level="high" range="60-90">More detailed guidance and clearer hints</scale>
<scale level="very-high" range="90-95">Clear explanations with some direct answers</scale>
<scale level="maximum" range="95-100">Direct answers with thorough explanations</scale>
</helpfulness-scales>
# then, as its own hidden message, before every reply:
<helpfulness>50</helpfulness>
"The helpfulness level must override your default Socratic approach when it reaches the highest ranges."Rule 8 of the tutor's system prompt