Skip to content
anythingai.space
Retrieval & RAGintermediate11 min · 9 steps

Advanced Retrieval Patterns

Close the gap between short questions and long documents: decompose queries, embed hypothetical answers, enrich chunks, and know what each trick costs.

EMBEDDING SPACEtop-k: nothing relevant“refund annual plan?”refund policy §2annual plan termsrefund FAQpricing pageSSO guideAPI limitsQuery6 wordsEmbedder
requestdata
1 / 9
ProblemStep 1 of 9

Queries are short, documents are long

User queries are typically 3–10 words; chunks are 300–500 words. They come from different statistical distributions, so in vector space the query often lands away from the passages that answer it — a distance bias.

Compound questions make it worse: one vector has to stand for several different information needs at once.

Lesson 9 of 37 in Retrieval & RAG