Pin vector-memory stack: vetta BGE-M3+reranker embedder, sqlite-vec store, per-session one-way opt-in

This commit is contained in:
adm committed 2026-11-25 18:27:47 +01:00
1 parent b851fa3f34
commit f8853597d5
1 file changed
+18 -9
+18 -9
View File
@@ -269,20 +269,29 @@ notes, uploaded documents and learned facts, then retrieve by similarity to inje
the relevant context into a turn, plus explicit *remember* / *semantic search* the relevant context into a turn, plus explicit *remember* / *semantic search*
tools. Recommended shape, preserving the single-binary property: an embedded tools. Recommended shape, preserving the single-binary property: an embedded
vector index inside the existing SQLite store (**sqlite-vec**) behind the `Store` vector index inside the existing SQLite store (**sqlite-vec**) behind the `Store`
trait, fed by a small local multilingual embedding model run in-process. The trait, fed by the team's `vetta-embedder` (BGE-M3 + reranker) over HTTP. The
planned ArangoDB backend already offers vector indexes, so the same seam carries planned ArangoDB backend already offers vector indexes, so the same seam carries
over when the store is swapped. over when the store is swapped.
Agreed architecture (design ratified, implementation deferred): Agreed architecture (design ratified, implementation deferred):
- **One general engine + one general embedder.** A single multilingual, - **Embedder = the team's `vetta-embedder` (BGE-M3 + BGE-Reranker-v2-m3).** Already
domain-agnostic embedding model and a single vector engine must decently cover deployed on every Linux host (default `127.0.0.1:8091`, repo `vetta-semantics`):
any need; specialization lives *above* the index, never in a second engine or multilingual, dense + learned-sparse + ColBERT + a cross-encoder reranker in one
model. Concretely: **sqlite-vec** (vector KNN) + **FTS5** (lexical) + metadata C++/ggml process (Vulkan with CPU fallback, no Python/ONNX). strata-ctl reaches
columns inside the existing SQLite store behind the `Store` trait — hybrid it over HTTP exactly like it reaches the engine (config host/port), so no new
retrieval plus metadata filtering is what makes a general engine decent across model is bundled. Verified live: `/embed` (1024-d) and `/rerank` discriminate
domains. The planned ArangoDB backend (documents + vectors + search) carries the correctly.
same seam over on swap. - **Store = sqlite-vec inside the existing SQLite, behind `Store`.** Dense KNN +
metadata columns; retrieval pipeline = dense recall → `/rerank` cross-encoder
precision → inject. Learned-sparse (`/sparse`) is available later for exact-term
boost. Keeps memory co-located and transactional with sessions (single binary);
the team's Qdrant (used by Iris) and the planned ArangoDB remain alternate
backends behind the same seam, not the default.
- **Per-session, one-way opt-in.** Vector memory is off by default (casual chat
needs none); enabling it for a session is **irreversible** (a latch like
`name_locked`), because indexed memories must not be silently orphaned by a
later disable. Enabling requires the embedder to be reachable.
- **Layered directives.** An always-on **common core** (knowledge lifecycle: - **Layered directives.** An always-on **common core** (knowledge lifecycle:
recall when relevant, record durable lessons, verify against current evidence, recall when relevant, record durable lessons, verify against current evidence,
one topic per memory, prune duplicates) plus **enable-able domain guideline one topic per memory, prune duplicates) plus **enable-able domain guideline