LangChain is a framework for connecting language models with external sources and assembling context-aware applications. Its central idea is a chain: components from different modules working together. section 7.4.2
A chain can combine:
- LLM wrappers for providers such as OpenAI and Hugging Face. section 7.4.2
- Prompt templates for chatbot and question-answering tasks. section 7.4.2
- Indexes that supply additional context from external data. section 7.4.2
Product-description RAG application
Load an HTML product page, split it into overlapping chunks, generate embeddings, persist the chunks in Chroma, and connect the store to a RetrievalQA chain. A prompt restricts answers to retrieved context, while ChatOpenAI generates the response and returns source documents.
Figure 7.13 A RAG-based system
Architecture diagram for the retrieval-augmented generation system. section 7.4.2


















