Table

knowledge_chunks

The retrieval unit. Re-chunking a source replaces its rows wholesale.

id bigserial PK
source_id varchar not null
seq int not null Chunk order within the source.
content text not null
embedding "vector(1024)" pgvector; cosine index below.
index source_id, seq unique
index embedding hnsw idx_chunks_embedding