Updated readme [skip ci]

This commit is contained in:
Andrew Kane
2023-03-31 18:47:15 -07:00
parent 8432efb7d8
commit 4754cac40c

View File

@@ -78,12 +78,18 @@ SELECT * FROM items WHERE embedding <-> '[3,1,2]' < 5;
Note: Combine with `ORDER BY` and `LIMIT` to use an index
Get the average of vectors
Average vectors
```sql
SELECT AVG(embedding) FROM items;
```
Average groups of vectors
```sql
SELECT category_id, AVG(embedding) FROM items GROUP BY category_id;
```
## Indexing
Speed up queries with an approximate index. Add an index for each distance function you want to use.