Rylvo
Blog

How to Train an AI Chatbot on Your Website and Documents

Train an AI chatbot on your website, PDFs, Google Drive or Notion, check it cites the right page, and keep answers current as your content changes.

In this articleOverview

To train an AI chatbot on your own data, you do not retrain a model. You connect your website and documents, they are split into passages and indexed, and for each question the chatbot searches them, answers from what it finds and cites the source. The real work is choosing content, testing real questions and keeping it current.

Key takeaways

  • "Training" a business chatbot means retrieval (often called RAG): search your content, then answer from it. Fine-tuning is rarely the right tool.
  • Start with your website address, then add the documents customers actually ask about: price lists, policies, FAQs, product sheets.
  • Before going live, ask the questions customers really ask and check which page each answer came from.
  • Set a sync schedule so a changed price or opening hour reaches the chatbot without anyone remembering to re-upload it.
  • Grounding reduces wrong answers; it does not remove them. Test, then read live replies.

This guide is part of our series on adding an AI chatbot to your website. The examples use the Rylvo Knowledge Base, but the steps apply to any tool you pick.

What "training a chatbot on your data" actually means

People who ask for a chatbot trained on their website usually mean: answer from my content, not from what the model happens to know. There are two ways to get there.

Retrieval (RAG)Fine-tuning
What changesThe content the model reads for each questionThe model's weights
Picks up a new priceAt the next syncOnly after retraining
Can show its sourceYes, the passage it usedNo
Cost of a content changeRe-index the changed pagesA new training run
Good forFacts, policies, prices, product detailsTone, format, narrow repeated tasks

Retrieval-augmented generation was described by Lewis et al. (2020): retrieve relevant passages, then generate an answer conditioned on them. For a small business, retrieval wins on every row that matters. Your hours, prices and return policy change; a fine-tuned model would keep quoting last quarter's.

In practice, each page or file is turned into text, split into passages ("chunks") of a few hundred words, and indexed. For each question the most relevant chunks are found, and the model answers from them and cites the ones it used.

Step 1: Decide what the chatbot should know

The quality of the answers is capped by the quality of the content. Spend twenty minutes on this before you connect anything.

  • List the top 20 questions. Pull them from your inbox, phone notes, reviews and contact forms. These become your test set in Step 4.
  • Find where each answer lives. A page, a PDF, a Google Doc, a help-center article. If an answer lives only in someone's head, write it down as a short FAQ page or document.
  • Remove contradictions. If your pricing page says one thing and a 2024 PDF says another, the chatbot may quote either. Delete or update the old file.
  • Leave out what it must not say. Internal notes, staff rotas, supplier prices and anything with personal data should not be in a customer-facing knowledge base.

Step 2: Add your website

The fastest start is your own website. In Rylvo you enter your address (for example acme.com) when you create a website assistant. It reads your homepage, finds the site's other pages, shows you what it found, and then builds the assistant in Test from those pages. That source re-reads the site daily.

You can also add a website as a knowledge source by hand, which gives you more control:

  • Start URLs. One or more pages to start from, such as your homepage and your help center.
  • Depth and page cap. How many links deep to follow (2 by default) and how many pages to read per sync (50 by default).
  • Allowed domains. Only links on hosts you allow are followed, so the crawl does not wander onto other sites.

The crawler reads your sitemap when you have one, and it follows the robots.txt rules of your site (the standard is RFC 9309), so pages you have blocked from crawlers stay out. It only fetches public pages, and it refuses private and internal network addresses. Pages built only with JavaScript are read through a rendering fallback; if that fails, the sync says so instead of silently indexing an empty page.

No website yet? You can still give an assistant your documents and share it as a chat link. See how to run an AI chatbot without a website.

Step 3: Add documents and other sources

Most businesses have answers outside the website: a price list in a spreadsheet, policies in Google Drive, a help center in Zendesk or Intercom, product data in a database. Rylvo can read from 16 kinds of source, grouped like this:

GroupSourcesHow you connect
UploadFile UploadDrag files in
Cloud storageAmazon S3, Google Cloud Storage, Azure Blob StorageA key and a bucket
AppsNotion, Google Drive, Confluence, SharePoint, Slack, Zendesk, IntercomSign in, or an API token
DatabasesPostgreSQL, MongoDB, MySQLA connection string and a query or collection
APIs and webWeb Crawl, REST APIA URL, and a token for an API

Credentials you give for a source are stored encrypted (AES-256-GCM), not in the source's settings.

File formats that can be read: PDF, Word (DOCX), PowerPoint (PPTX), Excel and other spreadsheets (XLSX, XLS, ODS, CSV, TSV), plain text, Markdown, HTML, JSON and XML. Images (PNG, JPG, WEBP, BMP, TIFF) are read with OCR. Two formats are not read yet: the old binary DOC and PPT formats, and the page images inside a scanned PDF. Convert those first.

