Expand description
SQLite schema for the embeddings table and sqlite-vec ANN index.
Vectors are stored in the same SQLite database as the structural index
(.normalize/index.sqlite). The embeddings table holds one row per
embedded chunk; the raw f32 vector is stored as a BLOB alongside staleness
metadata used for query-time re-ranking.
When the sqlite-vec extension is loaded, a companion vec_embeddings
virtual table (backed by vec0) mirrors the vector data and enables
approximate nearest-neighbor search. The rowid of vec_embeddings is
kept in sync with embeddings.id so they can be JOIN-ed freely.
Constants§
- CREATE_
EMBEDDINGS_ IDX_ MODEL - CREATE_
EMBEDDINGS_ IDX_ SOURCE - CREATE_
EMBEDDINGS_ TABLE - DDL for the embeddings table.
- DROP_
EMBEDDINGS_ IDX_ MODEL - DROP_
EMBEDDINGS_ IDX_ SOURCE - DROP_
EMBEDDINGS_ TABLE - DDL statements to drop embedding tables for a full rebuild.
- DROP_
VEC_ EMBEDDINGS_ TABLE
Functions§
- create_
vec_ embeddings_ ddl - DDL for the sqlite-vec ANN virtual table.