Index

RAG (Retrieval-Augmented Generation)

RAG
RAG · Open board

The RAG board from the How LLMs Work track. It draws a question going out to a library before it ever reaches the model. This lesson is the story of a lawyer who skipped that step, and of the paper that had already shown what to do instead.

Before you start. You need Tokens & Embeddings, which turned any piece of text into a point in space, positioned so that two texts about the same thing land near each other - that nearness is the only machinery this lesson uses. Text is measured in tokens there, chunks of roughly three quarters of a word. You also need one fact from From Transformer to LLM: a model’s knowledge is baked into its dials during training and does not change afterwards.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

The returns desk cuts its policy into pieces and hands the model the best few. How big should a piece be, and how many should go in?

Drag How many words in each piece from 5 to 200 and watch Answers that arrived whole climb while the tokens grow.

Open The chunk size →

Related paper

Review AI →

Saved in this browser, and to your account when you sign in.