From 4754cac40c0ee37d8e03abbc3f9e39823f9a0684 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 31 Mar 2023 18:47:15 -0700 Subject: [PATCH] Updated readme [skip ci] --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 019b9be..b2378d5 100644 --- a/README.md +++ b/README.md @@ -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.