Retrieval-Augmented Generation

A model may need information that was absent or out of date when it was trained. Retrieval supplies relevant source material as context, giving the model evidence it can use when answering a question.

10 sections · 10 questions · 3 coding challenges

1 / 10

Could the Model Consult a Reference Before Answering?

BOTIE

A language model's weights are an awkward place to keep every fact we might later need. Updating a document does not automatically update the model, and an answer drawn only from its parameters may provide no clear reference for checking where the information came from.

Lewis and colleagues' 2020 RAG work combined a pretrained generator with retrieval from an external document index. It addressed knowledge-intensive tasks by allowing the model to condition generation on retrieved passages as well as its learned parameters.

A retriever first finds material related to the request. The generator then uses that material as part of its context when producing an answer. The documents can be maintained separately from the model, but this creates several things to check: whether retrieval found the right material, whether the material supports the answer, and whether the generator used it faithfully. Access to a reference does not guarantee a correct reading of it.

Sources for this history