How does a RAG query work?
Documents are split into chunks in advance and made searchable, often as vectors (embeddings), frequently combined with classic keyword search. On a query, the system finds the most relevant chunks and inserts them into the prompt.
- Prepare and chunk documents
- Retrieve relevant chunks for the question
- Generate the answer with context
- Show sources
What determines the quality?
Mostly on retrieval: if it does not find the right passages, even the best model cannot answer correctly. Clean, current documents, sensible chunk sizes and access rights matter more than the choice of model.
A machine builder has hundreds of manuals and service documents. An internal assistant with RAG answers questions from the service team and links the manual page each answer comes from.
Imping Digital builds RAG-based internal assistants that access your documents and cite sources. We pay attention to access rights and data updates, and test the answers with real questions from daily work.
View service: Internal assistantsCommon misconceptions
RAG reduces the risk considerably but does not eliminate it. Source citations help to verify answers.
For most use cases RAG is sufficient. Training or fine-tuning changes style and behaviour rather than factual knowledge.