MnemosyneEcto.Adapter.SQLite (mnemosyne_ecto v0.2.0)

Copy Markdown View Source

SQLite + sqlite-vec implementation of MnemosyneEcto.Adapter.

Stores embeddings as float32 blobs in a regular table (float[N] column), performs KNN via sqlite-vec's vec_distance_cosine/2 with an ORDER BY brute-force scan (which honours the tenant/repo/type SQL filters), and tracks the migrated schema version in a dedicated <prefix>schema_version table.

The sqlite-vec extension must be loaded on every connection via the repo's :load_extensions option, e.g.

config :my_app, MyApp.Repo,
  adapter: Ecto.Adapters.SQLite3,
  load_extensions: [SqliteVec.path()]