Skip to content

Commit a0f72c8

Browse files
authored
Update API.md
1 parent abdd43f commit a0f72c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

API.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ SELECT vector_backend();
5656

5757
**Description:**
5858
Initializes the vector extension for a given table and column. This is **mandatory** before performing any vector search or quantization.
59+
`vector_init` must be called in every database connection that needs to perform vector operations.
5960

6061
**Parameters:**
6162

@@ -97,7 +98,7 @@ SELECT vector_init('documents', 'embedding', 'dimension=384,type=FLOAT32,distanc
9798
Performs quantization on the specified table and column. This precomputes internal data structures to support fast approximate nearest neighbor (ANN) search.
9899
Read more about quantization [here](https://github.com/sqliteai/sqlite-vector/blob/main/QUANTIZATION.md).
99100

100-
If a quantization already exists for the specified table and column, it is replaced. If it was previously loaded into memory using `vector_quantize_preload`, the data is automatically reloaded.
101+
If a quantization already exists for the specified table and column, it is replaced. If it was previously loaded into memory using `vector_quantize_preload`, the data is automatically reloaded. `vector_quantize` should be called once after data insertion. If called multiple times, the previous quantized data is replaced. The resulting quantization is shared across all database connections, so they do not need to call it again.
101102

102103
**Parameters:**
103104

@@ -139,8 +140,7 @@ SELECT vector_quantize_memory('documents', 'embedding');
139140

140141
**Description:**
141142
Loads the quantized representation for the specified table and column into memory. Should be used at startup to ensure optimal query performance.
142-
143-
Execute it after `vector_quantize()` to reflect changes.
143+
`vector_quantize_preload` should be called once after `vector_quantize`. The preloaded data is also shared across all database connections, so they do not need to call it again.
144144

145145
**Example:**
146146

0 commit comments

Comments
 (0)