Question and record vectors, 384 dimensions
intfloat/multilingual-e5-small
The model runs in your browser. Search runs on the Kutup server, and every sentence of the answer is checked against the source it cites.
Four steps: the server searches, the browser filters the passages, the model writes, and every sentence is compared with its source.
You type the question in the browser.
Word and meaning search. The browser makes the question vector.
Each candidate gets a 0–1 score. Below 0.3, or below 0.35 × the best, it never reaches the model; the best must reach 0.5.
There are three paths.
Up to 3 targeted queries on Brave Search. The server fetches pages and picks passages.
Kutup NQ, 0.6 billion parameters, writes the answer in one pass.
Each sentence is compared with the passage it cites.
The cited answer and the Checks tab.
The question goes to the Kutup server for search. The model and the answer stay in your browser.
The Kutup server searches two ways: records that share the question’s words (BM25) and records that mean the same thing (vector search). The two ranked lists are merged into one.
Word search: BM25 over each record’s body, title and keywords. For each query word q:
g squashes raw BM25 into 0–1; cov(d) is the share of the question’s words found in the record. The result is not a probability.
Meaning search: the browser turns the question into a 384-dimensional unit vector with multilingual-e5-small (prefix “query: ”; records were encoded beforehand with “passage: ”). The server scores every record vector by cosine similarity; record vectors are stored in 8 bits with one scale per row:
Fusion: the two lists are merged by reciprocal rank fusion (RRF). Ranks are added rather than scores, so two different scales become comparable:
| Setting | Value | Note |
|---|---|---|
| BM25 keep | ≥ max(0.10, 0.55 · top) | at most 8 per dataset |
| Merge | 5 per dataset | Turkish question: Turkish datasets ×2.0, others ×0.92; English question: Turkish ×0.88, others ×1.12 |
| Cosine floor | 0.80 | at most 12 meaning hits |
| Candidate pool | 24 | by RRF order |
| Index | 4,213 × 384 | 4-byte scale + 384 bytes per row |
Source NQ/backend_php/src/retrieval.php · NQ/backend_php/src/dense_search.php · NQ/backend_php/router.php · NQ/frontend/src/js/local/helpers-core.js
Every passage found is read together with the question by a small reranking model in the browser and scored from 0 to 1. Weak passages never reach the model; if the evidence is not enough, the answer says so.
The cross-encoder in the browser (mMiniLMv2 mMARCO) reads each (question, passage) pair together and outputs one logit; a sigmoid turns it into a 0–1 score. For multi-part questions each part is scored too and the highest is taken; web results are multiplied by their source type:
s_max: the highest score among the candidates. At most 3 passages are kept, highest first; headlines separately, at most 2 (threshold 0.3).
Three outcomes: if the best score reaches 0.5 and every part is covered, the model writes; if only some parts are covered, it writes and names the missing parts; otherwise the answer says the evidence is not enough and offers a web search. A part counts as covered when its own best passage reaches 0.5.
| Setting | Value | Note |
|---|---|---|
| Normal thresholds | 0.30 · 0.35 · 0.50 | keep · ratio · enough |
| Strict thresholds | 0.45 · 0.50 · 0.60 | after a reader disputes an answer |
| Candidates | 10 + 6 | passages + headlines |
Source NQ/frontend/src/js/local/controller.js · NQ/frontend/src/js/local/helpers-core.js
| What is used | Library | Auto | Web + verify |
|---|---|---|---|
| Kutup records | Always | Always | Always |
| Wikipedia, news | When needed | When needed | When needed |
| Web search | No | Asks if short | Always |
| Sentence check | Every on-device answer | Every on-device answer | Every on-device answer |
Wikipedia and news are added when the library returns fewer than 8 results or the question calls for them. Sentence check runs on every on-device answer once the helper models are loaded.
A web result’s relevance score is multiplied by its source type’s weight
The answer is written by Kutup NQ, Qwen3-0.6B with every weight retrained: 28 identical blocks, 596 million parameters. It runs in your browser with wllama.
Each block is two sub-layers with residual connections. Normalisation is RMSNorm, attention has 16 query and 8 key/value heads (GQA, head size 128, positions by RoPE), the feed-forward is SwiGLU:
M is the causal mask that hides later tokens; query head i uses key/value head g(i).
W₁ gate, W₂ up and W₃ down projections; ⊙ is element-wise product.
ŷ_t: RMSNorm of the last block’s output at position t. The output reuses the embedding table E (tied weights).
| Setting | Value | Note |
|---|---|---|
| Blocks · hidden · feed-forward | 28 · 1024 · 3072 | |
| Query / key-value heads | 16 / 8 · 128 | head size |
| RoPE θ | 1,000,000 | trained context 40,960 tokens |
| Parameters | 596 M | 28 × 15.7 M per block + 155.6 M embedding |
Source Qwen/Qwen3-0.6B config.json · NQ/local/model/*.gguf
Writing goes token by token. Temperature is 0, so the most likely token is chosen at every step; logits of tokens already used are weakened by 1.05 (repeat penalty):
Only for tokens v already in the context; other logits are unchanged.
| Setting | Value | Note |
|---|---|---|
| Context window | 1,536 | prompt and answer together |
| Longest answer | 380 | tokens |
| Temperature · top-k · repeat penalty | 0 · 40 · 1.05 | top-k has no effect at temperature 0 |
| Source length | 700 · 520 · 420 | most characters for [1], [2], [3]; headlines as [R1], [R2] |
| KV cache | q8_0 · flash attention | CPU threads when WebGPU is missing |
Source NQ/frontend/src/js/local/llm.js · NQ/frontend/src/js/local/prompt.js
Every sentence of the answer is compared with the passage it rests on. Supported sentences stay, unproven ones are marked, and contradicted ones or ones that lean on the wrong source are removed. A small inference model does the comparison.
PLC/SCADA logs and hidden aliasing
Stamp time at the source
The arrival time of a packet is not the time of the event [2].
supportedSource 2 says so.
This difference makes the sampling rate deviate from the Nyquist criterion [1].
removedIt leans on source 2’s point, but cites [1], which does not support it.
A PLC failure is directly tied to the source time stamp [2].
removedContradicted by source 2.
The natural-language inference (NLI) model gives a (passage, sentence) pair three logits; softmax turns them into probabilities. A cited sentence is paired with the passages it cites, an uncited one with every passage:
e: entailment, n: neutral, c: contradiction.
K: the set of stems; a stem is the first 5 letters of a word of 5+ letters. The small NLI model misses paraphrased lists, so word overlap counts too.
The verdict, in this order:
Sentences under 25 characters, tables and quotes are not checked. The check runs only when the helper models are loaded and writing was not stopped. Whether each figure in the answer appears in the sources is shown separately in the Checks tab.
Source NQ/frontend/src/js/local/controller.js · NQ/frontend/src/js/local/helpers-core.js
Question and record vectors, 384 dimensions
intfloat/multilingual-e5-small
A 0–1 score for each candidate
cross-encoder/mmarco-mMiniLMv2-L12-H384-v1
Support or contradiction between a sentence and its passage
MoritzLaurer/multilingual-MiniLMv2-L6-mnli-xnli
All three run with onnxruntime-web (WebAssembly) in a browser worker. Kutup did not train them; they are separate from the answer model.
Kutup NQ is not a LoRA add-on: all 596 million weights were retrained on cited answers written by a larger teacher model (a full fine-tune).
Each example is a prompt (question + numbered sources) and the teacher’s answer. The loss is computed on answer tokens only; prompt tokens are masked:
First the warm-up (s < s_w), then the cosine (s ≥ s_w). s is the step, S the total steps, s_w = 0.03·S.
| Setting | Value | Note |
|---|---|---|
| Optimiser | AdamW | weight decay 0.01 · gradient clipping 1.0 |
| Batch | 8 × 4 = 32 | 8 per device, 4 accumulation steps |
| Length | 1,536 | tokens, most per example |
| Epochs | 3 | best epoch 2, held-out loss 0.918 |
| Precision | fp32 + bf16 | fp32 master weights, bf16 compute |
| Data | 12,957 / 411 | train / held out; teacher Qwen3.5-35B-A3B |
Source dev/nq_local/colab/d_train.py · NQ/local/model/model.json
Quantisation stores the weights in fewer bits: the file shrinks and perplexity rises a little. The browser downloads the Q4_K_M file, about 397 MB.
Measured on held-out answers in 1,024-token windows. Lower means the model predicts the text better.
The Q4_K_M file uses 5.32 bits per weight on average (above 4.5 because the embedding table stays in Q6_K). Its perplexity is 4.2% above bf16. Quantisation used an importance matrix (imatrix): on 691 chunks of training examples, each weight’s effect on the output was measured and rounding error was kept small where it matters.
Source dev/nq_local/colab/f_export.sh · NQ/local/model/model.json
| On device | Cloud | |
|---|---|---|
| Where is search? | Kutup server (word and meaning search); the question vector is made in the browser | Kutup server |
| Who writes the answer? | The Kutup NQ local model (0.6 billion parameters), in the browser | A larger cloud model (OpenRouter) |
| First use | The model (397 MB) and helper models (107 MB) download once, then open from the cache | No download |
| Speed | Depends on your device; fast with WebGPU, otherwise CPU threads | Usually fast; needs the network |
| Limit | Server search quota: 60 an hour, 300 a day. Web search: at most 20 requests an hour per visitor and 300 a day for the whole site. | 10 messages an hour, 20 a day |