DeepTutor: A Mastery Gate You Can Score 1.0 On and Still Not Pass, and the arXiv Revision Where Three of Five Backbone Numbers Changed — aniketkarneai.com | aniketkarneai.com
Wednesday, November 11, 2026 Field notes on autonomous systems ● Amsterdam, NL
daily

DeepTutor: A Mastery Gate You Can Score 1.0 On and Still Not Pass, and the arXiv Revision Where Three of Five Backbone Numbers Changed

HKUDS DeepTutor ships a two-axis mastery gate where quantitative knowledge points need 0.9 recency-weighted accuracy and conceptual ones need a Feynman explanation, so a quiz can never open the second gate. Installing the v1.7.0 wheel and reading the policy code also surfaced a paper revision that silently rewrote three of five backbone deltas, plus an evaluation branch whose last commit removed the benchmark pipeline artifacts.

HKUDS/DeepTutor has 50,124 stars, 6,166 forks, and 224 contributors. It shipped v1.7.0 two days ago, on 2026-10-28. The paper behind it is arXiv:2604.26962, “DeepTutor: Towards Agentic Personalized Tutoring,” and its abstract ends with a number that a lot of people are going to repeat without checking: DeepTutor “improves personalized metrics by 10.8% on average and strengthens general agentic reasoning across five backbone models by 29.4%.”

I installed the wheel (pip install deeptutor, version 1.7.0, released 2026-10-28 on PyPI as the 52nd release), ran deeptutor doctor --format json, and then went looking for the code that decides whether a student has learned something. That is where this post goes, and it is not where I expected.

The bet, in one sentence

A tutoring agent that answers questions well is not tutoring — the interesting artifact is the thing that decides what to ask next, and DeepTutor’s is a two-axis mastery gate where one axis is a number and the other is a judgment call the model itself has to make in prose.

Two axes, and only one of them is arithmetic

The policy lives in deeptutor/learning/policy.py, and the vocabulary is KnowledgeType. There are four types. MEMORY and PROCEDURE are graded quantitatively. CONCEPT and DESIGN are not.

QUANTITATIVE_GATE: dict[KnowledgeType, float] = {
    KnowledgeType.MEMORY: 0.9,
    KnowledgeType.PROCEDURE: 0.9,
}

QUALITATIVE_TYPES: frozenset[KnowledgeType] = frozenset(
    {KnowledgeType.CONCEPT, KnowledgeType.DESIGN}
)

The comment above the quantitative gate says the 0.9 “mirrors Alpha School’s ‘90% before you advance’.” The comment above the qualitative set explains the split: CONCEPT and DESIGN are “gated qualitatively — a Feynman-style explanation judged by the tutor via mastery_assess — rather than by string-graded accuracy, because there is rarely a single canonical right answer to match against.”

So is_assessed_mastered reads like this:

def is_assessed_mastered(progress, kp) -> bool:
    if not set(kp.required_visual_tasks).issubset(visual_achievements(progress, kp.id)):
        return False
    if kp.type in QUALITATIVE_TYPES:
        return bool(progress.qualitative_mastery.get(kp.id, False))
    return progress.mastery_levels.get(kp.id, 0.0) >= gate_threshold(kp.type)

Two gates, two completely different failure modes, and the qualitative one is the interesting one. A MEMORY objective unblocks when a number crosses 0.9. A CONCEPT objective unblocks when the tutor has recorded a qualitative pass, and nothing else can produce that record. There is no threshold to cross. gate_threshold returns 1.0 for a qualitative type, which is not a threshold in any meaningful sense — it is a display value so the UI can render a number where the truth is a boolean.

The score that cannot open the gate

Here is the part that made me keep reading. In deeptutor/capabilities/mastery/tools.py, the code that grades a quiz answer and decides what the tutor does next carries this comment:

