LLM Answer Grader: type your answer, get graded by AI!

AnkiWeb addon 365951175

Adds an answer box to selected cards and grades typed responses with an LLM, returning scores, corrections, feedback, follow-up answers, and rating suggestions using cloud or local models.
AI-generated summary; may contain mistakes.

aireview-flowquiz

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-07-25
Anki versions
25.09.4~
License
AGPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-07-25 (99 days before the snapshot).
  • Commits in the last year: 17.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.1025.09.4+2026-07-25
History across monthly snapshots

Loading…

Similar addons

Anki AI Grader

Lets you answer flashcards by typing, speaking, or handwriting, then has a chosen LLM grade the answer as correct, partly, or totally wrong and explain mistakes.

aischedulingreview-flowquiz

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.1~ Updated 2026-10-11
AI Grader

Scores typed flashcard answers with a 0–100% AI similarity grade, optional partial credit, automatic Again/Hard/Good/Easy selection, and OpenAI or Gemini support.

aischedulingreview-flowquiz

2 votes 34% approval πŸ‘ 2 Β· πŸ‘Ž 0 ⭐ 0 Anki 23.10~ Updated 2025-12-16
AttendingAI

Grades written Anki answers using an LLM, retrieves supporting material via semantic RAG, offers tutor explanations, analytics, batch assessment, and optional interval suggestions.

aischedulingreview-flowstatisticsquiz

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 1 Anki 25.02.6~ Updated 2026-01-10
auto rate typed answer has 1 fork β†’

Automatically rates typed answers as hard, good, or easy based on configurable response-time thresholds, with options for handling mismatches, multiple answer fields, and confirming ratings.

schedulingreview-flowquiz

16 votes 81% approval πŸ‘ 16 Β· πŸ‘Ž 0 Anki 2.1.50~ Updated 2021-12-06

Description

Type your answer on the card, get it graded by an LLM β€” inline, before you rate.

Built for language production practice (translations, free writing), and for any card where "compare my answer" needs judgment instead of exact string matching.

  • A text box appears on cards you choose (matched by note type)
  • Submit with Ctrl/Cmd+Enter β†’ verdict, 0–100 score, corrected version, specific error feedback, alternative phrasings, and a suggested Again/Hard/Good/Easy rating
  • Ask follow-up questions about any grading ("why is that wrong?") β€” answered in the context of your attempt
  • Optional accent keyboard per profile (French: Γ  Γ’ Γ¦ Γ§ Γ© Γ¨ …) for typing accents on a bare QWERTY
  • Your text and feedback stay on screen when you flip to the answer; you still pick the rating
  • Attempt history is stored locally; cards show your last attempt's score

Easy setup: a visual settings dialog (Tools β†’ LLM Answer Grader Settings) with note-type and field pickers β€” no JSON editing required (raw config remains available for power users).

Bring your own model: Claude (default, best grading quality), or any OpenAI-compatible endpoint β€” OpenAI, OpenRouter, Groq, or a fully local & private Ollama / LM Studio server (no card content ever leaves your machine). Different decks can use different models: e.g. a free local model for easy cards, Claude for hard ones.

Desktop only (add-ons don't run on AnkiDroid/AnkiMobile; cards behave normally there). API usage is billed to your own key β€” typically a fraction of a cent per graded card, or free with a local model. Source: AGPL-3.0.

README

LLM Answer Grader β€” Anki add-on

NOTE: THIS WAS ALL FABLE. :)

Type your answer, get it graded by AI, right inside the Anki reviewer. Built for language learning in mind, but supports any Anki flow that benefits from an LLM judge.

Why / Background

I have an Anki deck dedicated to learning French. Specifically, for translating English sentences into French. My original workflow would be: open the card in Anki, type the sentence into a website that supports a French keyboard, paste the card + my answer to Claude for review, then swtich back to Anki to finally rate the card. This add-on collapses that tab switching and makes it so I never have to leave Anki.

Example flow

Set up once β€” pick a provider, paste a key, point a profile at your note types:

Settings dialog: provider, API key, and a grading profile with note-type and field pickers

Matched cards get an answer box (here with the optional French accent keyboard enabled for the profile):

Card in the reviewer with a text input and clickable accent keyboard

Type your attempt, hit ⌘/Ctrl+Enter. Mixing up Β« hier Β» and Β« demain Β» flips the meaning β€” caught, scored, corrected:

Graded attempt: Needs work 45/100, suggested Again, better version and specific feedback

Not convinced? Ask about the grading…

Typing a follow-up question about the grading

…and get a grounded answer, inline, before you rate the card:

Follow-up answer explaining the nuance, shown above the rating buttons

Install

