Customisable queue and repetition algorithm

Feature request - how difficult would it be to incorporate custom metadata into Anki’s scheduling algorithms? E.g. cards with the ‘high priority’ tag automatically have shorter repetition intervals, and appear earlier in the review queue than cards with the ‘medium priority’ tag.

I understand that the repetition intervals can be manually adjusted, and that cards can be sorted into filtered decks with custom intervals. However, this is less intuitive and more fragile than a simple per-card metadata approach. Additionally, this method can’t be used to group cards by more than a single category, as they are effectively folders - see, for instance, Karl Voit’s Logical Disjunct Categories Don’t Work. Tags solve this, but without changing the underlying algorithms, they are simply organisational rather than pedagogical.

Furthermore, I am unaware of any add-ons that can modify the ordering of cards within a review session, while still respecting relearning intervals - if you have 1000 cards due within your main deck, but only a short amount of time spare, you want to be able to cover as many of the high value concepts as quickly as possible.

If anyone can tell me whether this is feasible, and if so point me to the relevant sections within the codebase, I would be happy to write or commission the relevant updates.

1 Like

Hello, with Filtered Deck this is quite possible.

For example, if you want to make a deck that will take all things with a certain tag and higher DR than yours (let say 95% instead of 90%), you can do a Filtered Deck with this query : preset:Vocabulary tag:prio_high prop:r<0.95

To make this approach as simple, your normal decks should have a DR lower than this DR. The opposite is more complex

3 Likes

Hello, thank you for your response.

I appreciate that one way to achieve this is exactly as you suggest, but I find that the filtered deck approach doesn’t scale well when more categories are considered. If, for instance, you have low/medium/high priority filters, core/medium/advanced content filters, short/medium/long problem filters, and subject A/B/C filters, you end up with 27 filtered decks. This quickly becomes unmanageable to review.

Additionally, I haven’t found a way to modify the ordering of the queue within a review session, using filtered decks or otherwise.

If the algorithms could incorporate this metadata, then everything could simply stay in a single deck, with the optimal card automatically presented for review.

I’d say you’d have as much Filtered Deck as different DR you have.

In my case I do have 90, 95 and 97, so three filtered deck while my main is at 85%. For example, I could have a (tag:HIGH OR tag:MEDIUM) (subject:A subject:B) prop:r<.95and that would already cover 4 cases. You can always check if those 3 dimensions of tags really require those 27 different DR.

The order of the queue is based on the main deck used to trigger the reviews, so if all Filtered and Main decks are under the same root, it will apply the root one if you start the session with that one. For example, I do Ascending R. So in the end you just review one deck, the root one.

I use this plugin to rebuild the 3-4 decks in one click. It support also exclusions for [Extra] decks. https://ankiweb.net/shared/info/104518886

3 Likes

Thank you very much, that’s very insightful. I will implement your helpful suggestions, and install the plugin.

Out of interest, do you know if there are any ways to modify the queue itself at a fully granular level? E.g. imagine you give an LLM a textbook chapter, and get it to produce a set of 1000 flashcards, each with an assigned priority value between 0.00 and 1.00. You would like to review the cards in descending priority order - firstly all cards with p=1.00, then p=0.99 etc. This reflects the natural spiral of learning, from key concepts to abstreuse topics. Is this possible to implement as an add-on?

The sorting algorithm itself would be very simple, I just haven’t had any success getting it to respect relearning intervals.

From what I see that wouldn’t be very easy to do, the only hope for a quick solution is to use “Order Created” in Review Sort Order with hopefuly that creation order that you would be able to set to the order you’d like to see those cards …

Apart from that, I don’t see much others options apart from enough Filtered Deck to group at least the things in a rough "bulk order” that it make sense for you.

I see some addon seems to play with review order, I think you could maybe try to implement an addon doing that if that feature is not implemented in anki itself : https://ankiweb.net/shared/info/252796796

Ordering how card are gathered (to be in the learn queue) is easy, but altering review queue is IMO more complex, and since there is also the Fuzz that make sure that the order is always a bit mixed, I’m not sure how @dae would evaluate this feature request

2 Likes

This has two parts:

1. Giving high priority cards shorter intervals.

This can be achieved easily by adding a new review sort order that orders cards according to a specific tag or a custom data property. Using a data property is better for performance reasons.

2. Making high priority cards appear earlier in the review queue.

One possible way to implement this with FSRS (assuming you use that) is to support per-card desired retention. Custom data properties come in handy here too.

Overall, I think a basic implementation of this will require minimal code changes to Anki.

2 Likes