Splitting. Each knowledge base chooses how its text is cut into chunks: Recursive, Sentence, Fixed-size, Structure-aware (Markdown), Whole document. Recursive is a sound default. Structure-aware splitting helps when your documents use clear headings, and Whole document suits short files such as a one-page policy.

Step 4: Test the questions customers actually ask

Do not judge the chatbot by asking it what it is. Ask it the 20 questions from Step 1, in the words customers use ("do you do Saturdays?", not "What are your weekend opening hours?").

In Rylvo, each knowledge base has a test panel with two views:

  1. Quick search. Type a question and see the exact chunks the assistant would read, best match first, each with a relevance score and the document it came from. Nothing is saved.
  2. Test set. Save the questions that matter, each with the document that should answer it. After any change (a new file, a different search strategy, a new chunk size), run the set again and see which questions still find the right document.

Watch for two failure patterns:

  • The right document is not in the top results. The content may be missing, buried in a long page, or worded very differently from the question. Add a short FAQ entry in the customer's words, or try a different search strategy (see the developer section below).
  • Everything scores low. Each knowledge base has a minimum relevance setting: chunks under it never reach the assistant, so an off-topic question does not get the least wrong paragraph on file. If good chunks fall just under it, lower it slightly; if junk gets through, raise it.

Then test whole conversations, not just search. Tests run scripted conversations against the Test version of the assistant. Our launch testing checklist covers what to include.

Step 5: Check that it cites the right page

A grounded answer should be checkable. In the dashboard test chat and in Observability, each reply carries the numbered sources the assistant used: the document, the knowledge base and the passage. On your website widget, visitors do not see the numbers; they see links (up to three) to the crawled pages the answer came from, so they can read the original. Uploaded documents are cited in the dashboard, not shown to visitors.

For every test answer, ask three questions:

  • Is the cited source the page you would have pointed a customer to?
  • Does the cited passage actually say what the answer says?
  • When nothing in your content answers the question, does the assistant say it does not know, rather than guess?

On live conversations, Observability shows the search behind each reply: which knowledge bases were searched, how long it took and which chunks reached the assistant. That is where you find out why a specific answer went wrong. If answers are wrong even when the right page is cited, the problem is usually the instructions, not the content: see how to stop an AI chatbot from making things up.

Step 6: Keep the answers current

A chatbot trained once goes stale the day you change a price. Set a sync schedule on each source:

ScheduleWhat it does
Real-timePolled frequently — about every 15 minutes
Every HourPoll for changes about once an hour
DailyFull sync about once per day
WeeklyFull sync about once per week
ManualSync only when you trigger it

A sensible default: daily for your website, hourly for a help center that changes often, and manual for files you upload yourself (upload the new version when it changes).

Rylvo keeps knowledge per environment. You build and test a knowledge base in Test; customers see what you have released to Production, which is read-only. New documents stay in Test until a release sends them out with the assistant that answers from them. Once a knowledge base is live, its scheduled re-reads carry changed pages to Production on their own, page by page, while anything you add in Test and have not released stays in Test. Environments and our post on Test vs Production for chatbots explain why that split matters.

Why it still answers wrong, and what to do

SymptomLikely causeFix
Quotes an old priceAn old file or page is still indexedDelete the old source or file; check the sync ran
"I don't know" to a question your site answersThe answer is in an image, a PDF without text, or a page the crawl did not reachCheck the source's page list; add the page as a start URL; convert the file
Answers from the wrong productTwo similar pages competeGive each page a clear title; split mixed pages; try Parent-Child
Gets exact codes and names wrongPure vector search misses exact stringsUse Hybrid Search (vector plus keyword)
Answers questions it should refuseThe instructions do not set boundariesAdd scope rules to the prompt and test them
Correct but ramblingToo many chunks per answerLower the Context budget (or Chunks per search) in the knowledge base's Settings

What it costs

Prices checked on 2026-11-17. On Rylvo, every plan includes indexing within a monthly allowance, so you do not need your own OpenAI key to index your site. Every paid plan also includes AI replies each month. Adding your own provider key is optional.

The allowance covers the default embedding model only. If a workspace uses up its month, indexing of new content stops until the next month, or until you add your own OpenAI key, which is then used automatically. Larger OpenAI, Voyage or Cohere embedding models always need your own key.

PlanPrice a monthKnowledge sourcesFile sizeIncluded indexing a monthIncluded AI replies
Free$01 source10 MB2M tokensNone after the trial
Starter$105 sources25 MB5M tokensabout 650 a month
Lite$4015 sources25 MB10M tokensabout 1,300 a month
Pro$10050 sources100 MB50M tokensabout 2,650 a month

Each data source counts as one knowledge source; a knowledge base that groups sources does not count. About 750 tokens is one typical web page, so even Free's allowance covers a few thousand pages a month. Starter's $10 is an early price, kept for your first 12 monthly billing cycles; new buyers pay $19 from 31 Jan 2027 or after the first 100 Starter customers, whichever comes first. Every new workspace starts with a 7-day Pro trial. Enterprise is quoted on request. Full details are on Pricing.

