Multi-hop graph retrieval pipeline.
Classifies a query by memory mode, generates retrieval tags, embeds them, scores candidate nodes via value functions, and performs multi-hop traversal to expand and re-rank results.
Summary
Functions
Retrieves relevant memory nodes from the graph for the given query.
Functions
@spec retrieve( String.t(), keyword() ) :: {:ok, Mnemosyne.Pipeline.Retrieval.Result.t(), Mnemosyne.Notifier.Trace.Recall.t()} | {:error, Mnemosyne.Errors.error()}
Retrieves relevant memory nodes from the graph for the given query.
Options:
:llm(required) - LLM module implementing the LLM behaviour:embedding(required) - Embedding module implementing the Embedding behaviour:backend(required) - Tuple of{module, state}implementing GraphBackend:value_function(required) - Map with:module(ValueFunction impl) and:params(per-type params):llm_opts- Additional LLM options (default: []):config- Config struct for per-step model overrides:max_hops- Maximum traversal hops (default: 2)