RAG playground
A BM25 ranking with the arithmetic left visible: chunk map, term stats and per-term score contributions.
Free · no account · nothing uploaded
Add PDFs, Word files or notes, ask a question, and get a short answer that cites the exact passages it used. The search and the language model both run in this browser, so your files never leave it.
Say it the way you would say it to a person. Your words are matched to one of 18 tools by readable rules, and the tool runs right here in your browser. No upload, no account.
This tool runs in your browser and needs JavaScript turned on.
/ask. The first time, the search model downloads (34–133 MB) and your documents are indexed on this device.Things you can type: ask it how long refunds take /ask who performs the security reviews?
Everything a hosted “chat with your PDF” service does on its machines happens here in the tab. pdf.js reads the text of each PDF page by page; Word files are unzipped by the browser itself. The text is cut into passages of about 900 characters that end at paragraph and sentence breaks and remember their file, page and heading.
Each passage is turned into a vector by a small embedding model (bge-small-en-v1.5, or multilingual-e5-small for about a hundred languages) running with transformers.js on your GPU, or on the CPU where WebGPU is missing. A question is searched two ways at once, by meaning against those vectors and by keyword with BM25, and the two rankings are merged by reciprocal rank fusion. The best passages that fit the model’s 4,096-token window are numbered and handed to Qwen3.5, run by WebLLM on your graphics card, with one instruction: answer only from these, cite each claim, and say so when the answer is not there.
Two models do the work. The search model is small: 34 MB when it runs on the CPU, 67 or 133 MB on the GPU depending on whether your card supports 16-bit shaders. It downloads the first time you ask. The answer model is the large one: Qwen3.5 2B is a 1.1 GB download and needs about 2.5 GB of GPU memory, and Qwen3.5 4B is 2.4 GB and needs about 4.5 GB. It downloads only after you allow it, and until then you still get the passages.
Both are fetched once from Hugging Face, along with WebLLM’s compiled GPU program from GitHub, and kept in the browser’s own storage, so later questions start without a download and work offline. Indexed documents are saved too, under a fingerprint of their contents, so asking about the same file tomorrow needs no indexing. The settings form lists what is saved and removes any of it.
Given the right passages, a 2-billion-parameter model reads and quotes them well: figures, dates, names and clauses come back as the document wrote them. It is weaker at reasoning across many passages, and it can fasten on a passage that is close to the question but not quite about it. That is why every claim has to carry a citation, why the citations are checked, and why the passages are always on screen beside the answer.
Two things are out of reach for now. Scanned PDFs have no text to read until they are run through OCR, which this tool does not do, and a summary of a whole long document is more than a handful of passages can carry.
A tab can answer questions about a handful of files. The research workspace FlexContext is being built for keeps hundreds of sources in one project, keeps every answer tied to the passage it came from, and lets you return to that passage months later.
Questions
No. The page reads them, indexes them and answers from them inside the browser tab. The only downloads are the models themselves, from huggingface.co, and WebLLM’s program files, from raw.githubusercontent.com; nothing about your documents or your question is sent with those requests. The indexed passages are saved in this browser’s IndexedDB, and the settings form can delete them.
A browser with WebGPU, such as a recent Chrome or Edge on a desktop or laptop, and about 2.5 GB of free GPU memory for Qwen3.5 2B or 4.5 GB for Qwen3.5 4B. Integrated graphics that share the computer’s memory work when there is enough of it. Without WebGPU the search still runs on the CPU and you get the matching passages instead of a written answer.
PDF, Word (.docx), Markdown, plain text, HTML, CSV, TSV and JSON, up to 20 MB in total per question. PDFs need a text layer: a scan of a page is an image, and reading it would need OCR. Password-protected PDFs have to be saved without the password first.
The RAG playground ranks a document with BM25 alone and shows the arithmetic behind every score, with no model at all. Ask your documents adds what a production pipeline has: search by meaning with embeddings, fusion with the keyword ranking, and a language model that writes an answer from the passages and cites them.
Of the models WebLLM can run in a browser, Qwen3.5 2B and 4B were among the strongest small ones on published benchmarks for following instructions and reading long context when this tool was built, and both are released under the Apache 2.0 licence. They run with their step-by-step thinking turned off, which keeps the context window for your documents and the answer quick.