← All posts
AI explained · Part 5 of 8 · 3 min read

RAG explained: how AI answers from your own knowledge

Retrieval-augmented generation sounds technical. The idea is an open-book exam: find the right pages first, then answer. Here is how it works, and what it takes to do it well.

Abdul Azize HossenCEO & Chief Consultant, HFC · November 2026

Most businesses that try an AI assistant hit the same wall in the first week. It writes beautifully, but it does not know your products, your policies or your customers. The fix is rarely a bigger model. It is giving the model the right material at the right moment, and the standard way to do that is called RAG.

Step one: turning meaning into numbers

To find the right material, a system first needs a way to compare meaning, not just words. An embedding does exactly that. It turns a piece of text into a long list of numbers that captures what it means. Picture every sentence placed on a huge map, where sentences with similar meanings sit close together.

A map of meaning
When will my order arrive? What is the expected delivery date? Where is my package? How do I reset my password? I can’t log in
Questions about delivery cluster together even when they share no words. The password questions mean something else, so they land far away.

Step two: searching by meaning

Traditional keyword search looks for matching words. Type “when is my package getting here” and it hunts for “package” and “getting here”. Semantic search uses embeddings to look for matching meaning, so it also finds the help article titled “Estimated delivery times” and the policy section on “shipment arrival”.

To do this quickly across thousands or millions of passages, the embeddings are stored in a vector database (or vector index), built to answer one question fast: which stored information is closest in meaning to what the user is asking?

Step three: retrieve, then generate

RAG stands for retrieval-augmented generation. Instead of asking the model to answer from memory, the system first retrieves the most relevant passages from your own content, adds them to the model’s context, and only then asks it to answer.

The RAG flow
  1. 1Question“What is our refund window?”
  2. 2Search by meaningEmbeddings and a vector database
  3. 3RetrieveThe most relevant passages
  4. 4Add to contextPassages go on the model’s desk
  5. 5AnswerWritten from your content
Steps 2 to 4 are retrieval. Step 5 is generation, handled by the LLM.

Think of it as the difference between a closed-book and an open-book exam. Training gives the model its general ability. RAG hands it the right pages at the moment it needs them.

Training gives the model its skills. RAG gives it your knowledge, just in time.

What it does well

  • Up to date without retraining. Update a document and the next answer reflects it.
  • Grounded and checkable. A good RAG system can show which passage it used, so people can verify the answer.
  • Your knowledge stays yours. Content is fetched when needed rather than built into a model.

Where it goes wrong

  • Garbage in, garbage out. If your knowledge base holds three versions of the refund policy, the AI may quote the wrong one.
  • Retrieval can miss. If the right passage is not found, the model may answer anyway. It must be told to say “I don’t know”.
  • Access rights matter. Retrieval has to respect who may see what, or an assistant could surface a payroll file to the wrong person.

Where RAG pays off

  • Customer support: replies drafted from your own help articles and past tickets.
  • HR and internal policy: staff get straight answers from the current handbook, not last year’s PDF.
  • Sales: product questions answered from up-to-date spec sheets and price lists.
  • Projects and delivery: years of project notes and documentation, searchable by what they mean.

In our experience, what decides whether RAG succeeds is less technical than people expect. It is editorial: choosing the sources, retiring outdated versions and giving every document a clear owner. A well-kept knowledge base, in Odoo Knowledge or a tidy document library, does more for answer quality than any model upgrade.

Next in the series, part 6: From answering to doing: tools, agents and MCP

Try Odoo freeSee AI in Odoo for yourself. Start your free trial.Start free trial ↗︎

Thinking about AI in your business?

Start with a complimentary consultation. You leave with a clear plan and a quote.

Keep reading