From AnkiWeb (easiest): in Anki, Tools β†’ Add-ons β†’ Get Add-ons… and paste the code 365951175 (listing).

From file: download llm_answer_grader.ankiaddon from the latest release, then in Anki: Tools β†’ Add-ons β†’ Install from file.

Requires Anki 23.10+ on desktop (developed and tested on 25.09). Add-ons don't run on AnkiDroid/AnkiMobile; cards behave normally there.

Setup

Open Tools β†’ LLM Answer Grader Settings… β€” a visual editor with note-type and field pickers (a first-run dialog offers this automatically). Pick your provider, paste your key, add a profile, done. The equivalent raw-JSON config is documented below and remains fully supported:

  1. Tools β†’ Add-ons β†’ LLM Answer Grader β†’ Config.

  2. Pick a provider and set your api_key:

    Provider Config Notes
    Claude (default, best grading) "provider": "anthropic" + Anthropic key Structured outputs + adaptive thinking
    OpenAI "provider": "openai_compatible" + OpenAI key default openai_base_url
    OpenRouter / Groq / Gemini-compat "provider": "openai_compatible" + their key set openai_base_url accordingly
    Ollama / LM Studio (local, private) "provider": "openai_compatible", no key openai_base_url: http://localhost:11434/v1 (Ollama) β€” card content never leaves your machine

    Set model to match (e.g. claude-opus-4-8, gpt-5, llama3.1).

  3. Edit the example profile to target your cards:

"profiles": [
  {
    "name": "ES Translate",
    "note_type_prefixes": ["Spanish Translate"],   // matches note type names
    "card_fields": ["Front", "Level"],             // context sent to the grader ([] = all)
    "grading_instructions": "The card shows an English sentence (field 'Front') that the learner translates into Spanish. Grade meaning, grammar and naturalness at the level in the 'Level' field."
  }
]

The input box appears only on cards matching a profile. First matching profile wins; "*" matches every note type. Grading style is tunable via system_prompt_extra (e.g. "Ignore missing accents") β€” see the config screen for the full reference.

Profiles can also override the provider/model individually β€” e.g. a free local model for easy decks, Claude for hard ones. And after any grading you can ask a follow-up question ("why is that wrong?") answered in the context of your attempt and the feedback.

Typing on a bare QWERTY? Each profile can enable an optional accent keyboard (default off), picked from preset layouts β€” currently French: clickable keycaps under the answer box, styled after Lexilogos β€” an uppercase row (Γ€ Γ‚ Γ† Γ‡ Γ‰ È Ê Γ‹ Î Ï Γ” Ε’ Γ™ Γ› Ü ΕΈ) above the matching lowercase row; a click inserts the letter at the cursor.

How it works

Card JS can't call external APIs (the webview blocks cross-origin requests), so the add-on bridges through Python:

  1. A card_will_show hook appends the input widget to matching cards.
  2. On submit, the widget calls pycmd(...) β†’ the add-on's Python handler collects your answer + the card's fields.
  3. A background thread (Anki's taskman) POSTs to your provider. On Claude, structured outputs guarantee parseable grading JSON and adaptive thinking lets the model reason harder on hard answers. On OpenAI-compatible servers the add-on negotiates capabilities automatically (strict json_schema β†’ json_object β†’ prompt-enforced JSON with tolerant parsing), so it works from GPT-5 down to a small local model. The UI never blocks.
  4. The result is pushed back with web.eval(...) and rendered. Widget state lives in a persistent JS object, so your text and feedback survive the question→answer flip.

Attempts are archived locally (user_files/history.json, capped per note); previously-attempted cards show a "last attempt" line. Nothing is written to your notes and the API key is only ever sent to Anthropic.

Uses Anki's bundled requests β€” no vendored SDK, nothing to break when Anki's launcher swaps its Python.

Development

llm_answer_grader/
β”œβ”€β”€ __init__.py   # hooks, pycmd bridge, threading
β”œβ”€β”€ grader.py     # pure: profile matching, prompt build, API call (testable outside Anki)
β”œβ”€β”€ history.py    # local attempt history
β”œβ”€β”€ webui.py      # inline HTML/CSS/JS widget
β”œβ”€β”€ config.json   # defaults
└── config.md     # config reference (shown in Anki)

To hack on it: copy llm_answer_grader/ into your Anki addons21/ directory (real copy β€” on macOS, symlinks into TCC-protected folders like Desktop fail silently) and restart Anki. grader.py and history.py import cleanly outside Anki for unit testing.

This repo also contains the original project brief, working notes (anki-llm-grader-implementation-notes.md), and the deck-generation scripts it was built alongside.

License

AGPL-3.0 β€” same license family as Anki itself (aqt, which this add-on imports, is AGPL).