FSRS : Dynamic Desired Retention (For Sound's Fork)

AnkiWeb addon 160848019

Applies ordered Anki search queries and note-field threshold rules to give individual cards different FSRS desired-retention targets during review.
AI-generated summary; may contain mistakes.

schedulingfsrsfork-or-reupload

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-09-27
Anki versions
2.1.1~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, HTML+ERB, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-10-28 (4 days before the snapshot).
  • Test files: 12.
  • Commits in the last year: 28.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 4 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-09-27
History across monthly snapshots

Loading…

Similar addons

Anki FSRS Preset Manager

Manages FSRS presets in a single table for editing retention, steps, and version, running optimize/evaluate, bulk-applying values, and setting deck-level overrides.

schedulingfsrsdeck-management

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-08-11
Advanced FSRS Simulator

Simplifies Anki's FSRS simulator by letting users simulate a deck, its subdecks, or a preset, inspect included cards and counts, adjust settings, and compare runs on one graph.

schedulingfsrsstatisticsdeck-management

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.2~ Updated 2026-09-23

Description

Dynamic Desired Retention

Warning: this add-on is intended for an Anki fork/build that includes the dynamic desired-retention reviewer hook, such as JSchoreels/anki releases. It will not work on standard Anki builds that do not provide that hook.

Dynamic Desired Retention lets you use different FSRS desired retention targets for different cards, based on normal Anki search queries or note-field thresholds.

For example, you can keep your default deck/preset desired retention, while using a higher target for high-priority cards.

Example rules:

  • Frequency<1000 note:Japanese -> 90%
  • tag:exam -> 95%
  • note field Frequency, absolute threshold 1000 -> 90%
  • note field Frequency, relative threshold Top 10% -> 90%

Rules are ordered. The first matching rule is used. If no rule matches, Anki uses the deck/preset desired retention as usual.

Requirements

This add-on requires a recent Anki build that supports dynamic desired retention during review.

How To Use

  1. Open Tools > Dynamic Desired Retention Table.
  2. Add one row per search rule, or open the field-rule tab and select a note type plus field.
  3. For search rules, enter an Anki search query in the first column.
  4. For field rules, optionally set a Scope Filter to limit the cards checked by the rule, and an Exclusion query to skip matching cards.
  5. For field rules, choose whether values are Absolute field values or Relative top-percentiles.
  6. Use Higher DR for to decide whether lower field values or higher field values should receive the higher desired retention.
  7. Enter desired retention as a percent, such as 90.
  8. Save.

Field Rules

Field rules let you map note-field values to desired retention without writing a separate Anki search query for every threshold. For example, you can map Frequency values or Top 10% percentiles to different retention targets.

Numeric field rules support:

  • Scope Filter, an Anki search query that must match for the field rule to apply.
  • Exclusion, an Anki search query that skips matching cards.
  • Absolute thresholds, such as Frequency = 1000.
  • Relative thresholds, such as Top 10%, computed from matching notes at review time.
  • Higher DR for: Lower Field Values, useful when lower numbers are more important or more work.
  • Higher DR for: Higher Field Values, useful when higher numbers are more important.
  • Minimum Retention, used for values beyond the least-important threshold.

The threshold table also shows estimated workload. Total Workload is the projected workload from the rule, and (Current: ...) shows the current stored workload for comparison. Expected Retention summarizes the workload-weighted retention across the slices.

Notes

  • Test search queries in Anki's Browse screen first.
  • More specific rules should be placed above broader rules.
  • The add-on does not move cards into filtered decks.
  • The add-on does not retroactively reschedule cards. It affects the scheduling states computed when a matching card is reviewed.
  • Workload estimates are read-only UI estimates. Cards without FSRS stability are skipped.

Troubleshooting

If the menu item does not appear, check that the add-on is enabled and that your Anki build includes the required reviewer hook.

If a rule does not seem to apply, copy the query into Anki's Browse screen and confirm it matches the card you expect.

README

Dynamic Desired Retention

Anki add-on for overriding FSRS desired retention during review with ordered Anki search rules, note-field threshold rules and answer-button grade rules.

This add-on targets Anki builds that expose gui_hooks.reviewer_will_compute_desired_retention. Grade rules additionally require gui_hooks.reviewer_will_update_scheduling_states, as do field-rule interval bounds, so they can adjust per-button scheduling states before answer button intervals are rendered.

Configure rules in Anki's add-on config:

{
  "rules": [
    {
      "query": "Frequency<1000 note:Japanese",
      "desired_retention": 0.9
    }
  ],
  "field_rules": [
    {
      "note_type": "Japanese",
      "field": "Frequency",
      "scope_query": "deck:Japanese",
      "filter_query": "tag:excluded",
      "field_value_mode": "absolute",
      "relative_top_direction": "lower",
      "value_type": "number",
      "linear_between_thresholds": false,
      "minimum_desired_retention": 0.5,
      "minimum_retention_minimum_interval": 30,
      "minimum_retention_maximum_interval": 365,
      "thresholds": [
        {
          "value": "1000",
          "desired_retention": 0.9,
          "minimum_interval": 2,
          "maximum_interval": 30
        },
        {
          "value": "20000",
          "desired_retention": 0.6
        }
      ]
    }
  ],
  "grade_rules": []
}

The first matching rule wins. If no rule matches, Anki keeps the deck/preset desired retention.

You can edit search rules, field rules and grade rules from Tools > FSRS Dynamic Desired Retention Table. These rules are stored with the collection and sync to Kuma versions that support the same Dynamic Desired Retention rule format. To share existing local rules, sync the collection, save the rule table once, and sync again. Once present, the synced rules are authoritative for that profile. Clear the rules and sync before disabling or removing the add-on if other devices should stop using them. Anki syncs collection configuration as a snapshot, so sync each device before making offline changes; an older snapshot can otherwise remove or revert rules. In the editor, 90, 90%, and 0.90 all mean 90%. The editor displays those values as 90. When editing JSON directly, use decimal values: 0.9 means 90%. On Anki builds with RWKV-Instant integration, saving rules also invalidates RWKV's resolved targets and refreshes the current screen's due counts, so an Anki restart is not required.

Field rules can target exact text values, absolute numeric thresholds, or relative percentile thresholds such as Top 10%. Numeric field rules include a Higher DR for selector so lower field values, like low frequency, or higher field values can receive the higher desired retention. The editor keeps numeric thresholds sorted, validates desired-retention order, and always includes a Minimum Retention row for values beyond the least-important threshold. Empty numeric fields are treated as non-matches. When a numeric field contains HTML formatting, the add-on parses its visible text, so a value such as <li>17845</li> is handled as 17845. Each slice can also set optional minimum and maximum intervals in days; the add-on clamps the in-memory review scheduling states for the matched field slice. Scope Filter limits the cards a field rule can apply to, while Exclusion (Search query) skips matching cards. Conflicting threshold rows are highlighted in the editor. The threshold table also estimates each slice's workload by summing 1 / interval for matching cards with FSRS stability, using Anki's FSRS interval calculation for each card's desired retention. When Anki's batch ADR target helper reports a native Dynamic DR mapping for the active card-level preset, the estimate uses the Good-button ADR retention as the interval target. It then rounds the projected interval and caps it at the card deck's maximum interval. The editor displays workload as rounded review/day values, shows each slice's share as Workload Ratio, plus Total Workload with the same-population current workload in parentheses and workload-weighted Expected Retention below the threshold table. The current workload uses the cards' stored current intervals, which makes it easier to compare the rule scope with Anki's stats. Workload estimates run in the background; the table shows ... while they are being refreshed.

Relative percentile rules are computed from the current collection at review time and cached per field rule while the add-on is loaded, so bulk rescheduling does not repeatedly scan the same comparison population.

Grade rules are disabled by default. In the Grade Rules tab, each answer button can be left disabled, set to an absolute desired retention, or set to a relative signed percentage. Positive relative values move from the current review desired retention toward 100%; negative values move toward 0%.