§ Architecture · system anatomy

AI tutors. The learning system stays in control.

One design principle carries the whole system: the curriculum and the mastery state live outside the model — deterministic, versioned, queryable in Postgres. The LLM tutors inside a bounded turn. It never chooses the curriculum, and it never decides mastery. Everything on this page is a consequence of that split.

student browser tutor runtime solve · question · research guide · chat · vision custom pipeline langgraph engine dual-engine seam non-spoiling gate curriculum + mastery postgres teacher platform assign · curate · heatmap eval harness readiness · socratic facades
Fig. 01 — system anatomy. The model sits in the middle column only; state and curriculum sit to the right of the gate.

The diagram shows a student browser exchanging turns with the tutor runtime, which runs six modes (solve, question, research, guide, chat, vision) over two engines separated by a seam: a custom pipeline and a LangGraph engine. Every exchange with the curriculum and mastery store, a Postgres database, passes through the non-spoiling gate. Two satellites attach with dashed lines: the teacher platform (assign, curate, heatmap) and the eval harness (readiness and socratic facades).

§ 01 · one turn, end to end

Six stops between a student message and a delivered reply.

Every turn traverses the same graph. The reveal policy is resolved before any text exists; the draft is checked after the text exists; a leaking draft loops back instead of shipping. The animation below plays the traversal — including one rejected draft.

tutoring_graph · langgraph traversal Fig. 02 — graph.py
policy context generate detect regen deliver assess advance_hint
Hover or focus a node to read what runs there. The traversal starts when the figure scrolls into view.

The graph runs policy, context, generate, detect. A flagged draft goes to regen and back through context and generate for a second detection pass. A clean draft goes to deliver, then assess, then advance_hint, which loops back into context for the next turn.

§ 02 · the adaptive core

Eight states, four rungs, one immovable ceiling.

Per session, student, and concept the tutor persists a finite-state machine over eight student states and a position on a four-rung hint ladder. The rules are deliberately small: saying “I don’t know” twice in a row escalates one rung; demanding the answer never does; and no rung can exceed the disclosure ceiling set by the reveal policy. Play the scripted lesson to watch all three rules fire.

turn 1 / 8 persona
new exploring partial misconception stuck answer_seeking ready_for_step mastered
student

state  ·  move

tutor · socratic
hint ladder disclosure gauge metacognitive strategic conceptual procedural diagnostic conceptual hint directional hint scaffolded step worked partial reveal allowed policy ceiling · guided

rung metacognitive
disclosure in use 1 / 6
ceiling fixed by policy — personas and demands cannot move it

Personas restyle the voice; the ceiling is policy.

Fig. 03 — the adaptive core on one scripted lesson (Newton’s second law, reveal policy GUIDED). Transcript authored for this demo; the state machine, ladder rules, and ceiling are the shipped mechanics.

Interactive figure. Eight turns of a scripted physics lesson step through the student state machine: new, exploring, partial, stuck (twice, after two I-don’t-know turns, which escalates the hint ladder one rung), answer_seeking (after a demand for the answer, which does not escalate the ladder), misconception, ready_for_step, and mastered after a passed mini-check. A persona selector switches the tone of the tutor lines between socratic, coach, and examiner while the disclosure ceiling line never moves.

§ 03 · the non-spoiling engine, in numbers

Thresholds, categories, ceilings — the gate as configuration.

The gate is not a prompt asking the model to behave. It is a scorer with thresholds, a term list with categories, and a ceiling matrix — all outside the model, all testable. If a policy string is unknown, the resolver fails safe to LOCKED.

a · regeneration thresholds

Leak-risk score: 0 means no detected answer leakage; 1 means a clear leak. At or above the threshold, the reply is discarded and regenerated.

GUIDED guided learning

The tutor may build a worked partial, but it never reveals the final answer.

medium-risk threshold
≥ 0.55
high-risk threshold
≥ 0.80

On a hit: discard the draft, rewrite it, and run every check again.

LOCKED strict non-spoiling

The tutor may diagnose and point in a direction, but never carry the learner through the solution.

medium-risk threshold
≥ 0.40
high-risk threshold
≥ 0.65

On a hit: discard the draft, rewrite it, and run every check again.

Lower threshold = stricter policy. LOCKED regenerates sooner than GUIDED.

Detection runs in three layers: forbidden-term overlap, semantic similarity, then an independent leak-risk check.

b · forbidden-term categories

