What Is Retrieval-Augmented Generation?

Also called RAG

Short Answer

Retrieval-augmented generation (RAG) is a method where a system first searches a knowledge source for passages relevant to a question, then gives them to a language model to write an answer based on them, often with citations. It lets a model use private or recent information and reduces hallucinations.

  • Taught in lesson 97
  • In 3 real job ads
9.6%In AI Job Ads9.6% of technical job ads at AI companies ask for RAG and Retrieval (number 20 of the skills ai2hired tracks).Read the full skill guide: what employers expect, how deep to go and interview questions

Why It Matters

RAG is the most common way companies make AI answer from their own documents, with sources people can check. It appears in many AI engineer and solutions job ads, and it is often the first real AI project an organisation builds.

How It Works

The method was described in a 2020 paper by Patrick Lewis and colleagues at Facebook AI Research. A typical pipeline splits documents into chunks, embeds them, stores them in a vector database, retrieves the best chunks for each question and adds them to the prompt.

RAG is one of the patterns AI engineer job ads ask for most, next to agents. The hard parts are chunking documents well, retrieving the right passages, handling access rights and measuring answer quality with evaluation.

Each step affects quality: how documents are cleaned and split into chunks, which embedding model is used, how retrieval combines meaning and keywords, how results are reranked, how many passages are added to the prompt and how the prompt tells the model to use them. Teams evaluate retrieval and answers separately, because a wrong answer can come from missing the right passage or from misusing it.

Retrieval-Augmented Generation in Practice

Everyday Example

An HR assistant answers "how many days of parental leave do I get?" by retrieving the current policy page and quoting it, instead of guessing.

Industry Example: Pharma

A quality assistant answers questions about manufacturing procedures by retrieving the approved, current version of each procedure and citing the section, so answers can be audited.

Where You Meet It

  • Assistants that answer from policies, manuals or records.
  • Customer support bots that cite help articles.
  • Internal search with AI-written summaries.
  • AI engineer and solutions engineer job ads.

Key Ideas Around It

Chunk
A passage of a document stored for retrieval.
Retriever
The component that finds relevant chunks.
Reranker
A model that orders retrieved chunks more precisely.
Citation
A reference from the answer to its source passage.

A Common Mix-Up

RAG does not change the model. The knowledge stays in documents and is fetched for each question, so updating a document updates answers at once.

Check YourselfA RAG assistant gives a wrong answer. What should you check first?

Whether retrieval found the right passages; if it did not, the model could not answer correctly.

Seen in Real Job Ads

Lines quoted word for word from live job postings.

  • Pfizer

    Senior Manager, LLMOps & AI Integration Engineer

    Hands‑on with GenAI/LLM ecosystems (e.g., tool/function calling, structured outputs, prompt orchestration) and RAG components (embeddings, retrievers, rerankers, vector stores).
  • Technergetics

    AI/ML Engineer III, Rome, NY

    Implementing retrieval-augmented generation pipelines that ground model outputs against authoritative data sources
  • Doctolib

    Senior AI Engineer - Patient Health Platform, Paris

    Establish strong baselines first (prompts, RAG, model selection) before reaching for custom ML.

Learn It on ai2hired

S9 · #97Why AI Hallucinates, and How RAG Reduces It

Coming in Season 9, Embeddings, RAG and Search. Every ai2hired lesson is free on YouTube.

Questions People Ask

What is the difference between RAG and fine-tuning?

RAG gives the model facts at question time from documents you can update. Fine-tuning changes the model itself, mostly its behavior.

Does RAG stop hallucinations?

It reduces them but does not remove them. Good retrieval, citations and evaluation are needed to keep answers faithful to the sources.

Learn AI From Zero to Hired

Free lessons on YouTube, each one built from what real AI job ads ask for.