~/work/research-benchLive
ResearchBench
Built for an open-ended take-home prompt ("Build a NotebookLM clone"): parses, chunks, embeds and searches PDF, Markdown and TXT sources locally in the browser using Rust/Pdfium WASM and ONNX, answers questions with clickable source spans, and generates Studio artifacts or two-host podcasts.
What it does
ResearchBench runs document import, PDF text extraction (Rust + pinned Pdfium WASM), overlapping chunking with half-open UTF-16 spans, multilingual embeddings (multilingual-e5-small via ONNX Runtime Web) and cosine retrieval inside browser Workers and IndexedDB. There is no application backend. Only when the user explicitly generates chat answers, summaries, FAQs, study guides or two-host DE/EN podcasts do selected excerpts leave the browser using a session-scoped API key for Mistral EU or OpenRouter (with Zero Data Retention filters).
How it's built
- PDF, Markdown and TXT files are parsed locally in the browser via Rust and Pdfium WASM into pages, chunks and exact UTF-16 spans.
- An ONNX Runtime Web Worker computes local multilingual-e5-small embeddings and commits them atomically to IndexedDB.
- Chat and Studio run cosine retrieval locally and check generated answers through a deterministic support gate.
- Only selected excerpts are sent with the user session key to Mistral EU or OpenRouter for generation and speech synthesis.
Evidence
- Verification
- 635 tests (v0.1.0)
- Local pipeline
- 0 backend
- Source precision
- UTF-16 spans
489 unit · 10 Rust · 92 E2E · 44 security (Chromium & Firefox)
Pdfium WASM, ONNX embeddings and vectors in IndexedDB
Clickable citations and lexical support gate for chat & podcasts
Related case study
The project page describes what exists. The case study follows the decisions, constraints, and trade-offs behind it.
Case studyHighlights
- Browser-native RAG engine in Rust & WASM Pdfium WASM, deterministic chunking with UTF-16 source spans and cosine search in Rust, paired with local multilingual-e5-small embeddings via ONNX Runtime Web.
- Studio artifacts & resumable podcasts Cited summaries, FAQs, study guides and two-host podcasts with a lexical support gate, per-turn RMS gain normalization, local MP3 Worker encoding and Web Locks.