Show HN: Anki AI Utils

(github.com)

253 points | by Ey7NFZ3P0nzAe 21 days ago

16 comments

  • piazz 20 days ago
    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

    • Ey7NFZ3P0nzAe 20 days ago
      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!

      • detente18 14 days ago
        Interesting - how do you use LiteLLM + OpenRouter here?

        I would assume they're alternatives

      • piazz 20 days ago
        Thank you :) And, sounds like great fun. Shoot me an email (in bio) or let me know how best to get in touch.
  • vunderba 20 days ago
    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

    • jbaber 19 days ago
      The site doesn't seem to exist. Any way to still share this?
  • noduerme 20 days ago
    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.

    • Ey7NFZ3P0nzAe 20 days ago
      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.

    • potro 20 days ago
      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.

      • Ey7NFZ3P0nzAe 20 days ago
        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.
  • joshdavham 20 days ago
    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.

    • all2 20 days ago
      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.

      • Ey7NFZ3P0nzAe 20 days ago
        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!
        • xdfgh1112 19 days ago
          I can tell you haven't used Anki that long. No method is 100% perfect
          • Ey7NFZ3P0nzAe 18 days ago
            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.
    • apwell23 20 days ago
      aren't multibillion dollar companies like duolingo built on spaced repetition. Not sure id call it niche.
    • yohannesk 20 days ago
      I have a question, do you know of any spaced repetition app that is free for iOS similar to AnkiDroid?
      • Ey7NFZ3P0nzAe 20 days ago
        The anki website has some UI so you could do the reviews there. A bit minimalist though.
  • bbno4 20 days ago
    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 :-)

    • Ey7NFZ3P0nzAe 20 days ago
      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 :)
  • vergessenmir 21 days ago
    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.

    • Ey7NFZ3P0nzAe 21 days ago
      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?
  • C-Loftus 19 days ago
    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.

    • Ey7NFZ3P0nzAe 19 days ago
      In that thread I first heard about anki smart notes : https://www.smart-notes.xyz/
      • C-Loftus 19 days ago
        That appears to be a subscription service. Surely there must be something using piper or another offline TTS program that works for free?
        • Ey7NFZ3P0nzAe 18 days ago
          Well maybe not that less complicated than awesometts addon
  • tsumnia 20 days ago
    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)

    • Denzel 19 days ago
      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%.

      • tsumnia 18 days ago
        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...

  • detente18 14 days ago
    Just saw `from litellm import completion` code

    Thank you for using litellm + all your issues on our repo! @Ey7NFZ3P0nzAe

    - litellm maintainer

  • bravura 20 days ago
    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?
    • Ey7NFZ3P0nzAe 20 days ago
      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.
      • kreetx 20 days ago
        That's fair advice! Creating cards is also learning, so if you generate content using LLMs instead then you'll be missing out.
        • Ey7NFZ3P0nzAe 18 days ago
          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
        • Ey7NFZ3P0nzAe 19 days ago
          I agree for most cases but not all cases.
  • jasdi 20 days ago
    Cool idea. Making me think of turning all my ChatGPT conversations into anki cards.
  • uburoi 17 days ago
    How do I actually install this? I don't know much about programming.
  • tpoacher 20 days ago
    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!

    • Ey7NFZ3P0nzAe 19 days ago
      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.
  • wheelsjr 20 days ago
    [flagged]