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:

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.

Table 1 — the four workflows at a glance
WorkflowTypical libraryA question that retrieves wellWhere it stops
Legal30–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
ResearchUp 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
StudentsLecture 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 financeHandbook, 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

Table 2 — hard limits, and what they mean in practice
LimitValueWhen you actually hit it
Single file≤25 MBRarely binds on text PDFs (a 300-page document is often 3–8 MB); image-heavy PDFs reach it quickly
Documents per library≤40A term of coursework or a 40-paper screen fits; a 200-paper review does not, so split it
Total per library≤200 MBRoughly 30–40 mid-sized PDFs; scans consume this budget fastest
Chunks per library≤20,000At 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 model400 MB – 1.0 GB, click to confirmQwen2.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.
Fixed wording, not marketing: Files never leave the device. No account, no tracking pixels. Not used for training. Works offline once cached. The only outbound request the application ever makes is the first GET for model weights, and the payload is the file name and nothing else.

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

  1. Open the tool with DevTools → Network in a second window, and clear the log.
  2. Add two files you already have on disk — one PDF, one DOCX — and watch the indexing progress with no requests appearing.
  3. Ask a question whose answer you know, click the citation marker, and switch DevTools to Offline to confirm the answers keep coming.