Skip to main content

Module long_term

Module long_term 

Source
Expand description

SqliteLongTermLongTermMemory over a SQLite table with linear-scan cosine recall (default) or sqlite-vec k-NN MATCH (under feature sqlite-vec).

Embeddings are stored as BLOB (little-endian f32 array). On recall, all rows matching the scope are loaded, the query is embedded, cosine similarity is computed in Rust, results are sorted and the top k returned. Acceptable for under ~10k facts; when the sqlite-vec feature is enabled, a virtual shadow table is used for k-NN via the MATCH operator instead.

Structs§

SqliteLongTerm
SQLite-backed long-term semantic memory.