Zubnet AIAprenderWiki › LangChain
Herramientas

LangChain

Un framework open-source popular para construir aplicaciones con modelos de lenguaje. LangChain provee abstracciones para patrones comunes: conectar LLMs a fuentes de datos (RAG), construir chains multi-paso de llamadas LLM, gestionar memoria de conversación, usar herramientas y orquestar agentes. Soporta múltiples proveedores (Anthropic, OpenAI, modelos locales) a través de una interfaz unificada.

Por qué importa

LangChain es el framework de aplicación LLM más ampliamente usado, lo cual significa que lo encontrarás en tutoriales, descripciones de trabajo y codebases existentes. También es controvertido — los críticos argumentan que añade abstracción innecesaria sobre simples llamadas API. Entender lo que hace LangChain (y cuándo usarlo vs. llamadas API directas) te ayuda a tomar decisiones arquitectónicas informadas.

Deep Dive

LangChain's core abstractions: Models (unified interface to LLM providers), Prompts (templates with variables), Chains (sequences of LLM calls and processing steps), Agents (LLMs that decide which tools to use), Memory (conversation state management), and Retrievers (connections to vector databases and other data sources). These compose: a RAG chain connects a retriever to a model via a prompt template.

The Controversy

LangChain is divisive in the developer community. Proponents value the unified abstractions, the breadth of integrations, and the speed of prototyping. Critics argue that the abstractions are leaky (you need to understand the underlying APIs anyway), the code is hard to debug (too many layers between you and the API call), and that simple applications are better served by direct API calls. The consensus seems to be: LangChain is good for prototyping and complex multi-step workflows, but simple applications often don't need it.

LangGraph and LangSmith

The LangChain ecosystem expanded beyond the core library. LangGraph handles complex agent workflows as state machines (better for multi-step agents than linear chains). LangSmith provides observability — tracing, evaluation, and monitoring for LLM applications. The ecosystem addresses real needs, but the complexity of the full stack is a valid concern for teams that need to maintain and debug these systems in production.

Conceptos relacionados

← Todos los términos
← KV Cache Large Language Model →