LangChain
Définition
LangChain est un framework for building LLM applications: chains, agents, tools, and RAG pipelines. It abstracts providers, prompts, and récupération for quick prototyping and production.
Il complète LlamaIndex (which emphasizes les données et l'indexation); LangChain emphasizes chaînes composables et boucles d'agents. Utilisez-le quand you need RAG, agents with tools, or multi-step prompt workflows with minimal glue code.
Comment ça fonctionne
On compose des composants : LLM (OpenAI, Anthropic, local, etc.), prompts, récupérateurs (vector stores, embeddings), and tools (APIs, search, code). Chains wire them in sequence (par ex. prompt → LLM → parser). Agents add a loop: LLM decides which tool to call, you execute it and append the result, repeat until the LLM returns a final answer. LangSmith provides tracing and evaluation. Integrations cover many vector databases, document loaders, and tool APIs. Start with a template (par ex. RAG, agent) and swap or add components as needed.
Cas d'utilisation
LangChain is used to assemble LLM apps quickly: RAG, agents, and workflows with minimal boilerplate.
- Building RAG pipelines and document Q&A applications
- Implementing agents with tools (search, APIs, code)
- Rapid prototyping of LLM workflows with minimal boilerplate