How RAG Works
A language model cannot answer questions about a document it has never seen. RAG is the arrangement that fixes that, and it is far simpler than it sounds. Paste any text notes, a policy, a chapter and watch it become a searchable vector store, then ask it something and follow the question all the way through to an answer. Every number on screen is computed from your text, in your browser.
Built for explaining out loud: once a stage has run, click any step in the bar to play that step again on its own.
What you are looking at
The model never learns your document
This is the misconception RAG has to clear up first. No weights change and nothing is fine-tuned. Your text is cut up, indexed, and then at the moment you ask the pieces that match your question are pasted into the prompt. The model reads them for the first time as it answers.
There is no keyword lookup anywhere in it
Every chunk becomes a point. The question becomes a point in the same space, put there by the identical pipeline. Searching is measuring the angle between them, and the cosine of that angle is the whole ranking. You can watch each multiplication that makes up the score.
Everything except the last step
The chunk boundaries, the term frequencies, the idf values, every number in every vector, the cosine similarities, the ranking and the two-dimensional map a real PCA are all computed from your text in your browser. Only the final answer differs: it is extractive, because no language model runs on this page.
Words, not meaning
A production store embeds with a trained neural model, so two chunks can be close without sharing a single word. This one gives each distinct word a dimension, which is real vector search and is what the field ran on before neural embeddings but it matches on words. When that fails, the demo tells you it failed and shows you why.
A demonstration of the mechanism, not a product. The same pipeline, wired to a client’s own documents and a real embedding model rather than to a text box, is what we put into production.
Talk to us about your own problem →