Rescued: Load Stage 1/2 to measure neural rank lift
Lexical decoy: Load Stage 1/2 to inspect demotions
Corpus Chunks—
BM25 Lexical—
Stage 1 Bi-Encoder—
Stage 2 Reranker—
PCA Variance (2D)—
Rank Agreement—
Highlighted words show exact BM25 lexical term matches
// Run a query to generate a stamped Markdown retrieval benchmark.
// Run a query to generate formula-safe RFC 4180 CSV.
// Run a query to inspect structured benchmark JSON.
signature showcase · hybrid rag pipeline · BM25 + all-MiniLM-L6-v2 + MS MARCO MiniLM · ~46 MB total · 100% local
See why production RAG chains BM25 Lexical → 384-d Bi-Encoder Embeddings
→ Cross-Encoder Neural Reranking. Every cosine vector, 2D PCA semantic star map,
Reciprocal Rank Fusion sweep, and relevance logit runs live inside your browser in two isolated
WASM Web Workers (~46 MB total) with zero bytes uploaded.
Inspect the Retrieval, PCA Projection & Worker Serialization Code
Both 6-layer MiniLM ONNX checkpoints are INT8 quantized (~23 MB each) and run cleanly on
standard WebAssembly CPU threads in isolated Web Workers, reusing the exact Cache Storage
keys from their standalone pages with zero duplicate downloads.
Why Bi-Encoders & Cross-Encoders Pair Together
all-MiniLM-L6-v2 embeds the corpus once and caches 384-d unit vectors so new queries embed
in ~15 ms. MS MARCO MiniLM-L-6-v2 then reads each [CLS] query [SEP] passage [SEP] pair
jointly, resolving negations and lexical traps that cosine similarity alone misses.
Corpus-Fixed 2D PCA Projection
Power-iteration PCA computes exact 384-d orthonormal axes over the corpus embeddings, then
projects the live query vector into that fixed basis. Swapping queries moves only the Query
Star while document neighborhoods stay spatially anchored.
Honest Scaling Limits & Zero-Upload Privacy
Custom pasted or uploaded corpora are capped at 48 chunks and cross-encoded in FIFO batches
of 32 so every chunk receives a real relevance logit while keeping browser WASM latency
responsive. Every document, clause, and benchmark export stays strictly inside browser memory.