RAG
RAG (Retrieval-Augmented Generation) is a method in which a language model first retrieves the relevant passages from a company's documents and then builds its answer on them, with a link to the source. This lets the model answer from current policies, contracts and data without fine-tuning.
Free to quote with a link to initask.com · Author: Vitalii Miniailo · Updated:Key traits
Search before answering
The query first becomes a search over the company's document base.
Answers with sources
Every statement can be checked via a link to the document.
Freshness
A new document in the base is available to the model at once, without retraining.
Access control
The model sees only the documents the user is allowed to see.
Comparison
| Criterion | RAG | Fine-tuning | Plain chat with a model |
|---|---|---|---|
| Source of knowledge | Your documents at query time | Model weights after training | The model's general knowledge |
| Updates | Add a document to the base | Retrain | Not possible |
| Citation | Yes | No | No |
| Start-up cost | Low | High | Minimal |
Source of knowledge
- RAG
- Your documents at query time
- Fine-tuning
- Model weights after training
- Plain chat with a model
- The model's general knowledge
Updates
- RAG
- Add a document to the base
- Fine-tuning
- Retrain
- Plain chat with a model
- Not possible
Citation
- RAG
- Yes
- Fine-tuning
- No
- Plain chat with a model
- No
Start-up cost
- RAG
- Low
- Fine-tuning
- High
- Plain chat with a model
- Minimal
How to implement
- Collect documents: policies, contracts, manuals, FAQs.
- Split them into passages and index them in a vector database.
- Set up retrieval that respects access rights.
- Connect the model with the rule to answer only from retrieved text, with citations.
- Test on 50-100 real questions and tune retrieval.
Common mistakes
- Loading outdated and conflicting document versions together.
- Hiding the source of the answer, so nobody trusts it.
- Chunking documents without respecting their section structure.
- Exposing restricted documents to every employee.
A company's legal AI workflow works with a register of 12 contracts and 14 lawyer scenarios: the agent finds the right contract clause and tracks deadlines 120 days ahead.
Case: legal AI workflowQuestions and answers
Which is better for business: RAG or fine-tuning?
For answers based on company documents, almost always RAG: it is cheaper, documents update instantly and every answer has a source. Fine-tuning fits style or a narrow classification task.
Can RAG run on confidential data?
Yes. The vector database and the model can be deployed on the company's own server, so documents never leave its perimeter.
How many documents does RAG need?
It works with a few dozen documents. What matters more is that they are current and free of conflicting versions.