Card book

RAG

In the kitchen: The house handbook

The AI looks things up before answering, so it talks about your real facts.

What it is

RAG (retrieval-augmented generation) works in two steps. First retrieval: find the passages in a knowledge base that match the question. Then generation: put them in the context with the question, and have the AI answer from them. Things it never learned, things that are new, things only you know: it can get those right too, and say where it read them.

In the AI Kitchen

In the AI kitchen, the knowledge base is the house handbook. Ask about opening days with the book shut and the chef can only say it doesn't know. Open it, look up the opening hours page, hand that over with the question, and it answers from the book, page number and all.

In real life

Company help bots, AIs that read the files you upload, AI search that looks at today's web pages: they all work this way. Real systems mostly use vector search, which finds passages close in meaning; this scene searches by words. Same idea either way: find the right material first, then hand it to the model.

Where to try it

Related concepts