instibrain
instibrain  /  guides  /  rag

Retrieval beside your brain, in eight short lessons.

AI basics said what a vector, an embedding and a chunk are. These lessons run a retrieval pipeline beside the brain: what goes in it, the job that builds it, the cuts, hybrid search, the reranker, the prompt, the measure that says which step failed, and where your pages sit.

Every number is computed on the page or is a list price. Lesson 3 has a live toy that cuts a page.

what you learned

The numbers to hold.

Each is computed in its lesson, from the counts given there and Claude's list prices.

NumberWhat it is
200,000 tokens400 pages at 500 tokens: a fifth of the window, read whole.
50,000,000 tokens5,000 documents of 20 pages: fifty windows, so an index.
$5, then $0.001The first embedding run at $0.10 per million, then one changed 20-page document.
150 to 600 wordsOne chunk, 200 to 800 tokens, cut on structure.
1 / (60 + rank)Rank fusion: a chunk's score in each list, added up.
26,000 tokensWhat a reranker reads for 50 chunks of 500 and a 20-token question.
$0.0053 + $0.0015One question on Sonnet 5.5: 2,630 tokens in, 150 out.
80%Recall at 5 on twenty questions, the line under which retrieval is fixed first.