Send your document down the RAG factory line.
Every machine is a real pipeline step running on real data. Load files, ask a question, then tap any machine to open it.
READY · load files or ask a question
Below the floor
Every station, explained.
- 01—
Parse
Your file is turned into plain text. PDFs only store letters and where they sit on the page, so the reader rebuilds sentences in reading order.
- 02—
Chunk
The text is cut into ~800-character chunks, preferring paragraph and sentence breaks. Each chunk repeats the last 120 characters of the one before, so an idea that straddles a cut survives whole somewhere.
- 03—
Embed
An embedding model turns every chunk into 1,024 numbers: a point in "meaning space". Chunks about similar things land near each other.
- 04—
Vector store
The vectors are saved in Pinecone, a vector database, under a private namespace. The galaxy shows them squashed from 1,024 dimensions to 3 with PCA.
- 05—
Keyword index
In parallel every word is counted into a keyword index (BM25), the classic search-engine method. Words that are rare in the library but frequent in a chunk count the most.
- 06—
Ask
Your question enters the pipeline. The search mode decides which retrievers run: keyword, semantic, or both fused together (hybrid).
- 07—
Embed question
The question is embedded with the same model, so it becomes a point in the same space as the chunks: the amber probe in the galaxy.
- 08—
Keyword search
BM25 scores chunks by the words in your question. A rare word appearing often in a chunk scores high, which is why exact names, codes and jargon shine here.
- 09—
Semantic search
Vector search returns the 20 chunks whose vectors point the same way as the question (cosine similarity), even if they use different words.
- 10—
Fuse (RRF)
Reciprocal Rank Fusion merges both lists. Each chunk earns 1 / (60 + rank) from every list it appears in, so chunks both retrievers agree on rise to the top.
- 11—
Rerank
A cross-encoder reads the question and each candidate together and rescores it: slower than comparing vectors, but much sharper. The best 5 move on.
- 12—
Prompt
The winning chunks are numbered and packed into the prompt with instructions and your question, inside the model's token budget.
- 13—
Generate
The language model writes the answer one token at a time and cites the numbered chunks as [n]. Click a citation to see exactly where it came from.
- 14—
Evaluate
A second, smaller model grades the run: is each claim backed by the chunk it cites, does the answer address the question, were the retrieved chunks relevant?
- 15—
Trace tape printer
Every run is traced like a production service: how long each step took, how many tokens went in and out, and what it cost.
- 16—
QA lab: which search wins?
The same golden questions run through four retrieval set-ups. Recall@5: did the right chunk make the top 5? MRR: how high was the first right chunk? nDCG@10: how good is the whole top 10?