Recall measures how many retrieved nearest embeddings are the true nearest neighbors. A score of 1 represents perfect recall. section 8.5
Approximate nearest neighbor indexes compare a query with only part of the dataset, trading potential accuracy for faster similarity search. An exact full-table scan should achieve recall of 1. section 8.5
Use recall to assess and tune vector indexes:
- Compare approximate results with exact nearest-neighbor results to judge how many true matches the index retrieves. section 8.5
- Increase HNSW m to create a denser graph, which can improve recall and speed lookups while increasing build time and memory use. section 8.5.2
- Increase ef_construction to consider more close candidates during index construction, producing a better index at the cost of longer builds. section 8.5.2
Movie similarity search
A full scan compares “May the force be with you” against every movie embedding and provides the recall baseline. An HNSW query returns three movies in about 1.97 milliseconds, including Star Wars: Episode VI - Return of the Jedi; increasing ef_search produces a more accurate result set that also includes Star Wars: Episode V - The Empire Strikes Back.























