Skip to content
Quantoros

What is Retrieval-Augmented Generation (RAG), and why is it useful compared to relying purely on an LLM's parametric…

NLPLevel: FoundationNatural language processing

What is Retrieval-Augmented Generation (RAG), and why is it useful compared to relying purely on an LLM's parametric knowledge?

Hints
  • Break the query into candidate retrieval, context selection and generation.
  • How would you locate the stage that lost a fact without using only one end-to-end metric?

Answer

RAG retrieves relevant external material for a query and conditions a generator on that material. It separates an updatable document collection from the model's fixed parameters, making targeted knowledge updates possible without retraining the generator. Retrieved passages can also provide explicit evidence links.

The comparison is not 'an LLM cannot cite anything': a model can reproduce valid known citations or use documents supplied directly in its prompt. RAG adds a retrieval mechanism for choosing evidence from a collection. Its usefulness depends on retrieval quality, source freshness and faithful generation. Measure whether answers are supported by the retrieved evidence, not merely whether they contain plausible-looking citations.

Source and licence: Ishan Dutta — Awesome Data Science Interview Q&A · MIT · answer: Quantoros editorial

Related questions