Show HN: Anki AI Utils
github.comHi hn, I am nearly at the end of medical school so it is time I publish and "advertise" my open source scripts/apps for anki! Here's the pitch:
Anki AI Utils is a suite of AI-powered tools designed to automatically improve cards you find challenging. Whether you're studying medicine, languages, or any complex subject, these tools can:
- Explain difficult concepts with clear, ChatGPT-generated explanations.
- Illustrate key ideas using Dall-E or Stable Diffusion-generated images.
- Create mnemonics tailored to your memory style, including support for the Major System.
- Reformulate poorly worded cards for clarity and better retention.
Key Features:
- Adaptive Learning: Uses semantic similarity to match cards with relevant examples.
- Personalized Memory Hooks: Builds on your existing mnemonics for stronger recall.
- Automation Ready: Run scripts daily to enhance cards you struggled with.
- Universal Compatibility: Works across all Anki clients (Windows, Mac, Linux, Android, iOS).
Example:
For a flashcard about febrile seizures, Anki AI Utils can:
- Generate a Dall-E illustration of a toddler holding a teacup next to a fireplace.
- Create mnemonics like "A child stumbles near the fire, dances symmetrically, has one strike, and fewer than three fires."
- Provide an explanation of why febrile seizures occur and their diagnostic criteria.
Call for Contributors:
This project is battle-tested but needs help to become a polished Anki addon. If you’re a developer or enthusiast, join us to make these tools more accessible!
Check out my other projects on GitHub: [Anki AI Utils](https://github.com/thiswillbeyourgithub)
Transform your Anki experience with AI—because learning should be smarter, not harder.
Wow, so feature rich, congrats on the release. Love that the mnemonic generation takes into account your existing memory anchors (didn’t know that term).
I’ve actually been working on a similar-ish Anki Plugin for about 6 months - it can autogenerate any field via LLM in bulk, as well as images and TTS. I’m not explicitly targeting the med school use case as much yours (I use it for language learning), and it’s more GUI centric/geared towards non-technical Anki users who don’t want to fiddle with a bunch of different API keys etc. Was planning to launch HN soon but you beat me to the punch!
https://ankiweb.net/shared/info/1531888719 https://smart-notes.xyz
Thank you very much for the kind word but I have to return the complement. The app you are making is very feature-rich too, seems easy to use and affordable too!
By the way, the new LLM by deepseek called deepseek-chat is very good and actually on par with Claude Sonnet 3.5, so you might want to give it a try. Openrouter and litellm help a lot.
Also, my projects are not actually aimed at medical learners, I just happened to be one! I went to create lengths to make it adaptable to any learning scenario and types of learners, etc :).
Looking at your project, it seems like there is definitely an opportunity for merging efforts. If I get that right, you are not implementing few shot learning and a few other features like mnemonics and anchors and major system. Do you think there is a possibility that wa can talk reusing some of my code and features? I can think of ways to make few shot learning painless UI wise.
I semi-secretly made that release to -> make my scripts more well known to -> help me find people who could help me make it available for laymen (I am painfully aware that my features are currently only available for nerds although I made great efforts to document the whole thing and make good code!).
Honestly, it looks like your awesome project might be the opportunity I was looking for! Are you interested in trying to make it so good that we can scale and even make (on average) better doctors :D!? Please get in touch!
Thank you :) And, sounds like great fun. Shoot me an email (in bio) or let me know how best to get in touch.
Very cool. I actually built an app called "Johnny Mnemonic" around 5 years ago that generated a mnemonic sentence given a list of terms when I was studying for my EMT license. At the time I leveraged a simple n-gram markov model that I based off the publicly available Cornell Movie script database.
I added a couple settings like word order(matters: colors of the rainbow, doesn't matter: bones of the skull), anagram vs sentence, etc. At the time the biggest difficulty wasn't necessarily generating a coherent sentence - it was ensuring the "novelty" of the mnemonic. The less surprising the less likely its going to stick.
Fun little tidbit - by adding a "NSFW" flag - I made it so the markov chain would heavily weight racy/saucy/lewd words. End result, VERY VERY evocative mnemonics that were completely and utterly incapable of being shared.
Demo:
https://www.youtube.com/watch?v=MTAbVBOMdbk
The site doesn't seem to exist. Any way to still share this?
Cool!
Slightly off topic, but maybe an idea for someone to pursue... I figured out at a very early age that I could not memorize text in a script, or poetry, or even flashcards very well. But because I started playing piano at a very early age, somehow I could remember song lyrics verbatim. I could probably sing/recite at least 200 CDs worth of lyrics end to end.
When I wanted to learn Spanish, memorizing songs was way more helpful than anything else I tried. Even if I didn't understand all the words at first, suddenly a lyrical phrase would become clear when I heard some of the words in a conversation.
I'm not sure AI is up to writing really memorable songs yet. But for those of us with some kind of synesthesia, there could be lots of associations that aid memory, like colors, melodies or rhythms.
Interesting! Well I think you could use my reformulator script for that if you give it examples like "home<>casa" => [lyric about casas]. There is a decent chance it works out of the box!
If you try it tell us how it goes in a github issue!
Also I recommend giving openrouter a try to quickly test multiple LLMs. In my experience claude sonnet 3.5 is slightly worse in super strict rule adherence but way better at wordplays than 4o so might be better for lyrics. I'm suspecting a secret sauce in their secret tokenizer. Don't know yet about deepseek-chat, which I'm migrating all my apps too.
Combination of gpt-4o for lyrics, and Suno for songs made me and my wife pretty much stopped listening to regular music over last year.
I will try your idea to create a bunch of Spanish and Italian (2 foreign languages I was/is learning) songs to see how well it would work for me.
I recommend giving openrouter a try to quickly test multiple LLMs. In my experience claude sonnet 3.5 is slightly worse in super strict rule adherence but way better at wordplays than 4o so might be better for lyrics. I'm suspecting a secret sauce in their secret tokenizer. Don't know yet about deepseek-chat, which I'm migrating all my apps too.
Sort of off topic, but I'm always really surprised how well posts about spaced repetition and Anki do on HN.
I've been in the spaced repetition community for years and we honestly feel extremely niche and small even amongst eachother. It's cool to see that the community might be larger than I thought.
I think the idea of "optimized learning" is largely appealing to us nerds and electron technicians.
Personally, I would love to have the dopamine response that allows for repetitive tasks to become appealing. Unfortunately, I've roasted my attention with social media and YouTube.
For me it grew from a horror of the state I find myself when I just *can't* recall something I have known or have to lookup things several times. Then the satisfaction of never having that feeling again!
I can tell you haven't used Anki that long. No method is 100% perfect
I'll let you decide if using anki for 6+ years and with a 1000+ days streak counts at "long". In any case it doesn't have to 100% solve my memory issues to satisfy the goal I described above, it just has to solve it enough to make me feel okay with some forgetting because I literaly couldn't try harder.
aren't multibillion dollar companies like duolingo built on spaced repetition. Not sure id call it niche.
Can you name another multibillion dollar company, aside from Duolingo that uses it?
teachmint ?
Never heard of em.
and?
I have a question, do you know of any spaced repetition app that is free for iOS similar to AnkiDroid?
The anki website has some UI so you could do the reviews there. A bit minimalist though.
Respectfully over on r/anki I see maybe 3 or 4 posts a day about a new AI tool for Anki. It seems like people are reinventing the wheel more than they are using Anki...
However, this seems different.
> automatically improve cards you find challenging.
This is not something I have seen any of those other tools attempt to do yet :-)
Thanks a lot for the kind words! I do admit I partly developed a habit of procrastinating sometimes to code but I saw it as part of my curriculum too. And the fact that it was open source means there is a chance it will help make better doctors overall even if it could make me a bit worse! I just need help packaging it into an addon or something more user friendly :)
I used to be heavy Anki user but I find the setup a little hard to follow.
The image generation can do with ComfyUI integration. This will expand the illustration options beyond stable diffusion. It will also allow for more options within stable diffusion too.
I might raise a PR tomorrow if I have the time.
Thanks for the interest! The idea was to fully automate the process of creating illustrations for the failed cards of the day based on few shot prompting alone, indeed adding support for external API like ComfyUI would help a lot. Maybe especially for finetunes on specific subjets I guess?
Perhaps off topic, not sure, but does anyone have opinions on the easiest way to add bilingual TTS? I am trying to make Mandarin language learning decks and having free automated TTS would be very useful.
I've tried out AwesomeTTS but found it a bit too complicated. Just want to automatically add TTS with one click ideally.
In that thread I first heard about anki smart notes : https://www.smart-notes.xyz/
That appears to be a subscription service. Surely there must be something using piper or another offline TTS program that works for free?
Well maybe not that less complicated than awesometts addon
I don't personally use Anki, not for any major reasons or ideological disagreements but mostly out of a "I do something else to learn" methodology. I've always liked the concept of Anki, flashcard learning, and needing some method of "deliberate practice" to reinforce the knowledge. My profile and even my dissertation explored the idea of practice through Chi and Wylie's ICAP framework [1] (interactive, constructive, active, or passive respectfully).
I'm particular to the worked example [2] as a tool similar to mnemonics. A real world or toy example is presented, and the worked example breaks down the step by step actions needed in order to "do a thing". For example to represent the "running total" use case of variables or a Singleton design pattern, not only is it beneficial to know what these techniques "are" but also some examples on how the are "used". This is where ICAP proposes there are different modes the learner can engage when while learning the material. In this light, I think of flashcard memorization as a passive learning activity. This doesn't make it lesser, only suggesting there are more engaging activities you may need to engage in in order to really know a concept.
I think having an LLM generate the various ICAP modes would provide additional learning opportunities for those that do use Anki. In a similar vein to creating a flashcard, an LLM-driven Anki card set could include an "Activity Creation" tool to determine which type of learning activity to generate. Computer Science for example uses several types of learning activities like Parson Problems, Self-Explanation, Output Prediction, and simple Typing Exercises to help convey concepts, each with their own benefits for targeted learning at a different ICAP modality [3]. The activity creation tool in turn would select the appropriate modality, the respective activity, and generate a 'card' based on that activity.
[1] https://files.eric.ed.gov/fulltext/EJ1044018.pdf
[2] https://en.wikipedia.org/wiki/Worked-example_effect
[3] https://files.eric.ed.gov/fulltext/ED615631.pdf (Yes, this one is mine because of course I'd shoehorn my thoughts on practice here)
Thanks for linking me to the ICAP framework. ICAP and your “I do something else to learn” methodology generally jives with the same thing I happened upon by chance after spending a lot of time trying to “learn how to learn” the best way; landing upon SRS and Anki specifically, as a tool; and then finding a much better process+system. Given how deeply involved you are in the space, I assume you’ve heard of, and possibly follow, some of Justin Sung’s videos and techniques?
He provides some scientific foundation behind the recommendations he makes, specifically his recommendations around mind mapping and _how_ to do it properly. His process puts mind mapping firmly in the _Interactive_ mode. The results are truly unbelievable.
So much so that after investing 20 hours to mind map a book for myself 7 months ago, I can recall practically all the information I mind mapped without rehearsal.
Mind mapping makes up probably 70% of my learning these days, then I have a long-form written system for the other 29%, and sometimes, when I have a little isolated fact that doesn’t fit in either system, I turn to SRS for memorization of the last 1%.
I'm not familiar with Sung's videos, but after a quick perusal of his thumbnails I have some knowledge in the various cognitive science concepts he covers (Cognitive Load Theory, Flow, Mindmaps). I didn't really dig into educational theory until I started teaching Computer Science. I wanted to figure out how to better instruct my students after learning about the high drop/fail rates in intro courses. Once I started to experiment in my classes, I decided I should get the PhD for a pay bump.
Once I was in the program, I focused most of my research in reading where cog sci was being used for stem, but also for general practice research. I've been training martial arts for almost 20 years now, so some of the research was me double dipping in how to improve teaching CS and punching people.
Honestly, I still argue that martial arts' spaced repetition was a bigger influence on how I view learning. I need to allocate 2-4 hours 1-4 times a week for practice (4 when I was younger and could get away with it; correct due to immediate feedback from my partners; and have a giant support network of people through the US that make me vested in not only the art but their lives as well. I acknowledge the benefits of meta-cognitive methods like planning and self-reflection, but they feel more theory than application.
Planning is great until you're a novice that doesn't know what to train next. Then you are just a struggling student receiving negative reinforcement, which only amplifies any imposter syndrome you already have. Sadly, there isn't much research exploring how physical athletes learn beyond simple spaced repetition. There's some work in interleaved practice [1] but since physical training is more or less "solved", progress is slow.
Instead, I focus on the various lower-level practice activities so students can acquire subskills without needing to program. Then, I heavily encourage building a 'sense of community' [2], not through group projects (which have their own faults) but rather in simply "giving a damn" about your classmates' progress.
At the end of the day, I think learning is heavily a "time on task" [3] problem and determining how to structure lower-level practice and toy examples that encourage you to keep with it and break Carol Dweck's "fixed mindset" [4].
I'd like to dig deeper into how to properly structure practice across ICAP modalities, but the sheer number of variables and even determining how many activities should be in a practice is too complex of a problem without a very large sample size.
[1] https://effectiviology.com/interleaving/
[2] https://en.wikipedia.org/wiki/Sense_of_community
[3] https://www.thisiscalmer.com/blog/time-on-task-learning-stra...
[4] https://learning-theories.com/mindset-theory-fixed-vs-growth...
If I am not an Anki user (yet) but want to create an Anki deck from scratch for something I am trying to learn, should I use your tool?
I am tempted to say yes, but in truthfulness it really depends on a lot of details. If we are just talking about the card creation phase, then I recommend other tools I made, especially voice 2 Anki (posted on hn at the same time but has not taken off for some reason :) ) If we are talking about the actual learning and memorizing phase, then yes, I think those tools are valuable. But that being said, I'm also sure there are some edge cases of very specifically weird things that do not end up very suited for those tools.
That's fair advice! Creating cards is also learning, so if you generate content using LLMs instead then you'll be missing out.
To expand my previous comment: writing a lesson to memorize always helps, but that does not mean that having some printouts from university won't be a good tradeoff or manually copying a whole book instead of renting it etc
I agree for most cases but not all cases.
Cool idea. Making me think of turning all my ChatGPT conversations into anki cards.
Congrats on your repo. Good to see more fellow medics using github!
One comment I would make on your approach to putting anki to work for you with medicine, is that it seems to rely on a 'factoids' approach, as opposed to a 'systematic' approach. This may not be the case with your learning more generally, but this is how your anki seems to be structured, so I am keen to make this observation: the problem with a 'factoids-based learning' approach, which unfortunately is all too common in medical education, is that it can backfire spectacularly, especially in an unstructured learning environment such as medicine, where physicians at ward rounds are much more likely to want to show you 'cool stuff' and 'exotic diagnoses', when they should be creating an appreciation and understanding of the 'boring' stuff first in a systematised manner instead. So you then go to final exams knowing all about cool factoids like what "moya moya" disease is and how it means 'puff of smoke' in japanese, but don't really quite know why right-sided heart failure doesn't quite immediately also cause left-sided heart failure directly and vice-versa, even though in theory it's all a connected tube. (totally random example, I assure you :p ).
One thing I did ages ago when I was finishing my own medical school journey (which I later deviated from to become an academic / biomedical engineer), was to formulate a "systematic approach to medicine". Everybody always talks of needing to have a 'system' when you first learn medicine, but nobody ever seems to quite know what this system is. So you need to figure out your own.
In the context of your systematic learning via Anki, I would advise you to formulate your cards such that they address all specific aspects of such a systematic approach. One way to do this via Anki specifically, would be to create a note type that goes through all aspects of that system per condition, but then generates specific cards for the parts that you want to extract as individual cards (rather than treating the whole note type as one mega-card you need to learn). This would not only help you be systematic in your learning, but it would also help you flag where gaps exist in your knowledge-base, since it would become immediately obvious at the point of creating your note, where areas of the 'system' are unaddressed.
Here is the link to my old 'system'. Feel free to take inspiration from it. (though if you do end up copying / using it formally in some capacity, I would appreciate an acknowledgement... :) )
https://sr.ht/~tpapastylianou/systematic-approach-to-medicin...
(or https://github.com/tpapastylianou/SystematicApproachToMedici... if you prefer github).
Hope it helps with your preparation! Good luck with the finals!
This is incredibly invaluable advice. I thank you very much for it and for the kind words. I came to some of the same conclusions myself and had some ideas on how to adress them but your github will definitely help. Thank you very much.
[flagged]