← Back to concept explainers

Concept Fable

Retrieval-Augmented Generation

Conclusion first:Retrieval-Augmented Generation (RAG) retrieves relevant materials from external knowledge bases, document repositories, databases, or search systems before generating an answer, then gives these materials to the model as context for answer generation. What it solves is not making the model “remember more,” but enabling the model to use the latest, private, and citable knowledge when answering. The key to RAG is not just connecting a vector store, but what to retrieve, how much to recall, whether it is relevant, how to cite, and whether the answer is faithful to the evidence.

Retrieval-Augmented Generation (RAG) · Knowledge access

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

The archive learns to put the files on the table first

There was an old archive in the city. When the curator was young, he had an excellent memory: almost whenever anyone asked when a certain street had been repaired, whether a certain shop owed taxes, or which ship had docked last month, he could answer. Everyone thought he was like a living ledger.

Later the city grew. New districts kept appearing, caravans came and went every day, and the regulations changed once a season. The curator could still recount many old stories, but he began to make mistakes on details: he said last year's bridge tax was this year's, and attached the name of an old dock's ship to the new dock.

Someone advised him to memorize more. So the curator memorized new files every night. In the short term it seemed useful, but in the second month new regulations arrived, and in the third month new land deeds. The more he memorized, the more there was, and the more chaotic it became.

Another approach was to have the scribe cram all the files into his study. The result was worse. Every time someone asked a question, the curator was faced with a room full of paper scrolls, could not find the key points, and answered even more slowly.

One day, a young copyist changed his approach. When someone came to ask, "Can the shops on East Bridge put up awnings this year?" he no longer hauled out the entire archive, nor let the curator answer from memory. Instead, he first went to find three types of files: this year's market regulations, the East Bridge land deeds, and the most recent urban management ruling.

He spread these pages on the curator's desk and said: look at these first, then answer. After reading, the curator said: the north side of East Bridge cannot be built on; the south side can have temporary structures, but market days must be avoided. The questioner pressed: why? The curator no longer said 'I remember,' but pointed it out: here is this year's new regulation, here is the property boundary, and here is the handling result of a similar case last month.

Later the archive set a new rule: any question that was changeable, very detailed, or involved responsibility could not rely only on the old knowledge in the curator's head. First find the relevant evidence, put it on the table, then have the curator organize it into a comprehensible passage. The scribes also left footnotes for each answer. If an answer came from an old regulation, mark it as old; if new files conflicted with each other, state the conflict first rather than forcing a smooth-sounding sentence. Evidence not only helped answer, it also constrained the answer. The archive also ruled that when no evidence could be found, the answer was that no evidence could be found. A blank is more honest than fabrication, and it also gives direction for later supplementation.

Only then did city people realize that the director's greatest skill was not remembering all the paper, but connecting scattered evidence into a credible answer once the right paper was placed before him.

Reveal

This story is about: retrieval-augmented generation

Retrieval-Augmented Generation (RAG) retrieves relevant materials from external knowledge bases, document repositories, databases, or search systems before generating an answer, then gives these materials to the model as context for answer generation. What it solves is not making the model “remember more,” but enabling the model to use the latest, private, and citable knowledge when answering. The key to RAG is not just connecting a vector store, but what to retrieve, how much to recall, whether it is relevant, how to cite, and whether the answer is faithful to the evidence.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • The old curator: a large language model is good at organizing language and reasoning, but its memory may be outdated or incomplete
  • Constantly changing regulations, deeds, and rulings: enterprise private knowledge, real-time data, and frequently updated business rules
  • Make the curator memorize more: relying only on retraining or fine-tuning to add knowledge is costly and slow to update
  • Stuffing all the files into the study: feeding all irrelevant context to the model, causing noise, cost, and latency to rise
  • The young transcriber first looks for three types of files: the retriever finds relevant documents or data passages based on the question
  • Lay a few pages of evidence on the table: provide retrieval results to the model as context
  • The curator organizes it into an understandable answer: the generative model produces a natural language answer based on evidence
  • Showing the source to whoever asks: citations, traceability, and grounding—using evidence to constrain answers
  • You cannot rely only on old knowledge: the core value of RAG is connecting model capabilities with external knowledge, not stuffing knowledge into model parameters all at once

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

memorycontext engineeringvector databaseknowledge basegrounding
京ICP备2026014272号