Information retrieval searches an external knowledge source, such as a text corpus or structured database, and returns context that can improve generated answers. In retrieval-augmented generation (RAG), retrieval precedes text generation and supplies relevant facts. section 7.4.2
A practical retrieval pipeline moves through these stages:
- Load a product webpage and split its text into overlapping chunks. section 7.4.2
- Represent chunks as embeddings and persist them in a Chroma vector database. section 7.4.2
- Query the store through LangChain, then pass retrieved context to an LLM. section 7.4.2
Product commentary
A RAG application queries a smartphone description stored from an HTML page and generates a concise answer about the New SmartX 2023, returning source documents alongside the result. section 7.4.2
Figure 7.13 A RAG-based system
Use the architecture diagram to trace the flow from external product text through retrieval to generated commentary. section 7.4.2










