A language model knows a lot, but it doesn’t know your internal procedures, your contracts or your product documentation. RAG (Retrieval-Augmented Generation) gives it that information at answer time.

The idea in three steps

  • Index: documents are split into passages, then turned into vectors (“fingerprints” of meaning) stored in a database.
  • Retrieve: for each question, the passages closest in meaning are found.
  • Generate: the model receives the question and those passages and writes an answer based on them.

Why it’s useful

Answers rely on precise sources you can cite and check. Updating knowledge means updating documents, with no model retraining.

Common pitfalls

  • Poor chunking: passages that are too long drown the information, too short lose the context.
  • Outdated or contradictory documents, which the AI will faithfully repeat.
  • Forgetting access rights: users should only retrieve documents they are allowed to read.

Practical tip

Start small with one well-maintained corpus (an FAQ, an internal guide) and always ask the AI to cite the passages it used. If it finds nothing relevant, it should say so rather than make something up.