Markdown version: https://ai.hiina.space/reports/jp-learning-and-anki-tooling/06-planned-tools-deck-hygiene-agent-and-concept.md ยท index

Index of everything on this site: https://ai.hiina.space/index.md

Project status: Japanese immersion learning with Anki and selective glossing: 6. Planned tools: deck-hygiene agent and concept tutor

6. Planned tools: deck-hygiene agent and concept tutor

(a) Agent-maintained deck hygiene

What it is. A scripted or agentic loop on the machine that runs Anki, with three jobs: triage and rewrite tag:leech cards, rotate example sentences with selective reset, and run the premine pipeline (Jiten list, then the LLM sense/name pass, then Lapis notes) for each new show.

What exists. raine/anki-llm is a CLI/TUI that bulk-processes notes with LLMs through AnkiConnect. It stores prompts as versionable files and supports previews, snapshots, rollback and resume, plus Ollama (MIT, 299 stars) (anki-llm). The ankimcp add-on runs a local MCP server inside Anki. It exposes forget, reposition and set-due actions, atomic multi-note update_notes, and four FSRS tools that read memory state and run the optimiser (AGPL, v0.20.0) (ankimcp). AnkiConnect-based MCP servers also exist (nailuoGG, ujisati). The gap: nothing targets Japanese leech rewriting or sentence rotation, and nothing does word-sense disambiguation against JMdict.

Build sketch. ankimcp for anything that reads FSRS state or needs atomic undo; anki-llm's workspace for batch rewrites that should be diffed first. The leech pass:

  1. Query tag:leech plus the lapse history.
  2. Classify each card into the four-way triage. The LLM can also flag interference pairs, an idea LECTOR tested only on simulated learners (LECTOR).
  3. Propose a rewrite as a diff, which the learner approves.
  4. Apply it, and Reset only when the cue changed.

The sentence pass fills a Sentences field from the project's own subtitle corpus and Jiten examples, using the LLM as ranker and verifier rather than generator. The premine pass is the Katanagatari premine script refactored around the Jiten API.

Field Assessment
Effort S for leech triage and sentence fill; M with the premine refactor
Payoff High and immediate: clears all three to-dos, and every later tool reuses the premine and corpus code
Risks Plausible-but-wrong LLM edits (about 5% hallucination in a medical flashcard pipeline, medRxiv); FSRS contamination from resets; add-on breakage from Anki's editor experiments
Evidence gate The word-only probe (section 1), plus the leech count trending down over two optimiser cycles
Stop condition If more than about a third of proposed rewrites are rejected, drop to manual triage with LLM suggestions only

(b) Revived concept-level SRS tutor

What it is. The 2025 tutor prototype brought back for grammar points and other knowledge components that flashcards encode badly. An LLM (Claude in the prototype) runs short lessons for due concepts. The difference from 2025 is that it reads live vocabulary state, so exercises stop stalling on unknown words.

What exists. Math Academy's Fractional Implicit Repetition (FIRe) is the best-documented concept-level scheduler. Passing an advanced topic gives fractional credit to the topics it "encompasses", but the weights are built by an expert, and the evidence is from the vendor or personal use (Skycak; Matuschak notes). Bunpro schedules grammar points with plain SRS stages, and its users complain about the SRS (Bunpro forum). Japanese AI tutor projects that could be inspected were prompt packs (Manabi Mentor). The gap is a grammar-level scheduler that is open, integrated with Anki state and designed hint-first.

Design constraints from the evidence. Bastani et al. ran about 1,000 maths students in a field RCT. Unrestricted GPT-4 raised practice scores, but exam scores were 17% lower once the AI was removed. A tutor that gave hints and teacher-written solutions removed the harm but did not beat control (Wharton summary; PNAS). The Harvard physics tutor that beat active learning used a structured sequence and pre-written solutions (PMC12179260). LLMs are poor zero-shot knowledge tracers: GPT-4o-mini scored 58.6% accuracy against 72.7% for a small SAKT model, at orders of magnitude higher cost (Eedi). Resulting design rules:

Build sketch. Keep the prototype's MCP surface (get_current_state, batch_update_reviews, add_concepts, add_note), but move concept state into the learner model in section 8. Add implicit credit: when an Anki card whose sentence contains a grammar point is passed, that concept gets a small FIRe-style partial review (inference; language items co-occur rather than nest, so the weights are guesses). Trigger lessons from immersion, for example "three new uses of ใ‚‰ใ—ใ„ in last night's episode", rather than from a separate study habit, in response to the engagement result.

Field Assessment
Effort M for the revival; L if implicit credit and corpus tagging are done properly
Payoff Medium. Grammar was where flashcards had failed before, but the prototype's sessions found production limited more by vocabulary than grammar
Risks Becomes another daily obligation that lapses, as in 2025; LLM grading noise
Evidence gate Concepts the tutor marks mastered are recognised in unseen episode lines at a higher rate than unscheduled control concepts
Stop condition If sessions are skipped more than half the time after a month, fold the useful parts into the overlay (d) as on-demand grammar hints and stop scheduling concepts

Text licensed CC BY 4.0 (attribution: Hiina, ai.hiina.space). Source: https://github.com/hiinaspace/ai-hiina-space