Try the model step by step
- Open the document-search demo and choose Use sample policy, or paste permitted English text within the stated limits.
- Enter a short question. The sample asks how long the business has to settle an invoice.
- Choose Load model and wait for Ready, then choose Find passages.
- Read the ranked excerpts against the source document. Check the full applicable passage and its version before using the result.
- Change the wording and compare the ranking. Copy or download the result if useful, or Reset input to clear it.
MiniLM encodes short text into comparable vectors
The selected model is Xenova/all-MiniLM-L6-v2, an ONNX conversion of the Sentence Transformers all-MiniLM-L6-v2 model. It represents a sentence or short paragraph as a vector containing 384 numerical values. Those values allow the application to compare a question with candidate passages without requiring identical words.
The Lab uses runonweb’s TextEmbedder with Transformers.js and a quantized model. ONNX Runtime executes it through single-thread WebAssembly inside a dedicated worker. The model was already trained; loading it does not train it on your document. This tool ranks supplied text. It does not compose an answer or operate an autonomous agent.
Follow the question back to an original passage
The application divides your document into short passages, computes a vector for each passage and the query, then compares them using cosine similarity. It returns up to five passages in ranked order. Keeping the original excerpt visible gives the reviewer a concrete source to inspect instead of relying on a rewritten summary.
In the fictional policy, the payment-terms passage should be considered alongside the travel and document-retention passages. Try a question about approval before international travel, then inspect how the order changes. These examples explain the interaction; they do not establish an accuracy rate for your contracts, procedures or terminology.
A similar passage still needs interpretation
Similarity measures a relationship between texts. It is not a probability that a statement is correct, current or applicable. A passage discussing an exception can resemble the general rule you searched for. Names, amounts, negation and document versions may change the decision even when the surrounding wording is similar.
Read the complete applicable section and confirm its source before acting. When the supplied document lacks the answer, a ranked list can still contain the nearest available passages. The public tool does not decide whether a clause applies to a legal matter, approve a finance action or verify that the pasted policy is authoritative.
Keep the document and question within scope
The demo accepts English text up to 20,000 characters, divided into no more than 24 short passages, and a query up to 300 characters. Each passage is bounded by 800 characters and 80 words; the application also checks model tokens and rejects oversized passages or queries. Shorten a difficult input rather than assuming that every long document can fit.
The interface supports English and Arabic, while this selected search tool is offered for English documents. It accepts pasted text rather than PDF uploads, connected drives or a permanent document index. Your source needs its own extraction and permission checks before it reaches a production search system.
Know what local processing downloads and retains
After explicit Load model, the first search load uses approximately 23.7 MB of model and tokenizer assets plus 26.9 MB of runtime files, plus app files. GTC serves these files; the question, document and ranking remain in this tab’s memory. They are not uploaded, logged or used for training. Ordinary hosting requests still generate request metadata, and there is no cloud inference fallback.
Models may be cached and later evicted by the browser. Clear saved models targets the Lab model caches, while ordinary HTTP cache is managed separately. Fully offline access is not promised. Reset or closing clears current input and results; Stop and Unload clear the result but keep input for retry. The Lab’s one-model limit and inactivity deadlines reduce device work, and actual speed depends on the device and browser.
Build a retrieval workflow around accountable sources
An administration team could evaluate retrieval of an approved procedure; a finance team could locate a policy section; a law firm could shortlist passages for a professional to review. These are possible next steps. The demonstration has no connected business repository, user permissions service or approved corpus behind the pasted text.
For an implementation, agree who owns each document, which version is current and which passages each user may retrieve. Test representative questions, misleading near matches and questions with no answer. Define correction and deletion procedures before rollout. Garrich Torres Consultants can scope this retrieval layer and its integrations around one practical task, keeping the original evidence and human decision visible.