multi-model · open-book multi-document QA · MiniLM (23 MB) → TinyRoBERTa-SQuAD2 (82.1 MB)

Open-Book Multi-Document QA Studio

True zero-server retrieval-augmented QA chaining two independent on-device models: Stage 1 embeds your question and document library with Xenova/all-MiniLM-L6-v2 (23.0 MB q8 WASM, Apache-2.0, reusing ../minilm-embeddings/worker.js) to retrieve the top-K matching passages, and Stage 2 reads each retrieved passage with onnx-community/tinyroberta-squad2-ONNX (82.14 MB q8 WASM, CC-BY-4.0) to extract the highest-confidence cited span — or honestly abstain across the entire library when no document answers the question.

1 · Initialise both on-device pipeline stages

Stage 1 · all-MiniLM-L6-v2 Retriever (23 MB · Apache-2.0)

Xenova/all-MiniLM-L6-v2 · 384-d mean-pooled L2-normalized vectors.

Stage 2 · TinyRoBERTa-SQuAD2 Reader (82.1 MB · CC-BY-4.0)

onnx-community/tinyroberta-squad2-ONNX · SQuAD v2 span extraction + abstention.

2 · Choose a document library & ask an open-book question

Add your own .txt or .md document to the live library (100% local).
Inspect document library (6 passages)

Initialise both Stage 1 (MiniLM) and Stage 2 (TinyRoBERTa-SQuAD2) above to run Open-Book QA.

Waiting for both stages

—

Stage 1 will rank every document by 384-d cosine similarity, then Stage 2 will read the top-K passages.

Stage 1 Retrieval—
Stage 2 Reading—
Combined Latency—
Top Doc Cosine—
Winning Span / Null—
Finite Check—

Retrieved Passages & Per-Document TinyRoBERTa-SQuAD2 Readings