Zubnet AILearnWiki › LangChain
Tools

LangChain

A popular open-source framework for building applications with language models. LangChain provides abstractions for common patterns: connecting LLMs to data sources (RAG), building multi-step chains of LLM calls, managing conversation memory, using tools, and orchestrating agents. It supports multiple providers (Anthropic, OpenAI, local models) through a unified interface.

Why it matters

LangChain is the most widely-used LLM application framework, which means you'll encounter it in tutorials, job descriptions, and existing codebases. It's also controversial — critics argue it adds unnecessary abstraction over simple API calls. Understanding what LangChain does (and when to use it vs. direct API calls) helps you make informed architectural decisions.

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.

Related Concepts

← All Terms
← KV Cache Large Language Model →