---
doc_version: "1.0.0"
last_updated: "2026-07-14T15:00:57.718Z"
title: "How RAG Works in ChatbotIQ"
description: "Understand Retrieval-Augmented Generation (RAG): the technology that powers ChatbotIQ. Learn how your content is crawled, processed, searched, and used to generate accurate answers."
keywords: [RAG, retrieval-augmented generation, AI chatbot technology, how it works, smart search]
---

RAG (Retrieval-Augmented Generation) is the technology that makes ChatbotIQ different from a generic AI chatbot. Instead of relying on the AI model's training data (which can be outdated or wrong), RAG first searches your actual content, then uses what it finds to generate an answer.

This is why ChatbotIQ can give accurate, source-cited answers about *your* content, not generic responses.

---

## The problem RAG solves

AI language models (like GPT-5 or Claude) are trained on vast amounts of internet text. They're good at language, but they don't know about *your* specific product, documentation, or company. If you ask them a question about your help center, they'll either make something up (hallucinate) or admit they don't know.

RAG solves this by adding a search step before generation:

1. **Search** your content for relevant information.
2. **Generate** an answer using what was found.

The AI model never has to guess, it works from your actual content.

---

## How it works at a high level

### 1. Content preparation (happens when you add a source)

When you add a source, ChatbotIQ crawls your pages, processes the content, and makes it searchable. This happens automatically in the background.

### 2. Smart search (happens when a user asks a question)

When someone types a question, ChatbotIQ searches your content using multiple techniques to find the most relevant information, even when the user's wording doesn't exactly match your documentation.

### 3. Answer generation

The most relevant content is passed to the AI model along with the user's question. The model generates an answer based specifically on your content, with instructions to:

- Only use the provided content (not its training data).
- Cite which sources it used.
- Say "I don't know" if the content doesn't cover the question.

---

## Why this approach works

### Accuracy
The AI model works from your actual content, not its general training data. This dramatically reduces hallucination.

### Source citations
Because the system knows exactly which content chunks were used, it can link every answer back to the original pages. Your visitors can click through to verify.

### Always current
When you refresh a source, the knowledge base updates. The AI model doesn't need to be retrained, it always works from the latest content.

### Transparent and debuggable
The Debug panel in the Playground shows you the entire pipeline: the enhanced query, which chunks were retrieved, their relevance scores, and the final answer. If something is wrong, you can see exactly where the issue is.

---

## Why answers are accurate by default

Most of the work in a documentation chatbot happens *before* the AI model writes a word: finding the right passage. ChatbotIQ invests in that step so answers are accurate out of the box, with no tuning required. Several techniques run together on every plan:

- **Hybrid search.** ChatbotIQ combines meaning-based (semantic) search with keyword search, so it catches both a paraphrase ("how do I sign in" matching "authentication") and an exact term (a version number or an error code) in the same query.
- **Premium reranking.** After an initial set of candidates is gathered, a high-quality reranking step re-scores them for true relevance and filters out passages that merely share words with the question. This is the step most low-cost tools skip.
- **High-quality embeddings.** Your content is indexed with high-quality embeddings, which improves how reliably the right passage is found.
- **Multi-angle query understanding.** A question is considered from several angles, so retrieval is robust to differences between how users ask and how your docs are written. Short follow-ups are rewritten with conversation context, so "what about pricing?" still finds the right page.
- **Content-aware retrieval.** Technical documentation, a legal policy, and a support article should not be searched the same way. ChatbotIQ adapts retrieval to your content type.
- **Grounding and citations.** The answer is built only from retrieved content, ungrounded claims and fabricated links are blocked, and every answer links back to the exact source page.

You do not configure any of this. It is on by default, on every plan.

---

## Key concepts

**Smart search**
ChatbotIQ doesn't just match keywords, it understands meaning. If your docs say "reset your credentials" and a user asks "how to change my password," ChatbotIQ finds it.

**Relevance threshold**
Not all content is relevant enough to use. The RAG Score Threshold setting controls how confident the bot needs to be before using a piece of content. The default works well for most use cases, you can adjust it in bot settings if needed.

---

## Related

- [Improve Your Bot's Answers](/how-to/optimize-bot-answers/) - tune RAG settings for better quality
- [How Web Crawling Works](/explanation/how-crawling-works/) - the content preparation side
- [What Are Knowledge Gaps?](/explanation/what-are-knowledge-gaps/) - when RAG can't find relevant content
- [Bot Settings Reference](/reference/bot-settings/) - RAG threshold and other settings

## Sitemap

Full documentation index: [sitemap.md](/sitemap.md) and [llms.txt](/llms.txt).