# What to do after the verdict. A qualitative objective needs its own
# branch: quiz accuracy lands in ``mastery_levels`` without moving that
# gate — it can even read a full 1.0 against a 1.0 threshold while
# ``mastered`` stays false — so telling the model to pose another
# question here is telling it to loop forever on an objective no
# question can clear. That loop is invisible from the chat, where the
# tutor narrates progress it never actually recorded, and visible on
# the outline rail, which correctly never moves.

Read that again, because it is a description of a bug class that costs real money: the tutor poses a question, the learner answers correctly, the score goes up, and the objective does not open. The tutor’s own instructions handle it — the branch for a qualitative gate tells the model to “ask them to explain the idea in their own words and record your judgement with mastery_assess. That call is the only thing that opens this gate.”

But the tool payload that comes back to the model makes the situation legible only if you know to look:

"mastery": round(display_mastery(progress, kp), 3) if kp else 0.0,
"threshold": round(gate_threshold(kp.type), 3) if kp else 0.0,
# Which gate that number is being read against. Without it a
# qualitative objective reports mastery 1.0 / threshold 1.0 /
# mastered false, which is not a reading anyone can act on.
"gate": gate,
"mastered": mastered,

So a qualitative objective at full score reports mastery: 1.0, threshold: 1.0, mastered: false. Every number looks perfect and the gate is still shut. The gate field is the disambiguator — and it exists, by the comment’s own account, because the numbers alone were “not a reading anyone can act on.”

Then there is the escape hatch, in mastery_source:

def mastery_source(progress, kp) -> str:
    """Return ``system`` or ``learner`` provenance for a cleared waypoint."""
    if is_assessed_mastered(progress, kp):
        return "system"
    if kp.id in progress.learner_mastery_overrides:
        return "learner"
    return ""

is_mastered — the function the route navigation actually consults — is bool(mastery_source(progress, kp)). Which means a learner can advance past a gate the system did not clear, and the only trace is a provenance string that the public report is supposed to expose. The docstring is explicit that the deterministic gate is still reachable separately via is_assessed_mastered, and that “every public report exposes that different provenance.” Whether it does is a different question, and one I did not chase to the end.

The scoring arithmetic, run

deeptutor/learning/mastery.py is 44 lines and says outright that it is “intentionally simple and swappable.” The whole policy:

_RECENCY_WEIGHTS: tuple[float, ...] = (0.5, 0.7, 0.85, 0.95, 1.0)
_CONFIDENCE_CAP: dict[int, float] = {1: 0.5, 2: 0.8}

Recency-weighted accuracy over the last five attempts, capped at 0.5 after one attempt and 0.8 after two, so a lucky single correct answer cannot declare mastery. I ran it directly rather than reading it, and the behavior at the 0.9 gate is the part worth putting in a table.

attempt historymasteryclears the 0.9 gate?
3 consecutive correct1.0000yes
4 consecutive correct1.0000yes
5 consecutive correct1.0000yes
4 correct, 1 wrong at oldest position0.8750no
4 correct, 1 wrong at newest position0.7500no
3 correct then 1 wrong0.4872no
1 wrong then 1 correct0.5128no
2 wrong then 3 correct0.7000no

Read the top three rows against the fourth. Three in a row scores 1.0 and opens the gate. Five attempts with a single stale wrong answer at the oldest position scores 0.875 and does not open it. The gate is not monotone in correctness — it is a moving window over a five-slot buffer, and one wrong answer inside that window is enough to hold the gate shut until it rotates out.

Which is a defensible design. Recency weighting exists so that “recovery after early mistakes is rewarded,” and a single recent wrong answer genuinely should cost more than a single old one. But the cliff is at an awkward place. The two-attempt cap means you need three consecutive correct answers to clear a MEMORY objective at all, and from that point a single wrong answer inside the window drops you from 1.0 to 0.875 — below the gate, by 0.025, no matter how many correct answers follow until it ages out. Four more correct answers and it clears again. Whether that is the intended feel of a mastery system I cannot say from the source; the code comment does not discuss the interaction between the cap and the threshold.

