BrightSmile AI Chatbot
A grounded RAG chatbot that answers only from a business's own documents — with cited sources, an embeddable one-line widget, bilingual replies, and an admin knowledge base for ingesting PDFs, docs, and URLs. Built to answer the common client ask: 'train a chatbot on our data.'
Businesses constantly ask for 'a chatbot trained on our data' embedded on their site — but a raw LLM makes things up, and answers that aren't grounded in the company's real policies, prices, and FAQs are worse than no bot at all. Doing it properly means a retrieval pipeline: ingesting messy source documents, chunking and embedding them, storing vectors, retrieving the right context per question, and constraining the model to answer only from that context with citations — plus making the whole thing safely embeddable on any third-party site.
BrightSmile is a full RAG chatbot, demoed on a fake dental clinic with seeded business documents. Retrieval pipeline: documents (PDF, DOCX, TXT, pasted text, or a URL) are ingested, chunked, and embedded with OpenAI's text-embedding-3-small, stored as vector(1536) in Neon Postgres via pgvector. Each question retrieves the top-6 chunks by cosine similarity. Grounded answers: Anthropic's Claude (claude-sonnet-4-6) is instructed to answer only from retrieved context, streams its reply, cites the source document names, and offers lead capture when it doesn't know — so it never bluffs. Embeddable widget: a single script tag (/widget.js) injects a floating button that loads the bot in an isolated iframe, so it drops into any site without touching the host page. Admin + tooling: a knowledge-base manager for ingestion, a playground that shows the retrieved chunks and similarity scores, conversation transcript review, bilingual (Arabic/English) answers based on the question, and per-session rate limiting. Built on Next.js 16 (App Router) + TypeScript, Tailwind, Prisma + Neon Postgres + pgvector, and shipped Docker-ready for Coolify with migrations and seeding on container start.
A complete, deployed answer to the most common AI client request — a grounded, citable, embeddable chatbot with a real ingestion-and-retrieval pipeline behind it, not a thin wrapper around an LLM.

