Question 19
Domain 2: Implement Knowledge Mining and Azure AI Search SolutionsYour vector search implementation returns irrelevant results. The embedding model used for indexing was `text-embedding-ada-002` (1536 dimensions). The query embedding is generated using `text-embedding-3-large` (3072 dimensions). What is the problem and fix?
Correct answer: B
Explanation
Vector search requires the index and query to use embeddings from the same model and dimension. Here, `text-embedding-ada-002` produces 1536-dimensional vectors while `text-embedding-3-large` produces 3072-dimensional vectors, so the representations are incompatible and similarity scores become meaningless. The fix is to use the same embedding model for both indexing and querying.
Why each option is right or wrong
A. Query embeddings should be generated in real-time; fix the caching layer
B. Embeddings from different models are not compatible; use the same embedding model for both indexing and querying
`text-embedding-ada-002` outputs 1536-dimensional vectors, while `text-embedding-3-large` outputs 3072-dimensional vectors, so the index and query are built in different vector spaces and cannot be compared meaningfully. In practice, vector databases require the stored corpus and incoming query to use the same embedding model and dimensionality; otherwise nearest-neighbor similarity is invalid and retrieval quality collapses.
C. Increase k_nearest_neighbors from 5 to 50
D. Switch to semantic search instead of vector search