Skip to main content

How it works

You do not need to understand any of this to use SiteMesh. But knowing roughly what happens under the hood makes it much easier to work out why your chatbot answered the way it did — and how to fix it when the answer is wrong.

The short version

SiteMesh does not "learn" your content the way people imagine AI training works. Nothing is baked into a model. Instead, every time a visitor asks a question, SiteMesh looks up the most relevant passages from your content and hands those to an AI model with an instruction: answer using this and nothing else.

That look-up-then-answer approach is why the bot can be updated in minutes rather than retrained for hours, and why it can tell you which parts of your site an answer came from.

What happens when you add content

1. Reading

For a website, SiteMesh fetches your pages and strips out everything that is not content — navigation, footers, cookie banners, scripts. If your site renders its content with JavaScript (a React, Vue, Next.js or Nuxt site, for example), SiteMesh detects that and loads the page in a real browser first so it sees what a visitor sees.

For a file, it extracts the text: PDF pages, Word paragraphs, slide contents, spreadsheet rows.

2. Chunking

A whole page is too big to be a useful search result, so SiteMesh splits your content into overlapping pieces of roughly a thousand characters each.

The overlap matters. If a sentence like "Refunds are processed within 14 business days" happened to land exactly on a boundary, a clean split would cut it in half and neither piece would answer the question. Overlapping the pieces means every sentence appears whole in at least one of them.

This is why you see a chunk count as well as a page count after training. A 40-page site might produce several hundred chunks.

3. Indexing

Each chunk is converted into a list of numbers that represents its meaning, not its exact wording. Chunks with similar meanings end up close together.

This is what lets the chatbot answer "can I get my money back?" using a page that only ever says "refund policy" — the words differ, the meaning does not.

What happens when a visitor asks a question

The visitor's question is converted the same way, then matched against your indexed chunks. The closest matches come back first, each with a score for how relevant it is.

2. Filter

Anything scoring below a relevance threshold is thrown away. This is the step that keeps the bot honest.

If nothing survives the filter, the bot has nothing to answer from. Rather than falling back on general knowledge, it tells the visitor it does not have information on that topic and offers to help with something else.

3. Answer

The surviving passages are assembled into a knowledge base block and sent to the AI model together with your chatbot's instructions — its name, your business name, the tone you chose, and the rules about staying grounded.

The model writes the answer and streams it back word by word, which is why visitors see the reply forming rather than waiting for a blank screen.

4. Record

The exchange is saved to the conversation and pushed live to your dashboard, so you can watch it happen and step in if you want.

What this means in practice

If you notice thisIt usually means
The bot says it has no information about something that is on your siteThat page was not indexed, or the matching chunk scored too low. See Improving answers.
The bot answers a question you never wrote aboutRare, and worth reporting — the grounding rules are designed to prevent it. Check whether an uploaded document covers it.
Answers are stale after you updated your siteContent is indexed at crawl time, not read live. Recrawl or schedule auto-refresh.
A very long PDF gives vague answersLong documents produce many chunks and dilute matching. Split it, or add a focused pasted-text source.

What SiteMesh never does

  • It never sends your content to be used as training data for a public AI model
  • It never answers from general internet knowledge
  • It never exposes your account credentials or AI provider keys to the browser

See Security and privacy for the details.