Skip to content

The Understanding Graph

Alper Sarıtaş edited this page Dec 4, 2026 · 2 revisions

The understanding graph decides which passages to show you next. It is rebuilt from the ledger every time omo starts, with graphology for the graph and ts-fsrs for retention. Nothing in it is stored apart from the ledger.

Two layers

Reasoning layer

This layer follows the Discourse Graphs schema. Every node is your own words or source text:

  • queries: what you typed;
  • claims: your notes;
  • passages: evidence;
  • sources.

Links between them:

  • a passage supports or opposes a claim, from the passages of a judgement you kept;
  • a passage a note leaves out is linked to the query the note addresses;
  • the passage a note was written on informs it.

Dependency layer

The hidden links the guide proposes:

  • needs: passage A needs passage B first;
  • restates: A and B state the same idea, in another source or elsewhere in the same one.

Each link keeps every proposal of it, with the query it was proposed under and whether search_map had just shown the guide a link that agrees with it.

Agreement

Passages are kept exactly as the guide pointed at them, but agreement is counted per unit of text, so two maps that point at slightly different spans of the same text still agree.

  • Two needs links agree when their passages share at least one unit, and so do their prerequisites.
  • Two restates links agree when each passage of one shares a unit with a passage of the other, either way round.
  • A link's agreement is the number of distinct queries that it and the links agreeing with it were proposed under. A proposal under no query counts on its own. Typing the same text again in the same folder is the same query, so repeating a query adds no agreement.
  • Agreement does not pass along. A wide link agrees with every narrower link inside it, even narrower links that share no text with each other, so one wide link lends its query to each of them.
  • A link is strong when at least 2 queries agree on it (STRONG_AGREEMENT).

A link holds a passage back, and a restatement joins two passages into one step, only when the link is strong, or when it or a link agreeing with it was proposed under the current query. One stray link from an old query cannot block a passage for good.

What is shown: the fringe

The model of what you know follows Knowledge Space Theory. The passages shown are the ones not yet covered whose prerequisites are all covered. Covered means walked through (read) or understood.

  • Nothing below a covered passage is shown. A step you say you already know (a note on it, with the judgement kept) takes the steps it rests on off the way.
  • Restatements form one step. Since the passages of a step state the same idea, the step needs what any of them needs, and none of them is shown before all of that is covered. Covering any passage of a step covers the whole step. Only one passage per step is shown: one named for the query, otherwise the best-connected one.
  • Prerequisites outside the folder that are not covered hold nothing back here, and nothing is shown on the way to them.
  • Reading a passage can open the passages that needed it, with no model call.
  • Order: passages that build on more of what you covered come first. An understood prerequisite counts for more (UNDERSTOOD_LINK_WEIGHT = 2) than one only walked through (WALKED_LINK_WEIGHT = 1). A link more queries agree on counts for more, up to 3.

Circles are refused. Passages joined by restates links count as one step for this check. A link that would make a circle among steps is refused, and so is a restatement between passages that share text.

States

State is kept per unit, and a passage stands as its units do. So a wider read walks through the passages inside it.

Reading is walking. It opens the next steps for good, and it is no evidence of understanding. Only your own words are:

  • Understood: a note of yours was judged supported by a passage containing the unit, and you kept that passage. This counts as an Easy review in FSRS.
  • Faded: an understood unit stays understood while its estimated retention is at least 0.7 (FADE). Below that it has faded. It is offered again, marked ↻, until you read it again.
  • Contradicted: you kept a judgement that your note contradicts the passage. This counts as an Again review. It lasts until you read the passage again or show it in another note.
  • Restated: a passage stating the same idea is covered.
  • Walked: read, with none of the above.
  • New: none of the above.

Answers and revisions

Your answer to a judgement is recorded apart from the judgement, as a verdict naming the passages you reject. Rejected passages stay in the ledger as your contest and change nothing in the graph. A judgement counts from its first answer, and not at all before.

A later answer, given with /judgements, replaces the earlier one as if it had been given at the time of the first. The graph is rebuilt from the ledger with the final answers, so everything that follows from the judgement, such as how long an understood passage holds, is as it would have been.

Constants

All in src/graph.ts. They are provisional, as is this definition of understanding.

Constant Value Meaning
FADE 0.7 Retention below which an understood passage has faded
STRONG_AGREEMENT 2 Queries that must agree before a link counts under any query
WALKED_LINK_WEIGHT 1 Ordering weight of a walked prerequisite
UNDERSTOOD_LINK_WEIGHT 2 Ordering weight of an understood prerequisite
SUPPORTED_RATING FSRS Easy The review a kept "agrees with" passage counts as
CONTRADICTED_RATING FSRS Again The review a kept "contradicts" passage counts as

search_map

search_map gives the guide access to this graph. It searches the passages whose text is in the open folder, by their text and by the queries they were mapped for, using MiniSearch with prefix and fuzzy matching and accents ignored. Each hit gives:

  • the passage's lines and text;
  • where you stand with it, or that a passage restating it is covered;
  • what it needs and what restates it, with their agreement;
  • how many linked passages are in other folders, as a count only.

The hits go only to the guide.

Clone this wiki locally