The swap point is deliberate. “To plug in a richer model (e.g. an IRT/BKT estimate or a tuned spec), replace compute_mastery alone; callers (LearningService.calculate_mastery) need not change.” For a system whose whole pitch is personalized tutoring, the pedagogical model is one function, and everything upstream treats mastery as a scalar.

Three of five numbers changed between arXiv versions

I went back to the paper to check the numbers and found something more interesting than the numbers. The abstract says 29.4%. The v1 body says 28.6%. Both are in the same paper.

v1’s Table 2 lists per-backbone relative gains: Gemini-3-Flash +29.12%, Sonnet-4.5 +32.03%, Qwen-3.5-Plus +23.00%, GPT-5-Mini +27.11%, Minimax-M2.5 +31.50%. The mean of those five is 28.55%, which is where v1’s “28.6%” comes from. v3’s Table 3 lists +29.24%, +32.03%, +25.69%, +28.51%, +31.50% — mean 29.39%, which is the abstract’s 29.4%.

The raw pass@1 scores are identical between the two versions. Only the derived deltas moved. So the v3 revision recomputed the relative gains from unchanged underlying scores and three of five came out different. I recomputed all five from the raw numbers using the paper’s own formula — the mean relative gain over benchmark groups, Equation 1 in v3:

Gemini-3-Flash    recomputed 29.24%   v3 table 29.24%   v1 table 29.12%
Sonnet-4.5        recomputed 32.03%   v3 table 32.03%   v1 table 32.03%
Qwen-3.5-Plus    recomputed 25.69%   v3 table 25.69%   v1 table 23.00%
GPT-5-Mini        recomputed 28.51%   v3 table 28.51%   v1 table 27.11%
Minimax-M2.5      recomputed 31.50%   v3 table 31.50%   v1 table 31.50%

Every v3 delta reproduces exactly from the table’s own numbers. Three of v1’s do not. The likely explanation is that v1’s table was computed against a slightly different column set or an earlier run of the benchmark, and the revision reconciled the table against the raw scores. Either way, the 10.8%/29.4% pair in the abstract is only true of v3, and a reader who read the v1 PDF in April and cites it today is citing different numbers under the same title. The paper went through three revisions: v1 on 2026-04-10, v2 on 2026-05-08, v3 on 2026-07-09.

I want to be careful about what this does and does not mean. The direction is not uniformly favorable — v3’s Gemini delta went up, Qwen and GPT-5-Mini went up, nothing went down, so the revision raised the average. A 0.8-point swing on a headline number is not a scandal, and I am not claiming misconduct. I am claiming that the specific pair of numbers in the abstract is version-specific and the arXiv page a reader lands on does not tell them which version they are reading.

The evaluation branch, and what it removed

The paper’s footnote 1 points at github.com/HKUDS/DeepTutor/tree/eval for “full codes.” That URL 404s on main — there is no eval directory in the default branch. There is, however, a branch named eval, and it holds the full evaluation stack: 429 files, benchmark/data_generation/ with the profile and gap generators, benchmark/evaluation/ with the judge and the request pipeline, benchmark/iso_solve/ with per-benchmark harnesses for HLE, GPQA, GAIA, AA-LCR, LiveBench, and the src/personalization/ module containing the trace forest.

The last commit on that branch is dated 2026-05-07 and its message is:

Remove private benchmark pipeline artifacts

The code is all there. The generated artifacts — the actual knowledge bases, the 90 learner profiles, the 270 tasks — are not. The data/ directory on the branch contains a README describing the layout and nothing else.

That is a defensible call. Redistributing 30 knowledge bases worth of textbook and research-paper content has licensing implications, and “remove the private artifacts, keep the pipeline” is the conservative version of releasing evaluation code. It does mean the benchmark is not reproducible from the repository as it stands. benchmark/config/benchmark_config.yaml and the generation scripts are there to regenerate against material you supply yourself, which is a different exercise from reproducing the published numbers.

