Anki add-on: Anki Semantic Search

Anki Semantic Search is a smart AI search tool for your Anki collection. Search your cards by meaning, not just exact words. Ask a question, find the most relevant notes, and optionally generate an AI answer grounded in your own cards with source citations. It is useful for large medical decks , lecture notes , personal knowledge bases , and any collection where normal Anki search feels too narrow. First-time setup Install the add-on from AnkiWeb , then restart Anki . Open Anki Semantic Search from the side drawer or from the add-on settings. Open Settings . In API Settings , choose an answer provider . You can use a local server such as Ollama or LM Studio , or a cloud/API provider . Choose an embedding provider for semantic search. You can use the same provider as answering when supported, or select a separate local/cloud embedding provider. In Note Types & Fields , choose the decks, note types, and fields you want the add-on to search. Go to Search & Embeddings and click Create/Update Embeddings . After embeddings finish, open the search window and ask a question . For a private local setup , run a local model server first, such as Ollama or LM Studio , then enter its local server URL in Settings. For cloud providers , enter the required API key in Settings before testing the connection or creating embeddings. What it does Search selected Anki notes with keyword search , embedding search , or hybrid retrieval . Ask natural-language questions and get AI answers grounded in your own cards . Review the matching notes behind each answer, with citations and links back into Anki . Open selected results directly in the Anki Browser . Build and refresh an embedding index for the decks, note types, and fields you choose. Keep search history so you can return to previous questions. Tune retrieval with relevance thresholds , result limits , preview length , and optional advanced ranking. Search and answer workflow Choose which decks, note types, and fields should be searchable. Configure an answer provider and an embedding provider . Create or update embeddings . Open Anki Semantic Search from the side drawer or add-on settings. Search by question or concept, review the matching notes, and generate an answer when needed. The answer panel keeps the response tied to source notes . Citation links can highlight the relevant result rows, and selected notes can be opened in the Anki Browser for review or editing. Provider support The add-on supports both local-first and cloud workflows. Local options include: Ollama LM Studio Jan LocalAI vLLM Other OpenAI-compatible local servers Cloud and API options include: OpenAI-compatible chat APIs Anthropic Claude Google Gemini OpenRouter Voyage AI embeddings OpenAI embeddings Cohere embeddings You can use the same provider for answers and embeddings when supported, or configure separate providers for each role. Retrieval features Keyword-only search for fast lexical matching. Embedding-only search for semantic matching. Hybrid RRF search to combine keyword and semantic results. Optional Cross-Encoder reranking with sentence-transformers. Optional query expansion for related terms and medical synonyms. Optional HyDE search , which generates a hypothetical answer/document before retrieval. Context-aware ranking and relevance filtering. Embedding status checks , stale index detection, and ineligible-note review. Settings and customization The settings window is split into focused areas for: API and provider configuration . Search strategy and embedding controls . Deck, note type, and field selection . Presets for searchable note scopes. Search window styling and layout preferences . Optional dependency checks and install guidance. This lets you keep irrelevant fields out of the index, reduce noise from large decks, and adapt the search UI to your workflow. Privacy Privacy depends on the providers you choose. If you use local providers for both answers and embeddings , note content can stay on your machine. If you use cloud providers , selected note text may be sent to the chosen embedding provider during indexing/search and to the chosen answer provider when generating answers. API keys are stored in the add-on configuration. Debug logs are designed to redact sensitive values. Requirements Anki 2.1.66 or newer . Restart Anki after installing or updating the add-on. At least one answer provider , local or cloud. At least one embedding provider for semantic search. Optional features may require extra Python packages: pip install sentence-transformers anthropic pyspellchecker sentence-transformers enables Cross-Encoder reranking. anthropic enables Anthropic streaming support. pyspellchecker enables spell checking in the search box. On Windows, using an external Python for Cross-Encoder reranking is recommended if PyTorch has trouble loading inside Anki. Screenshots Notes This add-on is designed for both medical and general Anki workflows . It works best after you carefully choose the decks, note types, and fields that should be searchable, then rebuild embeddings after major changes to your collection or provider settings. Developed by Zahi-Essam . Latest update - 2026-06-15 This update adds a new chat-style search workflow, local retrieval memory, image support for vision models, and improved source controls. New Ask AI and Ask Notes composer flow: ask directly, or search your Anki notes and answer with citations. Added local memory for retrieval planning. It stores compact local snippets from final answer context, keeps them non-citable, and can use hybrid memory retrieval when embeddings are available. Added image attachment support for vision-capable models. You can attach PNG, JPG, or WebP images from the search composer, and image fields can be used in Review Ask AI context. Improved Review Ask AI with follow-up chat, current-card context preview, image-aware note context, selected-answer follow-up questions, and a shortcut to search the whole collection from the review card. Refined the search window into a chat-style conversation with separate Ask AI , Ask Notes , Find Related Notes , and Clear Chat actions. Improved source handling with collapsible source notes, note previews, relevance bars, a single threshold control, and Show All Source Notes for lower-relevance retained results. Improved search history with reloadable previous searches and clearer history controls. Improved embedding/index diagnostics, stale-index detection, ineligible-note review, and safer retry behavior for changed or missing embeddings. Added more tests around answer formatting, prompts, memory runtime, image attachments, and search history display.

GitHub repository: zahiessam/anki-semantic-search
Repository description:  Semantic search over Anki notes with AI-generated answers. Find cards by meaning, not keywords.
Languages: Python