Question 90
Developers created an HNSW index with vector_l2_ops, but production queries rank by cosine distance and rarely use the index. What is the MOST appropriate next step?
Explanation
Correct Answer
The vector index operator class must match the distance operation used by the query planner.
Incorrect Answers
Use the pgvector cosine-distance operator for the intended metric: use the pgvector cosine-distance operator for the intended metric: distance operators encode different geometry and can produce different ranking results; Create a suitable vector_cosine_ops index matching the query operator.
Select a supported dimensionality strategy or different retrieval design within index limits: storing a vector and building an approximate index are subject to different dimension constraints.
Tune hnsw.ef_search and compare latency and recall with an exact baseline: exploring more HNSW candidates usually improves recall at the expense of query work.





Developing AI Cloud Solutions on Azure (AI-200) Practice Tests