◇ AI Website Chatbot Python · FastAPI · Claude · FAISS · JS widget Project Blueprint
Support Automation

It only knows what you told it.

An FAQ chatbot that answers from your documentation and nothing else, embedded on your site with a single script tag. When a question falls outside what it was given, it says so and hands over your contact details instead of inventing an answer.

Below, how it runs, what you control, and how it's built.
01

How It Runs

Two separate lifecycles that meet in one place. The top one runs whenever your content changes; the bottom one runs every time a visitor types a question.

when your content changes Ingest docs, pages, URLs 📤 Chunk retrievable pieces 🧩 Embed text becomes vectors 🔢 Knowledge base vector index · the only thing it is allowed to answer from every visitor question 💬 Ask in their own words 🔍 Search closest matching pieces Answer written from those pieces good match Answered from your content “I don't have that” + how to reach you nothing relevant enough
you or your visitor runs automatically no answer comes from outside the index

when your content changes

📤
Ingest
Upload documents or point it at your site.
🧩
Chunk
Content is split into retrievable pieces.
🔢
Embed
Each piece becomes a searchable vector.
↓ stored in the knowledge base — the only thing it is allowed to answer from

every visitor question

💬
Ask
A visitor types a question in their own words.
🔍
Search
The closest matching pieces are pulled out.
Answer
Written from those pieces, in your tone.
good match → answered from your content
nothing relevant → “I don't have that” + contact
02

Inside Each Step

📤

01 Ingest your content

Upload an FAQ document, product documentation, or policy pages — or paste a URL and let it read the site directly. PDFs, Word files, and plain text all work, including the ones nobody has opened since they were written. What comes out is clean text with the navigation and boilerplate stripped away.

BeautifulSoup · PyMuPDF · PDF, DOCX, text, live URL
🧩

02 Chunk it

Long documents are split into pieces small enough to retrieve precisely but large enough to still make sense on their own. This is quietly one of the highest-leverage steps: chunk too coarsely and every answer drags in irrelevant text; too finely and the piece that had the answer loses the context that explained it.

LangChain recursive text splitter
🔢

03 Embed and index

Each chunk is converted into a vector — a numeric representation of what it means rather than which words it used — and stored in an index. That is what lets "can I get my money back?" find the paragraph headed Refund Policy, which is precisely where a keyword search or a decision-tree bot falls over. Embeddings run locally by default, at no per-document cost.

sentence-transformers by default · hosted embeddings opt-in
💬

04 A visitor asks

The widget sits on your site behind a single script tag, styled to your colours. The visitor types however they type — half a sentence, a typo, a phrasing nobody anticipated — and the same phrasing tolerance that made embeddings useful at indexing time now works in their favour.

vanilla JS widget · one script tag
🔍

05 Search the index

The question becomes a vector too, and the index returns the chunks closest to it in meaning. Only those chunks travel forward. Nothing else about your business, and nothing the model happens to know about the internet, is in scope for the answer.

similarity search · top matching chunks only

06 Answer, or decline

The retrieved chunks are handed to the model with the question, and the reply is written from them in your tone rather than pasted out of them. If nothing came back relevant enough, that path stops: the bot says it doesn't have that information and surfaces your email, phone, or booking link instead.

Claude API · grounded generation · fallback to contact
The behaviour worth paying for

It is allowed to say no.

A bot that guesses is worse than no bot at all — one confidently wrong answer about a refund window or a cancellation term costs more than the fifty questions it deflected. So the fallback isn't an error state here. It's a designed outcome with its own path, and it's what makes the other answers trustworthy.

03

What You Control

Everything a business needs to change after launch is configuration or content — none of it requires a developer.

EMBED
One script tag, any website

The widget is plain JavaScript with no framework attached, so it drops into a site builder, a CMS, or a hand-written page the same way. No rebuild, no plugin.

CONTENT
Refresh in minutes, not sprints

Prices change, policies change, a product gets renamed. Upload the new document from the dashboard and the index rebuilds — the bot is current from the next question onward.

BRAND
Your colours, your voice

The widget matches your palette, and answers are written in your tone from your own wording rather than in a generic assistant register.

FALLBACK
Where it sends people instead

You decide what the handoff is — a support inbox, a phone number, a booking link. The unanswered question becomes a routed lead rather than a dead end.

LOGS
What was asked, and what it couldn't answer

Conversation logs split into answered and escalated. The escalated list is the most valuable page in the product — it's a ranked list of the documentation you're missing.

04

Architecture

Sensible local defaults, with a hosted path for clients who need multi-tenant scale.

Ingestion

BeautifulSoup · PyMuPDF · LangChain splitter

Scrapes pages, reads documents, strips the boilerplate, and cuts what's left into chunks ready to be indexed.

Meaning

Embeddings

sentence-transformers · hosted opt-in

Runs locally and free by default. A hosted provider can be switched on where higher retrieval quality justifies the per-document cost.

Storage

Vector store

FAISS local · pgvector opt-in

A local index covers a single business well. The hosted option is what makes a multi-tenant, multi-instance deployment possible.

Selection

Retriever

similarity search · relevance floor

Returns the closest chunks, and returns nothing when the closest isn't close enough. That threshold is what triggers the fallback.

Generation

Claude API · grounded on retrieved chunks

Writes the answer from the retrieved text and the question, in the business's tone. Given nothing to work from, it declines rather than filling the gap.

Delivery and admin

FastAPI · vanilla JS widget · admin dashboard

A Python service behind a lightweight embeddable widget, plus a dashboard for document management and conversation logs.

05

How It's Built

Six modular blocks. Content, branding, and scale change per client; the shape of the system doesn't.

01

Ingestor

intake

Pulls clean text from files and live pages.

02

Chunker

segmentation

Splits content into retrievable pieces.

03

Embedder

vectors

Turns meaning into something searchable.

04

Index

storage

Local by default, hosted when it needs to scale.

05

Answer engine

grounding

Retrieves first, then writes only from what it found.

06

Widget & dashboard

surfaces

One tag on the site, one page to manage it.

06

Stack

Python FastAPI Claude API sentence-transformers FAISS pgvector LangChain BeautifulSoup PyMuPDF Vanilla JS