Implement information extraction solutions 5.1 Build retrieval and grounding pipelines

A hybrid query in Azure AI Search combines a BM25 text query with one vector query, and…

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

Question B7-027

A hybrid query in Azure AI Search combines a BM25 text query with one vector query, and the keyword results dominate the RRF-merged ranking. You want the vector results to count more and want to see each document's text and vector subscores while tuning. Which two actions should you take? (Choose two.)

Select 2 answers.

  • A Set vectorFilterMode to preFilter so vector results rank higher
  • B Give the vector query a weight greater than 1, such as 2.0 ✓ Correct answer
  • C Give the vector query a weight of 0.5 so its scores are spread across more results
  • D Read the subscores from @search.score, which always includes them
  • E Add the debug parameter (for example, debug set to vector) to the request to return subscores ✓ Correct answer

Answer: B, E

You can weight vector queries to raise or lower their importance in a hybrid query: the weight multiplies the query's RRF contribution, so 2.0 raises it and 0.5 lowers it. To see subscores, you add a debug parameter set to vector, semantic, or all. vectorFilterMode only controls where filters apply during the search.

Deep dive

How it works

A hybrid query runs a full-text query and one or more vector queries in parallel. Reciprocal Rank Fusion (RRF) merges their ranked lists into one result set. For each document, the engine gives a reciprocal rank score based on its position in each list, then sums those scores into a combined score.

Vector weighting lets you raise or lower a vector query's importance. When you add a weight, the initial score from that query is multiplied before RRF:

  • The default is 1.0, which means no weighting.
  • A weight of 0.5 reduces the score, so that result counts for less in the combined ranking.
  • A weight of 2.0 makes it a larger factor in the overall RRF score.

To see what's going on while you tune, unpack the score into subscores. Add a debug parameter to the request, set to vector, semantic (if you use semantic ranker) or all, through the Search Documents REST API or an SDK that supports it. The docs say subscores help you choose a good vector weight or minimum threshold.

The other options, and when you'd use them

  • vectorFilterMode set to preFilter: vectorFilterMode controls where filtering happens during search. preFilter applies the filter during HNSW traversal and maximizes recall, but it doesn't change how vector results are weighted.
  • A weight of 0.5: This reduces the vector query's contribution, which is the opposite of what's needed.
  • Read subscores from @search.score: @search.score holds the value used to order results; for a hybrid query that's the RRF score. Subscores come from the debug parameter.

Exam tip

"Make vectors count more" means a vector query weight above 1.0. "Show text and vector subscores" means debug set to vector or all. Filter modes affect recall and latency, not weighting.

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!