What is reproducible is the retrieval-evaluation half, and it ships in the main branch as a proper library. deeptutor/services/rag/eval/metrics.py computes recall@k, precision@k, ndcg@k, mrr, hit@k, and map@k. I ran it directly against hand-built hit vectors to check the implementations behave as the docstrings claim:

caserecallprecisionndcgmrrhitmap
gold at ranks 1,2,31.00001.00001.00001.00001.001.0000
gold only at rank 31.00000.60000.61830.33331.000.4778
gold at rank 1 only (of 3)0.33330.20000.46931.00001.000.3333
total miss0.00000.00000.00000.00000.000.0000
gold at rank 3, cutoff k=20.00000.00000.00000.00000.000.0000

The last row is the one worth checking by hand, because it is the difference between “the gold passage was retrieved” and “the gold passage was retrieved in time.” Same ranking, k=5 gives recall 1.0, k=2 gives recall 0.0. A retrieval system can look perfect on a recall@5 chart and still be useless to a tutor that needs the passage in the first two results to cite it in an answer. The metrics module has a query_limit and a mode parameter threaded through the CLI, and deeptutor kb eval <name> --dataset qa.jsonl --top-k 5 will write a JSON report with all six metrics per case and averaged.

There is a deeptutor kb eval-diff command for comparing two retrieval runs, which is the thing you would actually want if you were swapping LlamaIndex for PageIndex or LightRAG in a live knowledge base. The main branch carries LlamaIndex, PageIndex, GraphRAG, LightRAG, a remote LightRAG Server, WeKnora, Kiwix ZIM archives, MarginNote 4, Tencent IMA, and linked Obsidian vaults — ten retrieval backends behind one kb interface — and eval-diff is how you find out whether a swap helped.

The trace forest, and its fallback scorer

The memory architecture from the paper is a tree-structured multi-resolution store, and the implementation is on the eval branch at src/personalization/trace_forest.py and trace_tree.py. Three levels, and trace_tree.py builds them explicitly:

# L1 (question)  ->  level=1,  node_type="question"
#   L2 (step)    ->  level=2,  node_type="step"
#     L3 (round) ->  level=3,  node_type="round"

Every agent gets a TraceToolkit — SearchNodes, ListTraces, ReadNodes — so a tutor can drill from a session summary down to the exact execution record that produced a specific misconception diagnosis. The paper’s framing is that flat conversation logs lose this: “an agent can drill down from a session summary to the exact execution record that produced a specific misconception diagnosis.”

What I found in the scorer is a fallback path that is worth knowing about. _node_score prefers cosine similarity over stored embeddings, and when embeddings are unavailable it degrades:

if q in t:
    return min(1.0, len(q) / max(1, len(t)))
q_tokens = {x for x in q.split() if x}
t_tokens = {x for x in t.split() if x}
return len(q_tokens & t_tokens) / len(q_tokens)

I extracted the method and ran it:

querynode textscore
chain rulechain rule1.0000
chain rule productrule chain confusion0.6667
chain ruleThe student keeps confusing the chain rule with the product rule in calculus0.1316
the student is confusing the chain rule with the product rulechain rule0.2500
fourier transformchain rule0.0000

The substring branch returns len(q) / len(t) — a length ratio. The third row is the problem: an exact substring match of chain rule inside a 76-character node scores 0.1316, while the same query against a 10-character node scores 1.0. A longer node that contains the answer verbatim is scored as a worse match than a terse one. Under embeddings this branch never runs, but the fallback is what you get when the embedding call fails or the index has no vectors, and at that moment the retrieval silently inverts for exactly the long, detailed nodes a trace forest is made of.

