Building Minyut: An Embeddable RAG Chatbot in One Script Tag Minyut is an embeddable RAG chatbot that can be integrated via a single script tag, built to prevent AI hallucinations by constraining answers to uploaded content. The chatbot processes queries for websites built on Webflow, WordPress, Shopify, React, and plain HTML, using Supabase for storage and HuggingFace for embeddings. Minyut employs Shadow DOM for cross-site compatibility and offers fixed monthly pricing to avoid billing uncertainty. A client needed their customers to be able to query a 40-page policy document without reading through it. We built the first version of what became Minyut in a weekend. It used a basic embedding approach, answered from an OpenAI endpoint, and—in testing—confidently responded to questions that had no answer in the document at all. It made things up. Fluently. Completely wrong. That was the founding problem. Every document chatbot we tested made things up. Not because the models were bad, but because they weren't constrained to answer only from the documents. Minyut is built around a single architectural decision: Every answer must come from uploaded content—or the chatbot says, "I don't know." Everything else follows from that constraint. Today, Minyut processes queries for chatbots embedded on Webflow sites, WordPress installs, Shopify stores, React apps, and plain HTML pages. Documents are stored in Supabase's Mumbai region, and the widget can be embedded with a single script tag in under ten minutes. Here's how it's built. Standard AI chatbots answer from their training data. For general knowledge, that's exactly what you want. For support chatbots, legal documents, policy manuals, product specifications, and consultancy websites, accuracy becomes a liability issue rather than a convenience feature. A chatbot that invents policy details isn't a support tool. It's a liability. The solution is Retrieval-Augmented Generation RAG . At query time: If the answer isn't present in the uploaded documents, the chatbot says so. The language model can only answer as well as the passages you retrieve. Good retrieval is most of the battle. Documents arrive as: File limits: After extraction, documents are chunked. Each sentence became its own chunk. Retrieval was precise but context disappeared. Example: Question: What is the refund window? Retrieved: Refunds are processed in 7 days. Technically correct. Practically useless. Context improved. Retrieval consistency did not. Short and long paragraphs behaved very differently during similarity search. Current strategy: The overlap ensures sentences crossing chunk boundaries remain complete in at least one retrieved section. For Minyut's document types, answer quality improved significantly. Each chunk is embedded using: sentence-transformers/all-MiniLM-L6-v2 via the HuggingFace Inference API. The model generates: Vectors are stored in: inside Supabase. The hard problem wasn't loading a script. It was ensuring the widget worked everywhere. Different host websites bring: Our first approach used scoped CSS. It failed repeatedly. Examples: The solution was Shadow DOM. The widget creates a completely isolated DOM tree. Host styles cannot leak in. Widget styles cannot leak out. js const host = document.createElement 'div' ; document.body.appendChild host ; const shadow = host.attachShadow { mode: 'open' } ; Everything lives inside the shadow root. Style conflicts effectively disappear. The widget is delivered as a single async script: