Anki add-on: AI-Hints

AI-Hints Anki Add-on AI-Hints is a powerful Anki add-on that uses Artificial Intelligence to generate helpful hints or multiple-choice options for your flashcards during review. It helps simulate real exam conditions by including the correct answer alongside plausible distractors even for open-ended cards. Install from anki web github: https://github.com/athulkrishna2015/AI-Hints Features 🔌 Multi-Provider AI Engine Broad Provider Support : Generate hints using OpenAI, Anthropic, Gemini, DeepSeek, Grok (xAI), Groq, OpenRouter, and custom local endpoints via Custom Providers (Ollama, LM Studio, vLLM). Automated Fallbacks : Automatically retries alternative models or providers in case of API rate limits or failures. API Key Rotation : Register and rotate multiple API keys per provider to prevent exhaustion. 🎮 Interactive MCQ & Review UI Multiple-Choice Options : Select MCQ options on the front side (via click, touch, or hotkeys 1-9 ) with color-coded results (green for correct, red for incorrect). Auto-Rating : Instantly rate cards (e.g. Good or Again ) automatically upon selecting an option. Inline Editor : Edit generated hints or options directly on the card during review (via Ctrl+Click / Cmd+Click ). Factual Error Alerts : Automatically detects and flags factual errors in your notes with custom warning highlights during study. LaTeX Math Support : Seamlessly parses and formats LaTeX math formulas on your cards. ⚡ Batch & Maintenance Tools Queued Batch Generation : Queue multiple bulk generation runs to process entire decks in the background. Smart Auto-Regeneration : Keep hints updated by automatically regenerating them if a note is edited or generated by an older addon version. Bulk Skip & Unskip : Exclude or include groups of cards for AI generation directly from Anki's card browser. Cloze Deletion Support : Fully compatible with cards containing multiple Cloze deletions on a single note. Intelligence-Ranked Fallback Hierarchy The add-on features a multi-tiered, intelligence-driven fallback system. If your primary provider fails (due to rate limits, API key exhaustion, or network issues), the system automatically attempts fallback providers and models strictly ranked by absolute intelligence and reasoning capability. Default Provider Priority Anthropic (Claude 3.7/3.5 Sonnet) OpenAI (GPT-4o) DeepSeek (Reasoner/V3) Grok (xAI) (Grok 2) Gemini (Gemini 2.0 Pro/Flash) OpenRouter (Unified Router) Hugging Face (Serverless DeepSeek-V3 / Llama 3.3) Together AI Groq SambaNova NVIDIA Mistral Cerebras Custom Providers (Ollama/LM Studio/Local Endpoints) Batch Generation & Resumption The batch generation queue is designed for heavy-duty background processing with maximum reliability: Concurrent Multi-Provider Generation : Leverages multiple AI providers concurrently to process batches significantly faster, with independent fallback queues per provider. Multiple Queued Jobs : Add another deck, browser selection, or sidebar group while a batch is already running. Pending jobs can be reordered, canceled, or cleared from the Batch tab. Granular Queue Management : View the next 5 pending cards in the queue directly in the Batch tab status. Includes individual [✖ Discard] buttons to surgically remove cards from the current batch. Deck Browser Cogwheel Option : Start batch generation for any deck directly from the deck browser's options menu. Continuous Checkpointing : The add-on saves its progress to disk ( batch_state.json ) after every single card processed. Accidental Quit Protection : If you close Anki or it crashes mid-batch, your progress is preserved. Non-Blocking Background Execution : The process runs in a dedicated background thread, allowing you to study or browse while it works. Mobile Setup & Troubleshooting The Mobile Support tab allows you to run AI-Hints on mobile devices (AnkiDroid, AnkiMobile, or AnkiWeb) with a premium, responsive layout. ⚡ Getting Started (One-Click Setup) Go to Tools -> Add-ons -> AI-Hints -> Config -> Mobile Support . Click One-Click Install: Setup All Note Types . (This inserts the safe injection tags into your templates and copies the modern _ai_hints_template.js script to your media folder automatically). Sync Anki on PC to upload the fresh template script to AnkiWeb. Sync AnkiDroid/AnkiMobile on your phone to download the new files. ⚠️ Troubleshooting AnkiDroid Cache (WebView) If you have recently updated the add-on and still see the old card style, duplicate labels (e.g., AI Hints: ), or missing buttons on AnkiDroid , it is because Android's internal WebView aggressively caches local JavaScript files. To force AnkiDroid to load the new script: Sync AnkiDroid to ensure all files are downloaded. Force-Close the App : Swipe AnkiDroid away from your phone's Recent Apps list. This terminates the persistent WebView session and clears the cache. Reopen AnkiDroid : Open the app and review a card. The clean desktop-style UI will render perfectly. [!TIP] Quick Script Force-Refresh: Sometimes after an update, in order to guarantee loading the absolute latest Javascript template, go to Tools -> Add-ons -> AI-Hints -> Config -> Mobile Support , first click Remove from All Note Types to clean the old assets, and then click One-Click Install: Setup All Note Types again to install the fresh script. Then sync your devices. 🧹 Clean Uninstallation If you want to remove AI-Hints from mobile: Go to the Mobile Support tab and click Remove from All Note Types . This will instantly strip the injection code from all templates, automatically delete the _ai_hints_template.js file from your media folder, and trigger a sync to push the cleanup to AnkiWeb in a single click! Configuration Go to Tools -> Add-ons -> AI-Hints -> Config to open the graphical configuration window. General Tab : Select your default provider, MCQ options count, database storage mode, and auto-generation rules including modified-card, version, and generation-time based regeneration. AI Providers Tab : Unified settings where each provider is grouped into a clean card layout containing its API Key (with eye visibility 👁️ toggles), active model selection, Up/Down priority sorting, dynamic fetch and test features, and checkbox toggles to completely disable fallbacks to specific providers. Custom Providers : Add any OpenAI-compatible API endpoint (e.g., Ollama, LM Studio, vLLM, AIHubMix) by clicking Add under Custom Providers. Endpoint URLs are automatically normalized (e.g., http://localhost:11434/v1 or https://aihubmix.com/v1/chat/completions ), and models can be dynamically fetched directly from the local server. Mobile Support Tab : Smart one-click installer for AnkiDroid/AnkiMobile with Emoji mode settings. Shortcuts Tab : Customize AI-Hints action keys and the modifier used on the answer side. The front side also accepts the action keys without the modifier for faster review. Advanced Tab : Customize your system prompt, tune active-review and pregeneration API request timeouts, migrate hints inside your collection, use maintenance cleanups (now with Searchable Deck Scoping ), hide visible hint boxes with the HTML to JSON tool , edit raw JSON configs, and manage the Model Cooldowns & Blacklist . Logs Tab : View, filter, search, and copy real-time addon logs. Includes a Debug logging toggle to enable verbose DEBUG -level output instantly (no restart needed), and a Clear on startup option. Scrollbar Support : Smooth scrollbars automatically wrap the Advanced, Mobile, and Batch tabs, ensuring the GUI scales perfectly to fit compact laptops and high-DPI screens. Get Your API Keys Google Gemini : aistudio.google.com Groq : console.groq.com SambaNova : cloud.sambanova.ai/apis Hugging Face : huggingface.co OpenRouter : openrouter.ai OpenAI : platform.openai.com Anthropic : console.anthropic.com ai-latex-fixer is included as a Git submodule at addon/latex_fixer/ . When cloning for development, run git submodule update --init to pull it. Development See DEVELOPMENT.md for build instructions and technical details. License MIT Mobile support (AnkiDroid and AnkiMobile) is achieved through a “Zero-Addon” architecture. This means that while the Desktop requires the Python addon to generate data, the mobile devices only need the data itself and a lightweight JavaScript renderer to display it. Changelog See changelog.md for the full history of changes and releases.

GitHub repository: athulkrishna2015/ai-hints
Repository description: AI-Hints is a powerful Anki add-on that uses Artificial Intelligence to generate helpful hints or multiple-choice options for your flashcards during review. It helps simulate real exam conditions by including the correct answer alongside plausible distractors even for open-ended cards.
Languages: Python, JavaScript