Ask a general-purpose AI model about your company’s return policy and it will answer. Fluently, confidently, and — unless you’re a household name — entirely from imagination. It has never seen your website. It’s producing the kind of sentence that usually follows the question.
For a chatbot on your own site, that’s not a quirk. It’s a liability. Retrieval-augmented generation, or RAG, is the architecture that fixes it.
In short
RAG looks the answer up in your content first, then asks the model to write from it. The model stops being a source of facts and becomes what it’s actually good at: phrasing.
The core idea: look it up first
RAG inverts the usual order. Rather than asking the model what it knows, you find the relevant passages from your own content first, hand them to the model, and ask it to answer using only those.
The model stops being a source of facts and becomes what it’s actually good at: reading a few passages and writing a clear, well-phrased answer from them. The facts come from you.
What happens when a visitor asks a question
1. Your content is chunked and indexed
Before anyone asks anything, your pages are split into passages and converted into embeddings. A full index splits at heading boundaries rather than at a fixed character count, so a chunk tends to be one coherent section rather than the tail of one topic glued to the start of another.
2. The question is matched against the index
The visitor’s question is embedded the same way, then compared against your stored passages. Keyword matching runs alongside it. The strongest handful of passages move forward.
3. Those passages become the model’s context
The retrieved text is assembled into a prompt with an instruction to answer from it. The model never sees your whole site — just the passages that matched, which is why the system stays fast and affordable regardless of how much you’ve published.
4. The answer comes back with sources
Because the system knows which passages it used, it can cite them. The visitor gets an answer and a link to the page it came from, so they can verify it themselves.
The step most implementations skip
Retrieval always returns something. Ask about a topic your site has never covered and you’ll still get your closest passages back — they’ll just be weak matches. A naive RAG system passes those to the model anyway, and the model, handed loosely related text and asked a question, will bridge the gap with invention.
So IrisAI checks the match quality before generating. If nothing clears the bar, the assistant is told explicitly not to answer from general knowledge — to say it doesn’t have those details and point the visitor to your contact page instead. No sources are attached to a reply like that, because none were used.
It’s a small piece of logic that changes the failure mode entirely: from a confident wrong answer to an honest “I don’t know.”
Why this matters more than model choice
It’s tempting to think a better model produces a better assistant. In practice, retrieval quality dominates. A modest model handed exactly the right passage will answer correctly. The most capable model available, handed the wrong passage, will produce a beautifully written wrong answer.
That’s why the work sits in chunking, matching and knowing when to decline — not in chasing whichever model launched this month.
Put it on your own content in under ten minutes.