Skip to content
DigitalNeuron
モデル・研究

Retrieval-augmented generation (RAG)

RAG · grounding

ひとことで

Retrieval-augmented generation searches a document collection for passages relevant to a question, inserts them into the model's prompt, and asks the model to answer using them. The model's weights are unchanged; the knowledge arrives as context at request time, so updating a document updates the answer immediately.

RAG has two halves. Ahead of time, documents are split into chunks, converted to embeddings and indexed. At request time, the question is embedded, the nearest chunks are retrieved — usually combined with keyword search — and pasted into the prompt alongside instructions to answer only from them and cite sources.

The reason it dominates enterprise deployments is operational rather than technical: the knowledge lives in your document store. Change the document and the next answer changes. No retraining, no delay, and permissions can be enforced at retrieval time so a user never sees passages they are not entitled to.

The failure mode is concentrated in one place. Most RAG problems are search problems. Pure vector similarity is weak on exact identifiers — invoice numbers, product codes, person names — where keyword search excels, which is why hybrid retrieval running both and merging the rankings has become the practical default. Chunk boundaries that split a definition from its exception, missing metadata filters, and retrieving too few candidates account for most of the rest.

Evaluate retrieval separately from generation, with question-and-correct-passage pairs. Teams that only judge final answers cannot tell which half to fix. See the full explainer on how RAG works.

よくある質問

Is RAG better than fine-tuning?
They address different problems. RAG supplies facts the model does not have; fine-tuning shapes format, tone or a narrow skill. Missing knowledge is a RAG problem.
Why does a RAG system still give wrong answers?
Almost always because retrieval returned the wrong passages. Check what was actually retrieved before blaming the model — if a careful human could not have answered from those passages, the model never had a chance.

関連語

2026年8月22日 最終更新