The token-overlap branch has the mirror-image problem. It divides by len(q_tokens), the query’s token count, so a long query against a short node scores low (row four, 0.25) even when every relevant term is present. Row two is the case where both branches would work: chain rule product against rule chain confusion scores 0.6667 on token overlap even though the two strings share no contiguous substring, which means the fallback finds a match the substring branch would have missed entirely.

None of this is a bug report against the project. It is what happens when a semantic index degrades to lexical matching and the scoring function was written for the semantic case. Whether the fallback should be loud is the open question. semantic_search filters on score > 0 and sorts descending, and there is no signal in the return value that says “this was a lexical match, not a semantic one.” In a memory system whose entire value proposition is “recall the specific moment the learner got confused,” a retrieval that silently returns the wrong node is worse than one that returns nothing and admits it.

The CLI, if you want to drive it

The v1.7.0 wheel installs a deeptutor binary, and the agent-facing half is the interesting part. deeptutor run <capability> "<message>" --format json emits NDJSON, one event per line, every line tagged with a session_id. I ran it without configuring a model:

{"type": "session", "source": "turn_runtime", "stage": "", "content": "", "metadata": {"session_id": "unified_1793324200929_80d26586", ...}, "seq": 1, ...}
{"type": "error", "source": "chat", "stage": "", "content": "No active LLM model is configured. Please set it in Settings > Catalog.", "metadata": {"turn_terminal": true, "status": "failed", "error_code": "internal_error", "retryable": true}, "seq": 2, ...}
{"type": "done", "source": "chat", "stage": "", "content": "", "metadata": {"status": "failed", "error_code": "internal_error", "retryable": true}, "seq": 3, ...}

The failure is well-formed. A session event, an error event carrying a message a human can act on and a retryable flag, and a terminal done event. An agent driving this over a pipe gets a structured failure rather than an exception and a stack trace on stderr, which is what makes the “let another agent operate DeepTutor” story work at all. The repo ships a root SKILL.md that is a compact handover doc for exactly this, and the README’s pattern for chaining turns in one session is a jq call:

SID=$(deeptutor run deep_research "Survey 2026 papers on RAG" \
  --config mode=report --config depth=standard --format json \
  | jq -r 'select(.type=="done").session_id')
deeptutor run deep_question "Quiz me on that survey" --session "$SID" --format json

deeptutor doctor --format json is the readiness check and it is honest about what it found on a bare install: llm_config failed (“No active LLM model is configured”), llm_credentials failed, llm_endpoint passed, storage passed with “Writable: /tmp/dt_home/data/user”, rag skipped with “Knowledge module is unavailable,” online skipped with “Not requested.”

That last one is the module story. deeptutor[full] pulls in the Web app and the standard feature modules; bare deeptutor is core CLI and SDK only. deeptutor module list shows the rest as uninstalled with dependency blockers spelled out — "issues": ["Required module unavailable: knowledge"] — and deeptutor module install solve or research or mastery pulls the wheels. This is a real modular packaging design and it is also why my deeptutor kb eval --help failed with “No such command ‘kb’”: the knowledge module was not installed in my core-only environment. The RAG eval code I exercised above I pulled from the GitHub tree, not from the installed wheel.

Trade-offs and what this does not tell you

The benchmark’s subject is a simulator. Every number in Table 2 comes from a Gemini-3-Flash student simulator role-playing a learner against a Claude Sonnet 4.6 judge at temperature zero, with each transcript scored three times and averaged. The paper is upfront that “our interactive evaluation relies on LLM-powered student simulators and rubric-based assessors, and therefore inherits the usual gap between controlled simulation and real learner behavior.” The human-alignment study on 45 sessions is a partial answer — Pearson r = 0.82 between human and LLM win rates, p = 0.0038, Spearman rho = 0.83 — but 45 sessions across five domains is a thin sample for a claim about agreement about pedagogical quality.

