Chapter 1 of 7
How RAG came to be
Larkspur Supply Co. (made up) sells hardware to about 4,000 businesses. Staff lose hours searching documents. You join the team building an AI assistant that answers from them.
This chapter: Why can’t an AI model answer questions about your company, and how did the industry arrive at RAG?
About this chapter
You will learn
- Why a language model invents confident answers about things it never read
- What Retrieval-Augmented Generation (RAG) is, in one sentence
- Why RAG was essential in 2023, and why today it is one tool an AI agent can choose to use
Words you’ll meet
- LLM
- Large language model. It writes text by predicting what comes next, using what it learned in training and what is in its prompt.
- Training data
- The text a model learned from. Your company’s private documents were never part of it.
- Context window
- How much text a model can read in one request, counted in tokens (a token is about ¾ of a word).
- RAG
- Retrieval-Augmented Generation: look up the relevant passages first, then have the model answer from them.
- Tool calling
- A model asking the software around it to run something, such as a search, and reading the result.
Step 1 of 6
It’s 2023. An employee asks the company’s new AI assistant, an , about a customer contract.