Suppose you ask an AI assistant which restaurants are worth visiting tonight. Its training data may not reflect current reviews. Information retrieval lets it look for relevant information outside that data before answering—for example, by searching a review site or stored documents. section 10.20
In retrieval-augmented generation (RAG), a language model forms or uses a query, retrieves information, and draws on the results to generate a response. Sources can include web search results, past conversations, and documents in a vector database. A vector database searches representations of text that capture similarities in meaning, so a prompt can bring back related material. section 5.7 section 10.20
A more relevant recommendation
Asked for vegan restaurants in Copenhagen, a retrieval-enabled assistant might draw on an earlier rejected steakhouse recommendation, find relevant Yelp reviews, and use both to suggest better options. The answer depends on what it retrieves, not just what the model learned during training. section 10.20
Retrieval can help with fresh facts and reduce invented answers, but it does not make an answer automatically trustworthy. The assistant must recognize when to search, find useful results, and summarize them correctly; the sources themselves may also be unreliable. Citations give people a way to inspect the evidence behind a response. That matters when using AI summaries to learn about a developing scientific field or an ongoing conflict: check consequential claims against credible sources. section 5.7 section 6.7
Figure 10.4 A schematic diagram for an LLM accessing data stored in a vector database and retrieving search results from the web
The diagram traces how an assistant can draw on stored data and web search results before responding. section 10.20










