Skip to content

RAG (retrieval-augmented generation)

Retrieval-augmented generation, or RAG, is a technique in which the passages most relevant to a question are searched in a collection of documents and handed to a language model, which then writes its answer from them. It lets a model work with material it was never trained on and that is too large to paste in whole.

Last updated November 8, 2026

  1. Readable on your devices only.

    Your conversation is readable on your device, and on your other devices if you sync them. Nowhere else.

  2. Unreadable to us.

    Your message passes through without being written down; your chats are only ever stored encrypted.

  3. The model doesn’t know you.

    It gets the question, never your email, your account or your IP address.

  4. Nothing is left along the way.

    The reply comes back and is stored here, encrypted; even when you sync, your key never reaches us in the clear.

How a conversation travels on NeverNo. The details are on the transparency page.

How it works

A RAG system has two stages. First, an indexing step cuts each document into passages and turns every passage into an embedding, a list of numbers that captures its meaning. Passages about similar topics end up with similar vectors. Second, at question time, the question is turned into a vector in the same way, the closest passages are found by comparing vectors, and those passages are added to the prompt beside the question. The model then answers using them.

The method addresses two limits of a plain model. It cannot read what it was not trained on, such as your lecture notes, a supplier contract, a product manual or last week’s changelog, and its context window is finite. Retrieval brings in only what is needed, so a library far bigger than the window can still be questioned. It also gives the answer something to stand on: the model can quote the passage it used, which makes a hallucination easier to catch.

The quality of the answer depends on the quality of retrieval. If the right passage is not found, the model has nothing to quote and may fall back on guessing. Passage size matters too: a fragment cut mid-sentence loses its sense, while a chapter-sized block wastes room. Scanned pages, tables and footnotes are common stumbling points. A RAG answer is therefore best read with the quoted passages in view. Typical building blocks are an embedding model, a vector index, a re-ranker, a chunking rule and a prompt template; typical uses are helpdesk bots, legal research, study aids and internal wikis. Hybrid setups combine semantic vectors with classic keyword scoring such as BM25, then rerank the shortlist with a cross-encoder, because exact product codes, surnames and error numbers are matched better by literal terms than by meaning alone.

In NeverNo

NeverNo’s Vault is RAG built around your privacy. The documents you add, in PDF, Word, Markdown, text or code, are kept in your browser in the IndexedDB database named neverno, encrypted with the same key as your conversations. Each document is cut into passages of about 800 tokens, and each passage gets a vector of 1,024 numbers. That vector is computed by a private model at DeepInfra, once, and the search itself is done in your browser, over the vectors stored there.

When “Answer from my vault” is on, a question sends only the passages closest to it, at most 6, or 3 on the free plan, with the document’s name, with that message only, to the model that answers. The rest of your documents never leave. With an anonymized model, the passages reach its maker with the message, under that maker’s rules. GLM 5.3 Flash is a free private model from Z.ai that reads images, and the page about private AI explains where everything is kept.

Worth remembering

  1. RAG searches a collection first, then asks the model to answer from the passages found.

  2. It makes a very large library usable despite a limited context window.

  3. It makes answers easier to verify, since the supporting passage can be shown.

  4. Quality depends on retrieval: if the right passage is missed, the answer suffers.

Frequently asked questions

Is RAG the same as training a model on my documents?

No. Training changes the model itself, which is slow and costly. RAG leaves the model unchanged and only places the relevant passages in the prompt for each question, so your documents can change at any time.

What is an embedding?

It is a list of numbers that represents the meaning of a piece of text. Texts with a similar meaning have vectors that sit close together, which is what makes a search by meaning, rather than by exact words, possible.

Does RAG remove hallucinations?

It reduces them by giving the model real text to rely on, but it does not remove them. The model can still misread a passage or ignore it, so check the answer against the quoted passages. Typical failures are a missed passage, a misread table and an outdated source. Logging which passages were retrieved for each question also helps engineers debug stubborn wrong answers. Freshness matters too: re-index documents whenever they change.

Ask your first question

No account and no card. Write in any of the 10 languages NeverNo speaks.

Open the chat