Use when HNSW or IVF parameters are being tuned, an embedding model is swapped, or vector search recall was never measured. Builds brute-force ground truth, measures recall@k against latency and detects embedding drift for Qdrant, Weaviate, pgvector, Pinecone, Elasticsearch k-NN and Milvus.
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Engine-specific client code for vector-search-recall-tests. The core
runnable sweep uses the Qdrant client inline in SKILL.md Step 3; other
engines expose ef and search differently.
In Weaviate v4 ef is not a query argument: it is a collection
vectorIndexConfig setting, so the sweep updates the collection config
between rounds, then re-queries (per the Weaviate Python client docs):
from weaviate.classes.config import Reconfigure
from weaviate.classes.query import MetadataQuery
def set_weaviate_ef(client, ef, vector_name="default"):
client.collections.use("Docs").config.update(
vector_config=Reconfigure.Vectors.update(
name=vector_name,
vector_index_config=Reconfigure.VectorIndex.hnsw(ef=ef),
),
)
def weaviate_search(client, query_vec, k=10):
resp = client.collections.use("Docs").query.near_vector(
near_vector=query_vec, limit=k, return_metadata=MetadataQuery(distance=True)
)
return [o.uuid for o in resp.objects] # match against UUID-keyed ground truthclient.search() was removed; use
client.query_points() with SearchParams(hnsw_ef=ef) (SKILL.md
Step 3).ef APIs differ from v4; v4 moved ef
to the collection vectorIndexConfig (see above).