passdrill
AI & LLM Engineering · RAG & Embeddings · Card 015/022 medium

A user asks a RAG system, 'How did the pricing model change between the 2023 and 2024 versions of the product, and which change had the bigger effect on enterprise customers?' A single embedding search against this entire question, as written, tends to retrieve passages that are each only partially relevant, because the question actually bundles together more than one distinct piece of information the retriever needs to find. What technique addresses this, and how does it work?

  1. Increasing k, the number of passages retrieved, so that even though each individual retrieved passage is only partially relevant, enough of them are returned that the full answer is guaranteed to be present somewhere in the larger set
  2. Switching the embedding model to one with a larger number of dimensions, since more dimensions let a single vector capture every distinct piece of information a compound question could bundle together
  3. Applying a stricter similarity-score cutoff to the single search, which removes only the weakest partial matches and leaves just the passages that are relevant to the whole compound question
  4. Query decomposition: breaking the original compound question into separate, narrower sub-questions (such as one about the 2023-to-2024 pricing change and one about which change affected enterprise customers more), retrieving separately for each sub-question, and then combining the retrieved evidence when generating the final answer
Next card → Shuffle