Skip to main content
Retrieval-Augmented Generation

RAG Chatbot for
Website and Docs

A RAG chatbot for websites, docs, and help centers that retrieves from your own content instead of guessing. ChattyBox answers questions like "What is included in the Pro plan?" from your published pages and cites the source — with no custom retrieval infrastructure to build or host.

What is RAG?

RAG combines a language model with retrieved source content. Before generating a response, the chatbot searches your published pages for passages that match the question.

If your priority is answer trust, pair this retrieval workflow with a grounded AI chatbot that avoids invented answers through source constraints and fallback behavior.

1

Retrieve

When a visitor asks a question, ChattyBox searches indexed website, docs, help, and CMS content for relevant passages.

2

Augment

Those source passages are added as context so the model has something specific to answer from.

3

Generate

The model generates a concise answer and can include source links so visitors can verify the details.

Tested editorial evidence

The complete RAG path from source to cited answer

A dependable RAG system is a chain of testable stages, not a single model call. This reference architecture separates content preparation, retrieval, generation, and citation so teams can locate failures and re-index changed sources without retraining a model.

Technical author
ChattyBox Engineering
Technical reviewer
ChattyBox Documentation Review
Last updated
Information checked
July 9, 2026

Reviewed when retrieval behavior changes and at least every six months.

RAG architecture diagram showing crawl, parse, chunk, embed, retrieve, prompt, answer, and citation stages
Sources are prepared into an index, relevant passages are retrieved for each question, and the answer retains links to supporting pages.
Each stage has a distinct output and quality check; testing only final prose hides indexing and retrieval defects.
StageWhat happensControl to verify
1. CrawlDiscover allowed pages from URLs and sitemaps.Expected URLs are present; excluded and private paths are absent.
2. ParseExtract headings, prose, lists, tables, code, canonical URLs, and metadata.Navigation noise is removed without dropping commands or version labels.
3. ChunkSplit content into coherent passages that retain page and section identity.Each passage is understandable alone and preserves prerequisites.
4. EmbedRepresent passages for semantic matching and store source metadata.Every vector maps to one current, permitted source passage.
5. RetrieveRank a small set of passages against the visitor question.Recall@k tests put the gold passage in the context set.
6. PromptCombine the question, passages, source metadata, and fallback rules.Instructions cannot expand permissions or override fallback rules.
7. AnswerGenerate only supported details or decline when evidence is insufficient.Material claims follow the context; missing evidence triggers fallback.
8. CiteAttach the canonical page and section supporting the response.Links resolve, match the version, and directly support the claim.

Freshness and re-indexing

A source change is not retrievable until the affected page is crawled, parsed, chunked, and embedded again. Track source revisions, replace stale chunks instead of appending duplicates, remove deleted pages, and test representative answers after re-indexing. Set recrawl frequency from the shortest acceptable stale-answer window for pricing, policy, and versioned docs.

Public and private source boundaries

Public pages can share one crawl scope. Private, tenant, employee, or account data needs authenticated ingestion and retrieval-time authorization before passages enter the prompt. Robots rules are not access control. Never index secrets, and test that unauthorized identities cannot retrieve titles, snippets, URLs, or answer details from restricted sources.

Evaluate retrieval before judging the writing

Use a versioned question set with known source passages, expected claims, and expected fallback cases. Run it after source, chunking, embedding, ranking, or prompt changes, then inspect failures by stage.

SignalHow to measure itFailure it exposes
Recall@kShare of answerable questions where a gold passage appears in the top k results.Missing crawl coverage, weak chunks, vocabulary mismatch, or stale embeddings.
Ranking qualityRecord reciprocal rank or nDCG for judged relevant passages.A relevant page exists but noise or an obsolete version outranks it.
Claim supportReview every material claim against the passages supplied to the model.The answer combines assumptions with evidence or overstates the source.
Citation accuracyVerify that each citation resolves and directly supports its attached claim.The right answer links to a merely related page or the wrong version.
Fallback precision and recallInclude unanswerable and conflicting-source questions; score correct declines and missed answers.The bot guesses without evidence or refuses despite adequate evidence.
Freshness lagMeasure time from a published source change to a correct retrieved answer.Recrawl delay, duplicate stale chunks, or failed deletion propagation.

Choose RAG for changing, attributable knowledge

MethodBest fitImportant limit
Keyword or site searchUsers want ranked pages and will read the source themselves.Does not synthesize an answer and can miss semantic matches.
RAGKnowledge changes, citations matter, and answers span a few passages.Quality depends on crawl coverage, retrieval, permissions, and source quality.
Fine-tuningTeach stable style, format, classification, or task behavior.Not a reliable replacement for current facts, citations, or source deletion.
Long-context promptingA bounded document set fits in context and every item is relevant.Cost and noise grow with context; permissions and freshness still need controls.

Source-to-answer walkthrough

Suppose the indexed installation page says the widget script belongs immediately before the closing body tag. Retrieval should select that passage, the prompt should prohibit unsupported placement advice, and the answer should state the instruction with the installation page attached as evidence.

  1. 1. The question is embedded and matched against permitted chunks.
  2. 2. The installation passage ranks above broader widget pages.
  3. 3. The model answers only the placement detail present in that passage.
  4. 4. The source card links the user to the exact documentation page.

Continue with the guides to source citations, unsupported-answer controls, developer documentation chatbots, and the technical documentation evaluation framework.

Documentation assistant
x
Where should I add the widget script?
Add the ChattyBox widget script immediately before the closing body tag on each page where the widget should appear.
Ask a question...
Powered by ChattyBox

How ChattyBox keeps retrieval practical

Searchable Content Index

Your website, docs, help center, and CMS pages are indexed so the chatbot can search the content you already publish.

Embeddings Model

Embeddings help match visitor questions to relevant source passages even when the wording is different.

Focused Retrieval

For each question, ChattyBox retrieves a small set of relevant passages instead of asking the model to answer from memory.

Context-Limited Prompting

The answer step is constrained to the retrieved context and configured to avoid unsupported claims.

Citation Links

Every response includes links to source pages, so users can verify the information.

Fallback Handling

When relevant content is missing, the bot can fall back instead of improvising an unsupported answer.

RAG chatbot vs generic AI chatbot

A generic chatbot answers from broad model memory and can sound confident about things it does not know. A RAG chatbot retrieves from your pages first, so the answer is tied to content you published and can be checked.

Generic AI chatbot
  • Answers from broad model memory, not your content.
  • Can invent features, pricing, or steps that are not in your docs.
  • No clear source to verify the answer.
RAG chatbot
  • Retrieves from your published website, docs, and help content first.
  • Can use a configured fallback when retrieval does not contain enough support for an answer.
  • Can cite supporting pages so visitors can inspect the evidence behind material claims.

When citations are the priority, pair retrieval with an AI chatbot with source citations that links every answer to its source page.

RAG without rebuilding your content stack

Connect your existing site content, test answer quality, and embed a source-cited chatbot when the responses look right.

Start Free - No Credit Card