Practical overview
When it fits
Use Vicinity when a Python application needs vector-neighbor search or when you want to compare supported backends through a consistent interface.
Who it is for
- Python developers adding nearest-neighbor retrieval over vector embeddings.
- Teams comparing indexing backends or distance metrics for a retrieval component.
- Researchers measuring backend queries-per-second and recall.
Documented uses
- Search for the closest stored items using a query vector, top-k count or threshold.
- Use one interface to experiment with multiple vector-search backends.
- Evaluate a backend by measuring queries per second and recall.
- Save and reload vector stores locally or through Hugging Face Hub methods.
Requirements & limits
The project is an open-source Python library under the MIT license, installed with pip.
- The basic backend uses exact search; HNSW, USEARCH, Annoy, PyNNDescent, FAISS and Voyager provide approximate-search options.
- Approximate-neighbor backends do not support dynamic deletion; rebuilding the index is required to delete items.
- Insertion is supported by FAISS, HNSW and USEARCH; the basic backend supports insertion and deletion.
- Backends and integrations can be installed selectively, while the
allextra installs all of them.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Vicinity and query a vector store
Set up the base Python package and retrieve nearest items for a query vector.
Before you start
- Python environment with pip
- Item values and their corresponding vector representations
Steps
Install the base package with the command below.
pip install vicinityImport
Vicinity,BackendandMetricfromvicinity, and provide vectors alongside their items.Create a store with
Vicinity.from_vectors_and_items, choosing a backend and metric.Call
querywith a query vector andkfor a top-k result, or usequery_thresholdwith a threshold.
Expected outcome
A Vicinity store returns nearest items for a single query vector; its query interface also accepts lists of query vectors.
Guide limitations
- This guide uses the basic backend from the documented quickstart; other backends may require specific installation extras.
- The example requires the caller to provide vector representations; the quickstart does not generate embeddings.
Measure nearest-neighbor backend performance
Evaluate a Vicinity instance using query throughput and recall.
Before you start
- Vicinity installed with the selected backend
- A full vector collection and query vectors
Steps
Create a Vicinity instance using the vectors and selected backend.
Choose query vectors from the collection, as in the documented example using the first 1,000 vectors.
Call
vicinity.evaluatewithfull_vectorsandquery_vectors.Read the returned queries-per-second and recall values.
Expected outcome
The evaluation call returns throughput and recall measurements for the selected Vicinity instance.
Guide limitations
- The README describes the metrics but does not prescribe a benchmark protocol or establish which backend will suit a particular workload.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- MinishLab/vicinity · Official homepage title · retained in its source language