For developers: the search strategies

Each knowledge base picks a search strategy (the dashboard calls them Search strategies). 8 run in the live engine today; more are in development and are not offered until they do. Here is what each one does at answer time, in the product's own words:

StrategyWhat it does
Hybrid Search (default)Dense vectors + BM25 keyword search, fused with Reciprocal Rank Fusion. Reranking applies when a Cohere/Voyage key is set.
Classic RAGDense vector search over your chunks, ranked by similarity.
Parent-ChildMatches small child chunks but returns the larger parent chunk so the bot gets fuller context.
HyDEWrites a hypothetical answer and embeds that instead of the bare question to improve recall (one extra LLM call per turn).
Contextual RetrievalPrepends document context to each chunk before embedding (Anthropic-style), then dense search.
Self-RAGRetrieves, then an LLM grades each chunk's relevance and drops the irrelevant ones before the bot answers (Self-RAG reflection). One extra LLM call per turn.
Agentic RAGSplits the question into focused sub-questions, retrieves for each, and unions the evidence — better for complex, multi-part questions. One extra LLM call per turn.
Corrective RAG (CRAG)Retrieves from the KB; when the results are weak or empty, falls back to a live web search (Tavily) so the bot still has grounded, fresh evidence. Needs a Tavily key.

A few details worth knowing:

  • Start with Hybrid Search. It finds paraphrases and exact strings such as order codes. Move only when your test set shows a gain.
  • Extra calls cost time. HyDE, Self-RAG and Agentic RAG each add one model call per turn, so replies take a little longer.
  • Reranking is off by default. You can turn it on per knowledge base to pull a wider set of chunks and have a reranker put the best first. It needs your own Cohere, Voyage or Jina key; the Hybrid Search row above names only two, but the engine supports all three.
  • Corrective RAG can answer from the open web. When your content has nothing relevant, it searches the web, so the answer is no longer limited to your pages. Leave it off if the assistant must only quote your own content.
  • Context budget. An assistant receives at most 6 chunks per turn by default, across all of its knowledge bases; you can set it from 1 to 50 in a knowledge base's Settings. More chunks give more context and more room for noise.
  • Embeddings. The included allowance indexes with OpenAI's text-embedding-3-small. Other OpenAI, Voyage and Cohere embedding models work with your own key.
  • Isolation. Each workspace's chunks are stored with its own identifiers and searched only for that workspace.
  • Contextual Retrieval follows the approach Anthropic described in 2024: give each chunk a short note about the document it came from before indexing.

When another approach fits better

  • You only have ten questions. A short FAQ in the assistant's instructions may be enough. A knowledge base earns its place once your answers live in pages and files that change.
  • You need a company-wide search engine. Searching every internal system for every employee, with per-document permissions, is a different product category. A customer-facing assistant should only read what customers may see.
  • You want a specific writing style. That is instructions and examples first; fine-tuning only if those fail.

If you are comparing tools, our page on Chatbase alternatives sets out the differences. If you run a clinic, the dental practices page lists the pages and questions an assistant for a practice should answer first.

Frequently asked questions

Do I need to fine-tune a model to train a chatbot on my data?

No. For a business assistant, training almost always means retrieval: your pages and files are split into passages and indexed, and for each question the assistant searches them and answers from what it finds. Fine-tuning changes a model's style and habits, not what it knows about this week's prices, and it has to be redone every time your content changes.

Can I train a chatbot on PDFs?

Yes, if the PDF has a text layer. Upload it as a knowledge source; the file size limit depends on your plan (10 MB on Free, 25 MB on Starter, 25 MB on Lite, 100 MB on Pro). Rylvo splits the text into passages, indexes it and cites the passage it used. If the PDF is a scan, run it through OCR first.

Can a chatbot read scanned PDFs?

Only if the PDF has a text layer. Rylvo reads text from PDFs and runs OCR on image files (PNG, JPG, WEBP, BMP and TIFF), but it does not yet OCR the pages of a scanned PDF. Run the PDF through OCR first, or upload the pages as images.

How often does the chatbot pick up changes to my website?

As often as the source is set to sync: about every 15 minutes, hourly, daily, weekly or only when you trigger it. A website assistant built from your address re-reads the site daily. Changed pages reach the live assistant without a new release when its knowledge base is already live.

Will the chatbot still make mistakes?

Sometimes. Grounding an assistant in your own content reduces wrong answers, because it answers from pages you control, but it does not remove them. Out-of-date pages, two pages that disagree, and questions your content never covers still cause errors, which is why you should test with real customer questions and read live replies.

Do I need my own OpenAI key to index my content?

No. Rylvo pays for indexing within a monthly allowance set by your plan, and every paid plan includes AI replies. Adding your own provider key is optional: if you add one, it is used instead.

Build your first agent on the free plan.