Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/core-concepts/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Those projections include:

This is why search and recall can continue to work even when one retrieval path is incomplete. The storage layer keeps multiple doors into the same memory.

Semantic vectors are guarded by the retrieval text hash. The durable vector blob lives in `target_embeddings`; sqlite-vec rows are tracked separately in `vector_index_entries` and copied into `.konteks/vectors.sqlite`. The acceleration index can be rebuilt from the durable blob. If text changes, old vectors are not used for scoring; changed extraction repairs missing or stale vectors for changed sections and modules without rebuilding unrelated retrieval documents. Corpus-wide embedding generation and sqlite-vec repair run during `konteks init` and `konteks rebuild`, keeping automatic warm-up and save refresh work proportional to changed files.
Semantic vectors are guarded by the retrieval text hash. The durable vector blob lives in `target_embeddings`; sqlite-vec rows are tracked separately in `vector_index_entries` and copied into `.konteks/vectors.sqlite`. The acceleration index can be rebuilt from the durable blob. If text changes, old vectors are not used for scoring; changed extraction repairs missing or stale vectors for changed sections and modules without rebuilding unrelated retrieval documents. Corpus-wide embedding generation and sqlite-vec repair run during `konteks init` and `konteks rebuild`, keeping automatic warm-up and save refresh work proportional to changed files. Search validates sqlite-vec against durable vectors once per process. When native rows are incomplete, search returns the bounded durable-vector fallback immediately and repairs sqlite-vec in the background.

Konteks loads sqlite-vec through Bun's SQLite extension loader when available, then falls back to Node's built-in SQLite loader. If neither runtime can load the native extension, indexing reports an actionable dependency error.

Expand Down
2 changes: 1 addition & 1 deletion docs/development/database-erd.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ but their table options live in `src/database/utils/migrations`.
`memory_fts`.

Semantic retrieval uses sqlite-vec virtual tables created per embedding dimension through Bun's SQLite extension loader when available, then falls back to Node's built-in SQLite extension loader. `target_embeddings` remains the
durable compatibility store and exact fallback source. `vector_index_entries` records which durable embeddings have been copied into the sqlite-vec virtual table for their dimension in `.konteks/vectors.sqlite`. A vector is considered fresh only when its model-aware `embedding_hash` matches the current retrieval text and the sqlite-vec metadata matches the same hash; stale or missing index rows are repaired from stored blobs during embedding generation and ignored during retrieval.
durable compatibility store and exact fallback source. `vector_index_entries` records which durable embeddings have been copied into the sqlite-vec virtual table for their dimension in `.konteks/vectors.sqlite`. A vector is considered fresh only when its model-aware `embedding_hash` matches the current retrieval text and the sqlite-vec metadata matches the same hash. Search validates native rows against durable vectors once per process; unhealthy groups use bounded exact fallback immediately and schedule best-effort background repair from stored blobs.

## Main Domains

Expand Down
Loading