The 28.6% general-reasoning gain is a scaffold gain, not a personalization gain. The paper is careful about this: the solver-only transfer study disables “the Hybrid Personalization Engine, including SKG and DPM,” and the note under the table says the baselines “are bare backbone models without tool access, so the gains reflect the combined effect of the multi-stage pipeline and the tool suite it orchestrates.” A Gemini-3-Flash going from 37.58 to 47.88 average on the five-benchmark set is mostly the pipeline plus tools. Reading it as “DeepTutor makes models smarter” would be wrong; reading it as “a fixed three-stage solve-plan-execute scaffold plus tools is worth 25-32% on agentic benchmarks” is right, and that is a more useful claim anyway.

The 10.76% personalization gain has a narrow denominator. The four baselines — Naive, CoT, Self-Refine, ReAct — land at 3.53, 3.52, 3.57, 3.52 overall quality. A spread of 0.05 on a 1-5 Likert scale. The paper reads this as “reasoning sophistication alone does not translate into better personalization,” and that reading holds. But it also means the comparison is between four near-identical systems and one that is different in kind; DeepTutor’s 3.91 wins by running a different architecture, not by doing the same thing better.

The ablation is the more convincing number than the headline. Removing the grounding module drops Groundedness by 0.73; removing memory drops Personalization by 0.37. Two ablations moving two different metric clusters by roughly the size of the total improvement is a cleaner signal than “10.8% over the strongest baseline,” and it lines up with the ablation table where removing both still leaves DeepTutor at +4.82% over the naive baseline. The multi-stage pipeline is doing work independent of the personalization substrate.

The v1.7.0 release is mostly packaging. “Modular installation, a refreshed learning workspace, block notebooks with Dito, narrated video lessons” is the release note. The narrative video lessons run generated code inside “a bounded WebAssembly interpreter; Docker is not required.” That is a nice trick and it is a UI feature. The mastery gate and the trace forest predate it.

What I could not check

I did not get a model configured, so I never saw a live tutoring turn. Every number I ran above is from deterministic code — compute_mastery, evaluate_hits, _node_score — and every paper number is from arXiv v1 or v3, which are not the same revision. I did not read the trace forest’s write path or the gap generators in full, only the scorer and the tree construction. And I did not find the TutorBench data anywhere in the repository, including on the eval branch, so I could not run a single benchmark task. The three-part check on mastery_source — whether the learner override actually surfaces as learner provenance in every public report — is still open.

Where I would start, if I were picking this up: the 0.9 threshold against the 0.8 two-attempt cap, because those two constants were chosen independently and their interaction is what produces the 0.875 result. And deeptutor kb eval-diff, against two retrieval backends on the same knowledge base, because that is the one command in this codebase that turns a claim about personalization into a number you can act on before shipping.

Where to dig further

  • HKUDS/DeepTutor — 50,124 stars, Apache-2.0, v1.7.0 on 2026-10-28
  • arXiv:2604.26962 — “DeepTutor: Towards Agentic Personalized Tutoring” (v1 2026-04-10, v2 2026-05-08, v3 2026-07-09)
  • deeptutor/learning/policy.py — QUANTITATIVE_GATE, QUALITATIVE_TYPES, is_assessed_mastered, mastery_source
  • deeptutor/learning/mastery.py — compute_mastery, _RECENCY_WEIGHTS, _CONFIDENCE_CAP
  • deeptutor/capabilities/mastery/tools.py — the qualitative-gate branch and its comment about the invisible loop
  • deeptutor/services/rag/eval/metrics.py — recall@k / precision@k / ndcg@k / mrr / hit@k / map@k
  • The eval branch — benchmark/data_generation/, benchmark/evaluation/, benchmark/iso_solve/, src/personalization/trace_forest.py
  • deeptutor.info — the hosted docs, including the Agent Handoff guide
Aniket Karne
DevOps & AI Engineer · Amsterdam
Back to all posts
Reader correspondence

Comments

Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.