Skip to main content

Crate spacedb_vector

Crate spacedb_vector 

Source
Expand description

§spacedb-vector — SpaceDB Layer 4 (the private-RAG substrate)

A native, on-node vector index co-located with the data: a query embedding goes in, and only the top-k results come out — the corpus never leaves the home. An authorized AI agent’s retrieval runs here, gated by an mID capability (retrieve), which is the concrete mechanism behind “inaccessible by default, accessible by mID-gated consent”: semantic access to results, not bulk data.

Open-core (MIT): depends only on spacedb-access (for the capability gate). S3 ships an exact flat k-NN VectorIndex; sub-linear ANN (HNSW / IVF) is a future optimization behind the same surface.

Structs§

Match
A search hit: which entry, and how similar. No vector is returned — the corpus stays on the node.
VectorIndex
An on-node embedding index.

Enums§

Metric
How similarity is measured. search always returns the highest-scoring entries, so every metric is oriented “higher = more similar”.
VectorError

Functions§

retrieve
Retrieve the top-k matches for query from index, but only if authorization allows (e.g. an agent presenting a compute-scoped capability). Denied callers get VectorError::Denied and no data.

Type Aliases§

VectorResult