← Wednesday, October 14, 2026InferenceDeep dive

A browser RAG demo retrieves four passages and summarizes them locally

bart.degoe.de by bart.degoe.de by bart 10 min read Editor score 7/10

The demo combines in-browser semantic search with a small language model that summarizes the four most relevant passages, and measures answer faithfulness. Local execution keeps typed questions on the user's machine; the excerpt does not give the measurement results.

What
Ask my blog runs RAG entirely in-browser: it retrieves four passages, then a small local model summarizes them in two sentences.
How
A score threshold can skip generation; a Web Worker uses transformers.js on WebGPU or WebAssembly and streams the answer.
Why it matters
Client-side retrieval and generation keep typed questions on the user's machine, avoiding a server or API key.
search passages relevant pass… prompt answer question static-embeddingsearch Gate Prompt Generate page
The browser retrieves passages, gates on relevance, prompts a model, and displays its generated answer. Sketched from the article's own text.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.