Overview of out-of-the-box components
LangChain offers a comprehensive suite of pre-built components that facilitate the development of sophisticated language model applications. These components are organized into four primary categories: retrieval-augmented generation (RAG), storage and indexing, extraction, and agents:
- RAG: As we explored in previous chapters, RAG enables language models to go beyond their static knowledge by dynamically retrieving relevant information from external sources—typically document stores or vector databases—before generating a response. LangChain provides native support for the full RAG lifecycle:
- Document ingestion and chunking: Source materials (such as PDFs, Notion pages, HTML, or markdown) are loaded and broken into semantically meaningful chunks using flexible TextSplitters. These chunks are more manageable for embedding and retrieval.
- Embedding generation: Each chunk is embedded into a high-dimensional...