Retrieval-Augmented Generation (RAG) is often described as a simple pipeline:Query → Retrieve documents → Send context t...

Retrieval-Augmented Generation (RAG) is often described as a simple pipeline:Query → Retrieve documents → Send context to an LLM → Generate answerIn production, however, retrieval is rarely that simple.The retriever can return irrelevant documents. Important information may be buried in the middle of a document. A query may be too vague for semantic search. Retrieved chunks may lose their surrounding context. And sometimes the model does not need retrieval at all.The quality of a RAG system therefore depends heavily on how information is retrieved, filtered, ranked, compressed, and presented to the model.This guide covers nine techniques that address different parts of the RAG pipeline:RerankingHybrid SearchChunking StrategiesMulti-Query RetrievalParent Document RetrievalContext CompressionHyDESelf-RAGCRAG 1. RerankingRetrieve candidates. Reranking finds the best.A vector database may search through hundreds or thousands of documents and return the top 20 candidate chunks.But the first...

Read Original

Related