How to incorporate space repetition into Org-Roam workflow?

I want to be able to actively recall my notes and review them on a regular basis, and I haven’t figured out how to implement them in my notes.

I read Doubleloop’s blog post on his workflow, but as he stated in the improvement section,

I feel like I’m maintaining the flashcards separately from the body of my notes – it’s a bit of a duplication of effort. It’d be good to get a flow where the flashcard is just part of the note as is, and I can pull it out without duplicating it.

I tried to manipulate it a bit, and my current workflow is incorporating it directly into my notes.
Take this note, for example, about Edge Devices,

* Definition
:PROPERTIES:
:ANKI_DECK: Computer Networking
:ANKI_NOTE_TYPE: Basic
:ANKI_NOTE_ID: 1665541877624
:END:
** Front
What are Edge Devices?
** Back
- They are known as End-sytems or Hosts.
  These devices are divided into two groups: Clients and Servers.
- These are the devices that recieves the internet as a service.

*And, then here I continue with some more examples on the topic.*

And then I export it to Anki for reviewing.

My question here is this a good workflow in the long run, as all my notes would take this shape?

You could try org-fc. I haven’t used it in a while though, so I’m not sure of the details.

Maybe this can help too (org-roam-review) :

(However, I have not yet tested it. )

This can also be interesting
org-drill.el – flashcards and spaced repetition for org-mode.

Finally, I was also considering creating my own system (of flashcards in particular. I don’t know if flashcards are “good enough”, maybe I should implement a larger space repetition system that could make flashcards work).
If you’re ever interested, I can give details of the theory, but I haven’t had time to do anything yet (I prefer to look at the above solutions in detail first)

I will keep up to date with this topic, as implementing a space repetition system in org roam is almost a must: making your second brain is useless if you forget it :wink:

Don’t hesitate to give your opinion on the various solutions proposed

Ps: Maybe you’ve already seen it, but this post may help too

1 Like

I use spaced repetition in org-roam by hand. I do something like this:

* the last time I reviewed: 20
* review when time is equal to 1 mod 2 (i.e. odd)
** [[id:6422ff08-...][cholesterol reduction strategies]]
** What [[id:1b920360-...][mistake to avoid when restoring the old part of a diff]]?
...
* review when time is equal to 2 mod 4
...
* review when time is equal to 4 mod 8
...

When I start a new review session, I’ll mark the first line BLOCKED (press S-right twice), increment the value at the end of that line, and go to the appropriate collection to review based on the new value. As I go through things I’ll mark them DONE if I got them right the first time, BLOCKED if I didn’t. I then move all the DONE things to the next (half as frequent) collection, and review the BLOCKED things again. If I still get one of those wrong I’ll move it back to a more-frequent collection; otherwise I’ll just leave it where it is.

1 Like

In my case I just used org-drill instead of implementing something from scratch. To make org-drill work fine with my setup with org-roam I used the following:

(setq org-drill-scope (let ((nodes
                               (salih/get-org-roam-nodes-with-tag "drill")))
                          (delete-dups (mapcar 'car nodes))))
(defun salih/get-org-roam-nodes-with-tag (tag)
  "Get all Org Roam nodes that have the specified TAG."
  (org-roam-db-query
   [:select :distinct [nodes:file nodes:title]
            :from tags
            :left :join nodes
            :on (= tags:node-id nodes:id)
            :where (like tags:tag $s1)]
   tag))
1 Like

Thanks for the recc, I needed this but had no idea it existed. For my case – I wont connect it with org-roam –

–it should be a great little standalone workflow in default non idd notes setting–

Edit : it creates id willy nilly for all items, quite annoying.

I will probably have to craft my own system since org drill thinks its appropriate to create an id over every bit of information creating garbage everywhere.

Well, it is how it is, need to invent the wheel for my usecase.

1 Like

I agree, I would like to see a way in which the file itself could be used as a flash card.

Here is the solution I am currently using. To get rid of the flashcards while searching for Org Roam Nodes you can do:

(setq org-roam-db-node-include-function
	 (lambda ()
	   (not (member "FC" (org-get-tags)))))

Where FC is the flashcard tag. Another method, shown in this thread, is to create a custom query which hides nodes with tags which you call instead of the standard org-roam-node-find function.

1 Like

Greetings Zain,

I think there are two components to a spaced repetition system - firstly the subsystem responsible for allowing us to traverse through entries and the second subsystem is what makes it a spaced repetition system - a way of ranking entries based on how much we have been able to transform knowledge about something from simple association to the realm of intuition itself.

If all entries are ranked the same - then we are simply wasting time telling us what we already know very well as time progresses and we dutifully use such a system,

My problem with using an ID system to traverse is simply that IDs should not be exploited - they should be used scarcely because there is a computation cost as the system scales up.

So I advice taking a reverse approach for a good spaced repetition system - to take one established tool and hack it so that its traverse mechanism could be improved.

Just want to update on the state of org-drill. It has been abandoned.
There’s a new tool

Unknown if it will be abandoned in the near future too,
org-fc is still being maintained.

I have resolved to directly use anki -
org-nodes can be easily exported using GitHub - anki-editor/anki-editor: Emacs minor mode for making Anki cards with Org Mode

Best not to rely on any SRS system in org directly, anki will have persistent improvements being it a proper tool.