Establish the corpus contract
Upsert stable record IDs, content, metadata, and caller-produced embeddings. The first non-empty embedding fixes the database dimension; empty or drifting vectors fail before mutation.
How it works
Rank a flat corpus, follow application-supplied relationships, or let relationships choose the records that retrieval ranks. Each path runs locally through its own API. For retrieval, the preview targets 1K to fewer than 50K chunks with exact search; HNSW and other ANN indexes are outside that scope.
Fast, private retrieval for edge AI
Privacy is a property of the whole pipeline you assemble, so the boundary is worth stating exactly instead of asserting it loudly.
Execution model
Wrappers adapt language types and concurrency. The Rust core owns identity, validation, candidate selection, filtering, ranking, traces, and native persistence.
Upsert stable record IDs, content, metadata, and caller-produced embeddings. The first non-empty embedding fixes the database dimension; empty or drifting vectors fail before mutation.
Graph traversal and strict metadata filters choose eligible records. A graph selection is a generation-bound candidate set, never an extra score signal.
Embedding-only queries use exact vector similarity, text-only queries use BM25, and hybrid queries fuse both with alpha. Ranking traces retain the contribution of each stage.
Native saves publish checksummed snapshot generations atomically. Browser databases remain in memory inside their dedicated Worker. Every wrapper exposes an explicit close lifecycle.
Embedding generation is deliberately separate. Use a first-party local embedding package, supply vectors from your own model, or call a remote provider with the understanding that the remote step is outside the local privacy boundary.
Query paths
Graph search does not require vectors. Use it alone, or use graph selection as the candidate scope for the exact ranker.
Vector, BM25, hybrid
Search a flat corpus with an embedding, query text, or both. Query-time alpha selects embedding-only, BM25-only, or hybrid ranking.
RetrievalDatabase
.search(text?, embedding?, alpha?)Read the deep dive →Traversal and projection
Follow relationships, match graph fields, and project stable candidates. No retrieval configuration, vector index, or embeddings.
GraphDatabase
.graph.query(...)Read the deep dive →Relationships to ranked hits
Let the graph choose the candidate neighborhood, then run exact vector, BM25, or hybrid ranking only inside that scope.
GraphRetrievalDatabase
.graph.query(...) → .retrieval.search(within:)Read the deep dive →