A support team connects an AI assistant to its internal policy documents. After the team updates a policy, the assistant still quotes the previous version because the pipeline has not refreshed its index.
A RAG pipeline is the sequence of steps that prepares source documents for retrieval-augmented generation and uses them to answer questions: it loads and splits documents, converts chunks into embeddings, stores them in an index, retrieves relevant passages and passes those passages to a language model that writes the answer.
In CUBIG’s definition, AI-ready data is prepared for a specific AI task, with results checked, and a team can recheck it when conditions change. For a RAG pipeline, the documents are ready only when the assistant retrieves the current version that its users are allowed to see.
A RAG pipeline determines which source information an AI assistant can use when answering questions. AI teams need to maintain the pipeline as source documents change, because outdated, incomplete or incorrectly indexed content can lead to inaccurate answers even when the language model works as expected.
In “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks”, Lewis et al. (2020), published on arXiv, describe “models which combine pre-trained parametric and non-parametric memory for language generation”. The paper also explains that “the non-parametric memory is a dense vector index of Wikipedia, accessed with a pre-trained neural retriever”.
What are the stages of a RAG pipeline?
An AI or platform team usually owns the RAG pipeline and manages six main stages. The team ingests source documents, splits them into chunks, converts each chunk into an embedding, stores the embeddings in an index, retrieves relevant passages when a question arrives, and sends those passages to a language model for generation. The team also maintains the index as source documents change.
How is a RAG pipeline different from RAG?
RAG is the approach of grounding a language model’s answer in relevant text retrieved from external sources. A RAG pipeline is the set of steps a team builds, runs and maintains to make that approach work. The pipeline includes document ingestion, indexing, retrieval and re-indexing when source documents change. Enterprise RAG describes running RAG inside an organization under its own access rules, while a RAG pipeline is the set of steps that does the work in any setting.
Where do data problems enter a RAG pipeline?
A RAG pipeline can return unreliable information when the team does not control the quality, structure and access rules of its source data. Check for these problems:
- Outdated or superseded documents remain in the index.
- The retrieval step returns two versions of the same document together.
- The pipeline splits tables or long clauses across chunks, separating information that readers need together.
- The team indexes sensitive or access-restricted text for everyone.
- The team does not re-ingest documents after the source changes.
- The team has no test questions to confirm which passages the assistant retrieves.
When a team needs test cases for an assistant built on a RAG pipeline, Syntitan, CUBIG’s AI-ready data platform, can help prepare them. Syntitan’s Ready for Agent creates Tasks and Cases from work materials, and the team reviews them as candidate test questions and runs them in its own environment. Syntitan does not build, run or re-index a company’s RAG pipeline; the AI or platform team owns the retrieval stack.
Related entries: retrieval-augmented generation (RAG), enterprise RAG, embedding, data freshness and stale data. Related article: Why does the AI still give the old answer after you fix the source data?.