AI.Memory.Selector (fnord v0.8.82)

View Source

Evaluation engine for memory-based automatic thoughts.

Performs best-path hierarchical matching against conversation accumulated tokens. Returns formatted <think> blocks to prime the LLM with learned patterns.

Summary

Functions

Evaluates memories against conversation state and generates automatic thoughts.

Formats memory trees as an assistant message with nested <think> blocks. Returns nil if no trees to inject.

Types

tree()

@type tree() :: {AI.Memory.t(), [tree()]}

Functions

evaluate(conversation_pid)

@spec evaluate(pid()) :: [tree()]

Evaluates memories against conversation state and generates automatic thoughts.

Returns list of memory trees for formatting into nested <think> blocks.

format_as_message(trees)

@spec format_as_message([tree()]) :: AI.Util.msg() | nil

Formats memory trees as an assistant message with nested <think> blocks. Returns nil if no trees to inject.