From fa7e2c6c1903d7578a425eb0e9e4621e55f9f14a Mon Sep 17 00:00:00 2001 From: Pringled Date: Sun, 1 Dec 2024 15:21:41 +0100 Subject: [PATCH] Updated docs --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index debc964..772e024 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,10 @@ vectors = np.random.rand(len(items), 128) # Initialize the Vicinity instance (using the basic backend and cosine metric) vicinity = Vicinity.from_vectors_and_items(vectors=vectors, items=items, backend_type=Backend.BASIC, metric=Metric.COSINE) -# Query for nearest neighbors with a top-k search +# Create a query vector query_vector = np.random.rand(128) + +# Query for nearest neighbors with a top-k search results = vicinity.query([query_vector], k=3) # Query for nearest neighbors with a threshold search