hwgilbert16 / scholarsome

Web-based interactive flashcard learning software
http://scholarsome.com
GNU Affero General Public License v3.0
493 stars 26 forks source link

Automatic flashcard generation #15

Open vasnt opened 1 year ago

vasnt commented 1 year ago

would love if AI feature like Automatic flashcard generation, labelling cards can be added.

hwgilbert16 commented 1 year ago

Could you elaborate on what you mean by this?

vasnt commented 1 year ago

Automatic Flashcards generation

RannyBergamotte commented 9 months ago

Ok so obviously this isn't automatic, but you can kinda achieve this already with ChatGPT or any other general LLM (Bing, or there are also open source ones you can use if you have the necessary gpu). I have only tested with ChatGPT 3.5.

  1. login to chatgpt (there's a free version!) or whatever LLM
  2. prompt: Can you give me flashcards term-definitons of the following text: [then newline and insert your text]
  3. alternatively if it's based on topic, be like can you give me flashcards summarizing this topic
  4. wait for it to spit it out, it'll probably give it in an non-ideal format for importing
  5. prompt: now instead of using numbers a bullet points, use the following format: {newline here} term: [insert term] definition: [insert definition]
  6. Copy paste into your favorite word processor (LibreOffice Writer, Google Docs, Word, etc...)
  7. Ctrl-H to find and replace. Copy the - **Term**: and replace with ;
  8. Copy - **Definition**: and replace with tab if you can, or else you might have to manually replace this.
  9. cleanup any new lines
  10. make sure there is no semicolon at the beginning, and there is one at the end
  11. copy and import into scholarsome
  12. If it fails, split it up, copying only certain sections to diagnose what is going on. Watch out for bug #75 . Refresh the page if you encounter this bug.

Hope this works for you! I imagine the quizletAI thing and all these other services that use AI to generate flashcards really actually just use ChatGPT behind the curtain, with some prompts and maybe some small scripts.