use case · multi-model · RAG
One model rarely ships alone. Here two run side by side: all-MiniLM-L6 (Transformers.js) turns a pasted document into vectors and retrieves the passages closest to your question, then Qwen3 1.7B (WebLLM) answers using only those passages — and, with thinking on, reasons over them in a visible trace first. That's RAG with a reasoning step: grounded, auditable, and running entirely in this tab with no server and no vector database.
Retriever · all-MiniLM-L6 (Transformers.js · WASM, no GPU needed)
Generator · Qwen3 1.7B (WebLLM · WebGPU only)
A 1.7B model doesn't know your documents, and asking it to memorise them in a prompt gets expensive and unreliable. Instead, MiniLM (a 25 MB embedding model) indexes the text once; each question is embedded and matched by cosine similarity, and only the closest few chunks are handed to Qwen3. The LLM's job shrinks to "read these passages and answer" — cheaper, faster, and grounded in source you control. With thinking on, Qwen3 can reason about which passage actually answers the question before writing. Swap the corpus for a product manual, a policy doc, or your own notes.