Four kinds of document work this tool is built for
SecureRAG answers questions across PDF, Word, Markdown and CSV files inside a single browser tab. This section covers four workflows in detail: the files involved, the questions that retrieve well, and the limits that decide whether it fits. Files never leave the device.
Last updated:
Reading a contract without sending it to a server
SecureRAG lets a lawyer, paralegal or compliance analyst ask questions across up to 40 PDF or DOCX files at once, with parsing, embedding and search all running in the browser. Files never leave the device. This page lists the formats that work, the questions that retrieve well, and the cases where a local tool is the wrong choice.
Screening papers without uploading them
A researcher can ask questions across up to 40 PDFs at once without sending a single file anywhere: parsing, embedding and search run in the browser tab. This page covers what the parser does with preprint PDFs, how to split a larger screen into batches, and where a small local model stops being enough.
Revising from lecture slides, textbook chapters and past papers
Course material can be queried without uploading anything: up to 40 files, 25 MB each, parsed and indexed inside the browser tab. This page shows what to load for one term, how to ask questions that lead back to slide and page numbers, and which uses cross the line your institution draws.
Answering policy and expense questions on-device
An HR or finance team can put up to 40 documents — employee handbook, expense policy, vendor contracts, invoices exported to CSV — into one browser-local library and question them together. Nothing is uploaded. This page covers the supported formats, the question patterns that work, and the governance questions a local tool does not answer.
Start with the workflow that looks most like yours. Each page names the file types, the question patterns that retrieve well, and the point where a different tool would serve you better.
What all four workflows share
They run the same pipeline: magic-byte sniffing instead of extension guessing, parsing that keeps PDF page numbers and Word heading levels, chunking at about 700 characters with 15% overlap, local embedding in a Web Worker, an index in IndexedDB, then hybrid retrieval — vector search fused with BM25 by reciprocal rank fusion (k=60), maximal marginal relevance at λ=0.7, top-k 6. The default answer tier quotes retrieved sentences and keeps numbered citations. The optional generation tier adds a local Qwen2.5 0.5B–1.5B model at 4-bit and needs a click to confirm the download.
| Workflow | Typical library | A question that retrieves well | Where it stops |
|---|---|---|---|
| Legal | 30–40 contracts, policies and filings as PDF or DOCX | “Where is the notice period defined, and what triggers it?” | Scanned attachments with no text layer; a human still has to read the clause |
| Research | Up to 40 preprints plus CSV or JSON data appendices | “Which of these papers report an ablation on the decoder depth?” | Maths typeset as images; two-column PDFs where reading order occasionally breaks |
| Students | Lecture PDFs, textbook chapters, past papers, your own notes | “Which definition from week 3 does question 2 of the 2024 paper test?” | Anything your course says you must do unaided |
| HR and finance | Handbook, expense policy, vendor contracts, invoices exported to CSV | “What receipt does a taxi claim of 800 CNY require?” | 200 MB per library; spreadsheets that were never exported to CSV |
The limits that decide whether a workflow fits
| Limit | Value | When you actually hit it |
|---|---|---|
| Single file | ≤25 MB | Rarely binds on text PDFs (a 300-page document is often 3–8 MB); image-heavy PDFs reach it quickly |
| Documents per library | ≤40 | A term of coursework or a 40-paper screen fits; a 200-paper review does not, so split it |
| Total per library | ≤200 MB | Roughly 30–40 mid-sized PDFs; scans consume this budget fastest |
| Chunks per library | ≤20,000 | At about 700 characters per chunk that is roughly 14 million characters, so the size cap usually arrives first |
| First model download | ≈23 MB all-MiniLM-L6-v2 (English), ≈25 MB bge-small-zh-v1.5 (Chinese), ≈120 MB multilingual-e5-small (mixed) | One request carrying the file name only, then cached and offline |
| Optional generation model | 400 MB – 1.0 GB, click to confirm | Qwen2.5 0.5B–1.5B at 4-bit; WebGPU through WebLLM, otherwise CPU at about 3–8 tokens per second |
Which tier a workflow usually needs
- Contract and policy work is mostly “find the exact clause”, which the default retrieval tier already does: it quotes the retrieved sentences and keeps numbered citations.
- Literature screening gains from the generation tier when you want a paragraph stitched from several passages. Without WebGPU, expect a few tokens per second on CPU.
- Coursework rarely needs the generation model. The questions are usually “where is this stated”, and a quoted passage with a slide number is what you study from.
- Mixed Chinese and English libraries are the case for multilingual-e5-small at about 120 MB, instead of two separate single-language models.
When none of these pages fits
- You need one shared, permissioned library for a team. There is no backend and no shared index: each person imports their own copies, and the index lives in that person’s browser profile.
- Your corpus is larger than 40 files or 200 MB and cannot be split into batches.
- The material is image-only scans and you have no OCR step before import.
- You need automatic arithmetic across many documents, or an audit log of who read what. Nothing is logged anywhere.
- The answer would be relied on without anyone reading the cited passage. Retrieval returns passages, not verified findings.
Three steps to test it on your own files
- Open the tool with DevTools → Network in a second window, and clear the log.
- Add two files you already have on disk — one PDF, one DOCX — and watch the indexing progress with no requests appearing.
- Ask a question whose answer you know, click the citation marker, and switch DevTools to Offline to confirm the answers keep coming.