Implement information extraction solutions 5.1 Build retrieval and grounding pipelines

You send one Azure AI Search request that contains both a keyword query and a vector…

Study guide skill: Configure semantic search, hybrid search, and vector search for grounding

Question B1-044

You send one Azure AI Search request that contains both a keyword query and a vector query. How does the service produce the result set?

Select one answer.

  • A It runs the full-text and vector queries in parallel and merges the results into one ranked list with Reciprocal Rank Fusion (RRF) ✓ Correct answer
  • B It returns two separate result sets that the client must merge
  • C It sorts all results by the document's last-modified date
  • D It runs the vector query only and uses the keyword query as a filter

Answer: A

Hybrid search runs full-text search (BM25) and vector search in parallel, then merges them using Reciprocal Rank Fusion, so the response has one unified result set. Adding an explicit sort order would override the relevance ranking.

Deep dive

How it works

Hybrid search is a single query request that includes both the search parameter (full text) and vectorQueries. Azure AI Search runs the full-text and vector queries in parallel and merges their results with Reciprocal Rank Fusion (RRF), so the response contains just one result set.

The two halves use different ranking functions: BM25 for text, and HNSW or exhaustive KNN (eKNN) for vectors. RRF merges the lists by looking at where each document ranks in each one. For each result list, every document gets a reciprocal rank score of 1/(rank + k), where k is a small constant such as 60. That constant is completely separate from the k that sets the number of nearest neighbors. The engine then adds up each document's scores across the lists and ranks by the total, so documents near the top of several lists rise.

Why combine them? Vector search finds conceptually similar content even when no keywords match. Keyword search brings precision, and it does better on product codes, specialized jargon, dates and people's names, where exact matches matter. If you add semantic ranker, the docs suggest setting k to 50 to give it the most inputs.

The other options, and when you'd use them

  • Two separate result sets for the client to merge: The service does the merge with RRF and returns one unified result set.
  • Sort by last-modified date: Explicit sort orders override relevance-ranked results. If you want similarity and BM25 relevance, leave sorting out of the query. Use $orderby only when users really want a custom order, such as newest first.
  • Vector query only, with the keyword query as a filter: Filters are a separate parameter that targets distinct data structures in the index. In a hybrid query, the keyword query is a full ranked search in its own right.

Exam tip

"One request with search and vectorQueries" means parallel execution and one RRF-merged result list. The RRF k (about 60) isn't the vector k (the number of neighbors).

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Information extraction questions · AI-103 study guide

Thanks for your feedback!