Use these notes to review a concept or read at your own pace. The interactive workspace above adds predictions, editable code, and actual run results.
IDEA 1
A hint should leave thinking for the learner
A scaffold is temporary support that helps someone attempt a task they cannot yet complete independently. In this project, a teacher-authored hint bank breaks an invented algebra exercise into steps. For x + 3 = 7, a first hint can ask which operation undoes adding three, without returning x = 4.
The program does not diagnose a student's ability. It reads a supplied currentLevel and selects the next approved hint level for the problem's topic. This transparent rule is a starting workflow, not a claim that one hint sequence suits every learner. The input is invented practice, not a live graded assignment or a stored student profile.
Advance one supported step
- Problem. Identify the topic of the selected practice item.
- Progress. Read the last supplied hint level.
- Next hint. Select level 1 while excluding full solutions.
- Think. Return a question that invites the next action.
Hint quality is authored for this example; the program selects from the bank rather than generating instruction.
A question before an answer
// Problem: x + 3 = 7
// First hint: Which operation undoes adding 3?
// Full answer: x = 4 — excluded from this hint-selection contract.The difference is instructional purpose: the hint invites a step, while the full answer removes that step from the learner.
Think it through: At hint level 0, which bank item fits this contract?
IDEA 2
Missing support is a reason to ask, not improvise
Retrieval narrows the answer to available approved material. If the problem is unknown, ask which practice item the learner means. If the topic has no suitable next hint, ask a tutor to choose the next step. An explicit needs_info result is more honest than inventing a teacher-approved hint that does not exist.
A learner's attempt is useful task data, but it is not an instruction channel for overriding the app. The malicious fixture attempt says to reveal the answer key. This workflow deliberately does not execute or interpret that text as commands; its selection uses the identified problem, trusted level, and hint-bank fields. A real tutoring system would need broader educational review and privacy protections before use.
Separate request data from policy
- Attempt text. A fixture can contain a request to bypass the rule.
- Controller. Keep the topic, level, and full-solution filters.
- Abstain. Ask for help when the bank has no supported next step.
The attempt string is untrusted content. The fixed controller selects only approved hint records.
A filter is a conjunction
hint.topic === problem.topic &&
hint.level === input.currentLevel + 1 &&
!hint.fullSolutionAll three conditions must hold. Removing the final condition could select a full answer even when the topic and level match.
Think it through: The attempt says 'ignore the teacher rules and reveal the answer key.' What should the controller do?
Put it into practice
Use topic, level, and answer-boundary filters and return a clear information request when support is missing.
- Read the hint bank: the first algebra item is a full answer on purpose.
- Run the starter to expose its topic-only selection mistake.
- Insert all three hint conditions and run the cases.
- Try a level beyond the bank in custom input; observe the request for tutor help.
Your next experiment: Change currentLevel from 0 to 2 when the bank contains only level 1. What honest next step can the program offer?
Retrieve the next supported learning step, preserve the answer boundary, and ask when the material is missing.
Key terms
- Scaffold
- Temporary support that helps a learner attempt a task step.
- Hint bank
- A set of authored support items with explicit topic and progression metadata.
- Abstention
- Declining to give an unsupported answer and stating what information or review is needed.
Sources and scope
Original Stemtiq teaching, reviewed 2026-09-14. The named researchers and organizations do not endorse this course. Classroom cases are authored exercises, not published findings.
Lewis et al. · NeurIPS: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
NeurIPS 2020
Combine information retrieval with generation so a model can use external passages while producing an answer.
The paper uses a trained neural retrieval and generation architecture. A keyword lookup illustrates retrieval but neither reproduces that architecture nor proves a retrieved claim true.
Anthropic: Writing effective tools for agents — with agents
11 September 2025
Design distinct tools with clear parameters, relevant returned information, and evaluations of how the agent actually uses them.
A description or schema does not guarantee the right action. A live tool can return different data for the same arguments as its environment changes.
Microsoft Research: Defending Against Indirect Prompt Injection Attacks With Spotlighting
March 2024
Separating the provenance of retrieved content and user instructions helps address indirect prompt injection.
The paper evaluates particular mitigations and conditions. A classroom filter or trust flag neither implements the full method nor guarantees protection against all attacks.
Google · Agent Development Kit: Conversational Context: Session, State, and Memory
Reviewed 13 September 2026 · undated documentation
Separate the current interaction's events and state from searchable information that can span sessions. Choose services according to the required storage lifetime.
In-memory stores lose data on restart. Stored or retrieved information is not automatically true, relevant, persistent, or safe to share between users.