MnemosyneZvex.Backend (mnemosyne_zvex v0.1.0)

Copy Markdown

Mnemosyne GraphBackend implementation backed by a per-repo Zvex collection and a DETS sidecar.

Options

  • :path - required. Directory under which zvex/ and sidecar.dets will live.
  • :dimension - required positive integer. Embedding dimension; must match the Mnemosyne embedding adapter.
  • :index - :hnsw | :ivf | :flat. Default :hnsw.

  • :metric - :cosine | :l2 | :ip. Default :cosine.

  • :index_opts - keyword list of index-specific options. Default [m: 16, ef_construction: 200].
  • :fetch_multiplier - over-fetch factor for find_candidates/6. Default 3. Larger values give the value function more candidates to rerank at the cost of NIF work.

Summary

Functions

Closes both the Zvex collection and the DETS sidecar.

Types

t()

@type t() :: %MnemosyneZvex.Backend{
  collection: Zvex.Collection.t(),
  dimension: pos_integer(),
  fetch_multiplier: pos_integer(),
  index: atom(),
  metric: atom(),
  sidecar: MnemosyneZvex.Sidecar.t()
}

Functions

close(backend)

@spec close(t()) :: :ok

Closes both the Zvex collection and the DETS sidecar.