HNSW tuning goes wrong when the target is a feeling rather than a number. The first deliverable is a golden set: a fixed list of queries, each with the true top-k neighbors computed by exhaustive search. Recall@k is then the fraction of those true neighbors the approximate index returns, which is the standard working definition used in production guidance from BigData Boutique and in the Qdrant recall tutorial.
A useful golden set for tuning has three properties:
- Size. A few hundred queries is enough to separate 0.90 from 0.95 with acceptable noise. Qdrant's tutorial suggests 20 to 50 query vectors for a quick check, which is fine for spotting gross regressions but too small to pick between two close configurations Qdrant.
- Provenance. Draw queries from real logs, support tickets or search analytics, not from the documents themselves. Queries written by the same model that produced the embeddings will flatter the index.
- Fixed ground truth. Compute exact top-k once, store the ids, and reuse them for every experiment. Regenerating ground truth mid-sweep invalidates every earlier measurement.
This mirrors how teams maintain evaluation sets for LLM applications: a fixed test set run before every meaningful change, with cases added as failures are found Langfuse. The golden set is an asset, not a script.
Choose k to match your production retrieval. If your RAG pipeline feeds ten chunks to the model, measure recall@10. If a reranker takes the top 100 and prunes to five, measure recall@100, because a miss at rank 60 still costs you a document the reranker could have promoted.



