WebAssembly, Worker-owned semantic search, local after load
Local semantic search in the browser
RetrievalKit runs local semantic, keyword, and graph search inside a dedicated browser Worker with the shared Rust core compiled to WebAssembly. A second independent Worker package handles optional local embeddings. Neither package replaces the native Node.js wrapper.
Responsibilities
What RetrievalKit handles—and what your app supplies.
Two Workers keep semantic search off the main thread
The retrieval Worker owns base retrieval, graph-only, and graph-scoped databases. It selects either the portable or SIMD128 WebAssembly tier and keeps retrieval work off the browser main thread.
Browser embedding is a separate optional Worker package. It can select WebGPU or a deterministic WebAssembly compatibility path at load time. Keeping the packages independent lets applications replace the embedding provider without changing retrieval semantics.
Local semantic search begins after required assets arrive
The demo downloads JavaScript, WebAssembly, the corpus, and the required embedding and answer models after Start. The model-file transfer, up to 443 MiB, is disclosed before consent and before any privacy claim.
After pinned assets are loaded, an interactive demo query uses local browser embedding, RetrievalKit WebAssembly search, and local answer generation. It does not require a hosted inference or retrieval request.
Desktop support needs the complete pipeline
The complete Apollo 11 demo has run successfully in Chromium, Firefox, and Safari on desktop. WebAssembly support alone is not enough: local answer generation also requires WebGPU and sufficient GPU memory. Physical mobile browsers remain unqualified.
The browser target starts with Worker-owned in-memory databases. Filesystem persistence is excluded from this target without changing native persistence or the Node N-API wrapper.
The Apollo 11 demo is a real local pipeline
Free-form questions and suggested questions use the same browser embedding, RetrievalKit search, and local answer pipeline. Results are not selected from canned answers. Source passages remain inspectable so the generated response can be checked against the retrieved evidence.
- Vector retrieval ranks the local corpus.
- Graph traversal follows application-supplied relationships.
- Graph-scoped retrieval ranks only the selected neighborhood.