Skip to main content

mnemo_graph/
extract.rs

1//! Edge extraction from natural-language memory content.
2//!
3//! Behind the `graph-extract` feature flag, [`TemporalEdge::extract`]
4//! is meant to call an LLM to pull relations out of incoming
5//! memories so the graph stays up-to-date without operator effort.
6//! v0.4.0-rc1 ships the gate but the extractor itself returns an
7//! empty `Vec` — the prompt + ICL examples are still being tuned and
8//! shipping a half-tuned extractor would land bad edges in everyone's
9//! databases.
10//!
11//! The full extractor lands in v0.4.0 final. See issue tracking when
12//! it cuts.
13
14use crate::model::TemporalEdge;
15
16impl TemporalEdge {
17    /// Extract edges from `content` given `prior_edges` for the same
18    /// subject.
19    ///
20    /// Today: stub that returns an empty `Vec`. The
21    /// `MNEMO_GRAPH_EXTRACT_MODEL` env var (default
22    /// `claude-haiku-4-5-20251001`) is documented but not yet read.
23    /// `prior_edges` is accepted in the signature so call-sites don't
24    /// have to change once the real extractor lands.
25    pub fn extract(_content: &str, _prior_edges: &[TemporalEdge]) -> Vec<TemporalEdge> {
26        // v0.4.0-rc1 stub. See module docs.
27        Vec::new()
28    }
29}