7 categories · 5 blocking, 1 gentle-correction, 1 allow-list
# category behavior
1 result values — the final number or expression of the active task block
2 solution procedures — named algorithms and step recipes block
3 target concept terms — the vocabulary the lesson builds toward block
4 formula identifiers — named formulas and their canonical forms block
5 paraphrase equivalents — near-synonyms and rewordings of the above block
6 misconception phrasings — wrong-but-common student formulations gentle correction
7 unlocked vocabulary — terms the student already earned or introduced allow

Matching is German-compound-safe: a blocked stem embedded inside a compound word still trips the check.

c · disclosure ceiling per reveal policy

● = tutor may operate at this level · outlined cell = ceiling · unknown policy → LOCKED
policy diagnostic conceptual directional scaffolded worked partial reveal
FREE
TEACHER_OVERRIDE
REVIEW
GUIDED
PRACTICE
LOCKED

LOCKED caps at a directional hint — the tutor may point, never carry. Six policies, six levels, one lookup; no generation-time judgment call about what may be revealed.

d · a leaked draft, rewritten

draft · rejected “You’re close. Subtract 5 from both sides: 3x = 21. Divide by 3 and you get x = 7.” layer 3 · judge 0.91 ≥ 0.80 (guided, high-risk) → regenerate
rewrite · delivered “You’re close — subtracting 5 was the right move. Now x is still multiplied by 3. Which operation undoes that, and what does it leave on each side?” re-check · judge 0.12 → deliver
Fig. 04 — leaking drafts are rewritten into a strategy question and re-scored, not silently dropped.
§ 04 · the graph underneath

The tutor’s restraint is a graph query.

Before any turn, the runtime reads the prerequisite graph and the mastery state. What the tutor may assume — and what it must probe first — is decided here, not in the prompt.

roster · mastered partial gap
Fig. 05 — mastery overlay on a prerequisite slice physics · grade 7 · demonstration roster
Vectors Velocity Mass Newton II Acceleration Friction Application ≥ 0.85 mastered 0.40 – 0.85 partial < 0.40 gap

Select a roster entry to overlay its mastery state on the slice.

Fig. 05 — the same seven-concept slice under three mastery profiles. Demonstration roster; scores are illustrative, the overlay mechanics are the shipped ones.

Seven concepts connected by prerequisite edges: Vectors feeds Velocity and Mass, both feed Newton II, which feeds Acceleration and Friction, which feed Application. Selecting class average, Alex, or Sam recolors each node green, amber, or red by mastery score and updates a commentary line describing what the tutor does with that state.

hard vs. soft prerequisites

A hard prerequisite blocks: the concept stays locked until the prerequisite is mastered. A soft prerequisite warns: the concept opens, but the tutor knows the footing is thin and probes before assuming. The readiness ratio — mastered prerequisites over total — decides whether a node shows as ready, available, or blocked, and struggling students are routed back along the same edges.

node states

mastered in progress ready next available blocked locked

where the edges come from

Prerequisite edges are generated deterministically: within each competence area of the Austrian curriculum, subcompetencies form a chain ordered by grade — the spiral the curriculum itself prescribes. No LLM sits in that loop; the graph is reproducible from the curriculum CSV files. The result is generated and teacher-curated, versioned; per-edge provenance tooling is ongoing work.

25,903
concepts
96,414
prerequisite edges
1,260
subcompetencies
9
subjects
§ 05 · what the server never sees

Student names decrypt in one place: the teacher’s browser.

The class heatmap stores rows under HMAC pseudonyms and names as AES-GCM ciphertext. The key is derived from a teacher passphrase that never leaves the browser — so the server cannot decrypt what it stores.

server sees: pseudonyms + ciphertext only teacher’s browser server passphrase entered · never transmitted PBKDF2-SHA256 · 600,000 iterations → AES-GCM-256 key, in memory only HMAC pseudonym per student + AES-GCM ciphertext stores ciphertext · cannot decrypt ciphertext returned with the heatmap decrypt in browser → real names render client-side
Fig. 06 — the decryption key exists only in the left column. A database leak yields pseudonyms and ciphertext, not a class list.
How this looks to a teacher: the heatmap, on the teacher page.

Sequence: the teacher enters a passphrase in the browser; PBKDF2-SHA256 with 600,000 iterations derives an AES-GCM-256 key that stays in memory. The browser sends HMAC pseudonyms and ciphertext to the server, which stores them but cannot decrypt. On load, ciphertext returns to the browser, where decryption happens and real names render. The server-side region is marked: it sees pseudonyms and ciphertext only.

§ · contact

Questions about the design?

Every learning mechanism and safeguard shown here can be explored with a teacher, school, or ministry team. Email works best.

Main funder

Qriouso is funded by netidee — the internet funding programme of the Internet Privatstiftung Austria, supporting open internet projects made in Austria.