RAG, short for Retrieval Augmented Generation, is a method in which a language model does not form its answer solely from its training knowledge. Before the answer, a search runs over a defined collection, its results are passed to the model as context, and the model formulates its answer from them. The approach was described in 2020 by Lewis and others. Since then, it has been the standard architecture for systems that are meant to answer based on their own document collection.
Where the term comes from and where it is standardised
RAG is one of the few terms in this glossary with a clear primary source. It comes from the paper Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks by Lewis and others, published in 2020 at the NeurIPS conference. It describes an architecture in which a retrieval component and a generative model are trained together.
In today's usage, the term is broader. It usually means any processing pipeline that runs a search before answering and passes the results as context to a language model, without retraining anything for this purpose. This shift matters when two providers both talk about RAG: they may mean very different things, and no authority determines who may use the term.
What the process looks like
A RAG pipeline breaks down into a preparatory part and a part that runs with every question.
- Preparation: The collection is made accessible, split into passages and indexed. This step happens once per document, not once per question.
- Search step: The passages matching the question are searched for, as a rule semantically, often combined with a lexical search.
- Permission check: Only passages that the person asking may see remain. This check belongs in the search step, not after it.
- Context building: The remaining passages are passed to the language model together with the question. The space for this is limited, so not all results make it in.
- Generation and citation: The model formulates the answer from these passages and indicates which source passages it comes from.
Why this architecture is needed at all
A language model only knows what appeared in its training. A company's internal contracts, minutes and calculations are not part of that, and retraining a model would be neither economical nor possible to keep up to date for a collection that changes daily. RAG solves this by not moving the collection into the model, but passing it to the model at runtime. The second advantage often carries more weight in practice: because the answer is built from specific source passages, it can be traced back.
What variants exist
- Simple pipeline: one search, one model call. Fast and easy to follow, weak on questions that need to combine several sources.
- Hybrid search with reranking: lexical and semantic results are merged and sorted by an additional model before they go into the context. More effort, considerably more stable selection.
- Multi-step methods: The system asks its own intermediate questions, searches several times and assembles the answer from the results. Stronger on complex questions, but slower and harder to verify.
- No search: If the entire relevant text fits into the model's context, it can be passed in full. This makes sense for individual documents and is not an option for a company's collection.
Cutting across all variants is the question of where the search step and where generation take place. Both can be handled by different providers in different jurisdictions, see Data residency and Data sovereignty.
How Nexoria implements this
The Document search uses RAG with hybrid retrieval and automatically names the source for every answer. The search step works on the index that is created when files are stored in Nexoria Drive , the permission layer lies with the Workspaces, and the answer is formulated in the assistant Nex.
In short: Document search searches the contents of a workspace semantically and cites the source for every result.
The two steps run in different places. For the search step: Document embeddings and semantic search run on servers in Germany, using models that Nexoria operates there itself. For generation: Answer generation by Nex uses Mistral AI.
What happens to the content that is handed over: In Nexoria’s verified Mistral organisation, the use of new API interactions for model training is disabled (account checked on 26 September 2026). This comes with the following limitation: This setting applies to new interactions processed there. For your own optionally connected AI accounts, the settings of the respective account apply.
What matters with RAG
- The answer is at best as good as the search step. If it finds the wrong passages, the model formulates the wrong answer fluently and with a source reference.
- A source reference is not proof. It indicates which passage the answer was formed from, not that the passage was understood correctly. For statements with legal or financial significance, reading the source remains mandatory.
- The context is limited. Questions that are meant to summarise across a very large number of documents hit a hard limit at this point.
- Nexoria has no published measurement of answer quality with a disclosed methodology. That is why no percentage is given here.
Sources
As of
- Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems 33 (NeurIPS 2020), preprint on arXiv, 2020. https://arxiv.org/abs/2005.11401 Retrieved on .The first description of the RAG method. It introduces the name and describes the combination of a retrieval step with a generative model.
- Karpukhin et al., Dense Passage Retrieval for Open-Domain Question Answering. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), preprint on arXiv, 2020. https://arxiv.org/abs/2004.04906 Retrieved on .Describes search using learned vector representations of text passages, the method behind semantic search. The paper explicitly compares it with BM25 full-text search.
As of

