Mnemosyne.ValueFunction behaviour (mnemosyne v0.4.0)

Copy Markdown View Source

Behaviour for scoring memory nodes during retrieval.

Implementations combine raw cosine relevance with node metadata (recency, frequency, reward) to produce a final score.

Summary

Functions

Returns the hourly decay rate for the default 90-day recency half-life.

Callbacks

score(relevance, node, metadata, params)

@callback score(
  relevance :: float(),
  node :: struct(),
  metadata :: map() | nil,
  params :: map()
) :: float()

Functions

default_recency_lambda()

@spec default_recency_lambda() :: float()

Returns the hourly decay rate for the default 90-day recency half-life.