Retrieval-Augmented Generation (RAG) combines an information retrieval component with a language model. At query time, a retriever searches a document collection and selects passages that may answer the question. The passages are supplied as context to a generator. The generator should answer using the retrieved evidence and acknowledge when the evidence is insufficient. A RAG pipeline commonly includes document ingestion, chunking, indexing, retrieval, prompt construction, generation, and citation display.
