← 课程列表·AI 工作流中级2026-06-17· 229 words

What is RAG?

/听全文·· MP3 · 229

点击文中橙色高亮词查释义

RAG stands for Retrieval-Augmented Generation. It is a simple idea that solves a common problem: large language models only know what they saw during training, and they sometimes invent facts when they are unsure. RAG gives the model a way to look things up before it answers.

In a RAG system, the model does not answer a question from memory alone. First, a search step retrieves relevant passages from a , such as company documents, help articles, or recent web pages. Each passage is stored as an , a of numbers that captures its meaning. When a user asks a question, the system finds the most similar chunks and passes them to the model along with the original prompt.

The model then reads the question together with the retrieved context and writes an answer that is in those sources. Because the answer cites real text, hallucinations drop sharply and users can check the evidence themselves. This pattern is widely used in customer support, internal enterprise search, and code assistants that need fresh API references instead of outdated training data.

RAG is not magic. Its quality depends on the chunks, the embeddings, the ranking of , and the size of the . But for many teams, it remains the fastest way to make a general model feel like a true expert on private or changing data.

/生词 · 点击查释义

/课后 5 题

  1. 1. What does RAG stand for?

  2. 2. Why do we retrieve documents before answering?

  3. 3. What is an embedding?

  4. 4. How does RAG reduce hallucinations?

  5. 5. Which is NOT usually used as a RAG knowledge base?

5 / 5