aiAI TOOLS.
THE ARTIFICIAL INTELLIGENCE DIRECTORY
Top 100
◎  EN
Build a workflow

RAG: answers based on retrieved documents

Understand the steps of research and generation, and the necessary controls on sources.

Search before replying

RAG means generation increased by recovery of information. A route finds relevant passages and then provides them to a model to prepare an answer. This mechanism must be distinguished from a training on your corpus. The documents can be updated without this update alone being a fine tuning of the model.

The result depends on two steps: finding the right passages and interpreting them correctly. An answer may be wrong because the search has missed a source or because the generation missummarized a relevant passage.

Build a limited test

Choose some validated documents and questions that you know the answers to. Keep the titles, versions and identifiers of the passages. Define a rule for non-corporeal matters: reporting an absence is preferable to inventing an enterprise policy.

Check references and fees

Check the recovered passages before judging the final text. A quote may exist without exactly supporting the statement. Test permissions: The search must respect the public authorized to read each document. Plan to remove or update old sources.

A RAG workflow does not eliminate all errors. Measure absences, incorrect references and out-of-scope responses. Keep examples of control after each change in corpus, model or search method.

Questions before you start

Are RAG and fine tuning identical?

No. RAG provides information found during the workflow; fine tuning adapts a model according to a training process.

Is a quote answer always accurate?

Open the passage and check that it supports the statement in the right context.

What if no document answers?

Report absence and plan for clarification or transfer rather than an invented response.

Continue learning

Official documentation