jargon

Applied AI·Embeddings and retrieval

you look up the relevant bits of your own documents first and paste them into the prompt, so the answer comes from your data instead of the model's memory.

Retrieval-augmented generation (RAG)

Also calledRAG

Draft summary, pending review

The pattern of retrieving relevant chunks and placing them in the prompt so the model answers from your data instead of its memory: embed and index at write time, retrieve and generate at read time. Script 7 is the whole thing in 80 lines; production RAG is those 80 lines plus retrieval quality work.
chunksQuestionRetrieverYourdocumentsPromptModelAnswer

Commonly confused with