A question can be answered more effectively when a system first finds relevant information in an external collection. In retrieval-augmented generation (RAG), that search happens before a large language model (LLM) writes its answer. The available description does not specify how relevance is measured, so it does not establish a particular similarity-search algorithm. section 11.42
Answering from a document collection
Suppose a user asks about a company policy. A retrieval system searches company documents for relevant passages. The question and retrieved information then go to the LLM as a combined prompt, giving it context beyond what it learned during training. section 11.42
This is a different goal from finding a path through a maze. Maze search explores possible moves toward a goal and may seek the fewest steps; document retrieval seeks information relevant to a question. Neither example, by itself, explains how to calculate similarity between documents and questions. section 2.3 section 11.42





















