Query Transformation

Created by Abhyuday DesaiPublished , v1Runs 9 min 20 sec
0 views

About this video

In Episode 04 of Retrieval Explained, a user asks casually why their service slows down the longer it runs. Searched as typed, the question finds one of the two notes that answer it. A language model rewrites it into a cleaner query, then into three rewordings searched separately and merged, and both return the same five passages. HyDE has the model write a short passage that could answer the question, and searches with that instead; both answers come back. Counting the labeled answers in the top five, including for a bad rewrite that guesses at a cause, shows which methods actually helped.

You'll learn how to:

  • See how a question's wording places it among the embeddings, and why an answer written in other words can land too far away
  • Rewrite a question with a language model without letting it guess at a cause
  • Expand a question into several queries, and merge their results so that each query can contribute
  • Search with a hypothetical document, and never pass it along as a source
  • Measure each method with hits at five on labeled answers

This video is for developers whose search misses answers that are in the collection. It calls a language model through any OpenAI-compatible provider; the companion repo shows how to set one up.

What changed

  1. v104 Oct 2026abhydesai9 min 20 secb9e8014

    First published version.

    0 views0 likes on this version