Retrieval-augmented generation (RAG)
Retrieval-augmented generation is the pattern of answering a question by first retrieving relevant documents and then asking a model to answer using them. It grounds an answer in a source you control, which is how a model stays current with your data without being retrained on it.
What it means
A RAG flow has four moves: embed the question, search the index, assemble the retrieved passages into a prompt, and generate the answer. Quality is usually lost in the middle two — a retriever that returns the wrong passages produces a confident answer built on the wrong evidence, which reads exactly like a correct one.
How SwiftTune uses it
RAG is composed rather than configured: an embedding block, a Vectorize query, and a generation block wired together on the canvas. Because each step is a block with typed ports, retrieval can be measured on its own — which is what makes drift visible before the answers get worse.