--- title: "LangChain" type: entity tags: [llm, framework, rag, document-loading] sources: ["RAG从入门到精通系列1:基础RAG"] last_updated: 2026-04-16 --- ## Basic Information - **Type**: LLM Application Framework - **Source**: RAG从入门到精通系列1:基础RAG ## Definition LangChain is a framework for building LLM applications, providing over 160 different document loaders for loading data from various sources, as well as components for building RAG pipelines. ## Key Features - **Document Loaders**: 160+ loaders for various data sources - **Chain Abstraction**: Link retrieval and generation components together - **Retriever Interface**: Unified abstraction for retrieval components - **PromptTemplate**: Template system for constructing prompts - **Integration**: Works with various LLMs (Qwen, GPT-4, Claude, etc.) and vector databases (Qdrant, Chroma, Pinecone, etc.) ## Applications in RAG - Loading external documents via document loaders - Splitting documents into chunks (Splits) - Creating retrievers from vector stores - Chaining retrieval and generation into a unified pipeline - Converting raw AIMessage outputs to clean string results ## Related Concepts - [[RAG]]:LangChain is commonly used to build RAG pipelines - [[LlamaIndex]]:Alternative framework for building LLM applications - [[向量数据库]]:Vector stores integrated with LangChain - [[Qdrant]]:Vector database mentioned in RAG tutorials ## Related Entities - [[Qwen]]:LLM often used with LangChain