Retrieval-augmented generation (RAG)
Retrieval-augmented generation (RAG) is a pattern that combines a language model with a search step. The model retrieves relevant documents first, then uses them to ground its answer.
What data you can use with it
RAG works with your own documents, so what you can use depends on the data's classification and where it is stored. Check Using data with AI before you use it.
Why we are exploring it
The AI Capability and Enablement team is evaluating RAG patterns. They are not yet ready for general use.
RAG can reduce hallucination and let teams use models on internal Defra knowledge that is not in the model's training data. The trade-offs sit in retrieval quality, document permissions and evaluation.
Talk to the team before using RAG in delivery. They can advise on retrieval strategy, evaluation and access controls.
More information
For how Defra handles AI security and data, see Security and Keeping data safe.
Get help with RAG
The AI Capability and Enablement team is evaluating RAG patterns. Talk to us before using them in delivery.