LangChain from 0 to 1: LLM Shortcomings and How Agents Break Through

LangChain uses chain-based components to fill the three major gaps of large models: knowledge cutoffs, inability to call external systems, and lack of memory and multi-step planning.
The article starts from the Agent execution flow and points out that large models play a core role in intent recognition and task feasibility judgment, but native models have three major shortcomings: knowledge is limited by the training time cutoff, they cannot directly interact with external systems, and they lack state retention and are not good at multi-step planning. LangChain uses a "chain-based" approach to encapsulate model calls, tool calls, context memory, and other steps into reusable components, helping developers fill these engineering gaps. The article argues that LangChain remains the first choice when highly customized agents are needed; higher-level frameworks are efficient but offer limited customization space. It also highlights advanced directions such as message role distinction, synchronous/asynchronous and batch processing, natural language result parsing, and implementation of Agent interaction with external resources, and recommends that beginners master LangChain before moving on to other Agent frameworks.
No matter how powerful large models become, they can't escape a few hard limits: knowledge cutoffs, the inability to call external systems, and the lack of proactive memory. LangChain's value lies precisely in filling these gaps through an engineering-oriented approach, enabling developers to quickly build practical agent projects.
What role do large models play in the Agent architecture
To understand LangChain, you first need to see the Agent's execution flow clearly. A user sends a request; the request enters the large language model, which performs intent recognition and judges whether it can complete the need on its own. For things that require external data, such as checking the weather, the model will clearly state "I can't look that up," and then tools configured by the developer access external resources, retrieve the results, and hand them back to the model for integration before finally returning them to the user.

According to the breakdown in the tutorial by the Bilibili creator, the most central role in this macro flow is the model in the middle: intent recognition depends on it, and so does judging task feasibility. But the model itself has fundamental weaknesses, and these weaknesses are exactly what frameworks like LangChain need to fill.
Three shortcomings large models cannot avoid
Knowledge is limited by the training time cutoff
Large model training has a clear temporal boundary. In the tutorial, DeepSeekAd is used as an example: after turning off deep thinking and smart search and asking the model about its own training time, the model can give approximate milestones for each version, but this means it knows nothing about information after those milestones. Only after enabling web search can the model answer real-time questions. The knowledge cutoff is an innate limitation of native models.
It cannot directly interact with external systems
The model itself has no ability to call external interfaces. Ask it about tomorrow's weather, and it will directly state that it cannot obtain real-time data. Only when the developer provides tools that request external services (such as weather data sources) and then passes the results back to the model can the model organize and reply based on those results.

The tutorial emphasizes that this applies not only to weather but also to connecting with internal business systems: the model cannot do it on its own, and programs must bridge the gap in the middle.
It has no state retention and is not good at multi-step planning
A native model is essentially one question and one answer. On the second question, it does not know what was discussed in the first round. The seemingly coherent conversation in a chat window is actually the result of the program packaging historical messages and feeding them to the model together. Likewise, for chained tasks with fixed steps, such as "first check inventory, then check price, and finally generate a release notification," native models are prone to errors, and developers need to use code to add workflow orchestration capabilities.

Context Window is a key concept for understanding the model's "memory" problem. It refers to the maximum number of tokens the model can receive in a single inference (a token is the smallest unit after text is split; one Chinese character corresponds to roughly 1-2 tokens). The seemingly coherent multi-turn conversation in a chat window is actually the program re-concatenating historical messages into the prompt and sending them to the model each round—because the model itself is stateless and will not automatically remember the previous round's content. The longer the history, the more tokens it consumes; once it exceeds the context window, earlier messages must be truncated or summarized, otherwise the request will fail. This also explains why long conversations tend to "forget things": it is not that the model has a bad memory, but that window capacity is limited. LangChain's memory component is essentially a strategy for managing historical messages under window constraints.
How LangChain fills the gap
The name LangChain itself points to the idea: chaining. It strings together model calls, tool calls, context memory, and other steps into reusable components, so developers do not have to reinvent the wheel. The tutorial's judgment is: for agents that require strong customization, LangChain remains the first choice; by contrast, some higher-level Agent frameworks are efficient but offer relatively limited room for customization. For developers new to large model application development, mastering LangChain first and then looking at other Agent architectures will make the learning curve smoother.
According to the view in the tutorial by the Bilibili creator, LangChain clearly lists multiple core components in its official documentation, and these components cover the complete path from model interaction to external resource integration. When learning, it is recommended to rely on the official documentation; both Chinese and English versions can be referenced. The Chinese version may be slightly limited in some interactive features, but it is fine for understanding concepts.
Chain and LCEL (LangChain Expression Language) are key to understanding LangChain's design. Early LangChain used the Chain class to connect steps such as "prompt template -> model call -> output parsing" in sequence, forming reusable pipelines; later, the official team introduced LCEL, which uses the pipe operator | to compose components declaratively, for example prompt | model | parser, with native support for streaming output, async, batching, and retries. This idea of "composable components" is exactly what distinguishes LangChain from highly encapsulated frameworks: each step is an independent, replaceable building block, and developers can precisely control the behavior of each step instead of being constrained by a framework's black-box logic. Understanding LCEL's composition model means understanding where the "chain-based gap filling" mentioned in the article actually fills in.
Several advanced directions worth paying attention to
The tutorial also points out several areas to expand on later, which are worth building awareness of in advance:
- Message role distinction: Messages interacting with the model belong to different roles. User questions, AI replies, tool call requests, and results each have corresponding APIs for distinction and transmission.
- Synchronous vs. asynchronous, batch operations: The default synchronous interaction blocks the program while the model is processing. For large-scale scenarios, it is necessary to understand asynchronous and batch processing methods.
- Parsing natural language results: The model returns a long natural language string, which is difficult for programs to process directly. How to parse it structurally is an unavoidable problem.
- Implementing Agent interaction with external resources: Note that this is the Agent, not the model itself. How the program side implements external resource calls and lets the model obtain results for analysis is the key to making an agent truly run.
By connecting these steps, the path from model invocation to a runnable project becomes clear. LangChain does not solve the capability ceiling of the model itself, but it consolidates the dirty work on the engineering side into a set of composable interfaces, which is exactly why it has long occupied a place in the Agent ecosystem.
Tool Calling and Function Calling are the underlying mechanisms for interaction between models and external systems. The model does not execute code directly; instead, based on the tool descriptions provided by the developer (name, function, parameter schema), it outputs a structured JSON when needed, indicating "I want to call a certain tool with these parameters." The program parses this JSON, actually executes the function, and then passes the result back to the model as a message. The model continues reasoning or generates the final answer based on it. This mechanism decouples "model decision-making" from "program execution" and is the foundation for an Agent to check weather or access databases. Among the "message role distinctions" mentioned in the article, tool call requests and tool results are exactly two special roles, carrying the model's call intent and the execution return value respectively.
One-line Summary
LangChain uses chain-based components to fill the three major shortcomings of large models: knowledge cutoffs, inability to call external systems, and lack of memory and multi-step planning.
Paragraph Summary
The article starts from the Agent execution flow and points out that large models play a core role in intent recognition and task feasibility judgment, but native models have three major shortcomings: knowledge is limited by the training time cutoff, they cannot directly interact with external systems, and they lack state retention and are not good at multi-step planning. LangChain uses a "chain-based" approach to encapsulate model calls, tool calls, context memory, and other steps into reusable components, helping developers fill these engineering gaps. The article argues that LangChain remains the first choice when highly customized agents are needed; higher-level frameworks are efficient but offer limited customization space. It also highlights advanced directions such as message role distinction, synchronous/asynchronous and batch processing, natural language result parsing, and implementation of Agent interaction with external resources, and recommends that beginners master LangChain before moving on to other Agent frameworks.
Related articles

How to Choose an AI Agent Development Course for Beginners: Five Pitfall-Avoidance Tips
A mechanical engineering career-changer shares five criteria for choosing high-quality AI Agent courses: complete delivery pipeline, resume-worthy projects, real development perspective, update frequency, and coaching feedback. Includes beginner learning path advice.

66 WorkBuddy Hands-On Projects: Building AI Office Workflows from Zero
Drawing on a Bilibili creator's WorkBuddy learning path, we explain why it's seen as the go-to AI office tool for beginners and outline 66 hands-on projects, from setup to AI Agents, in a two-week entry plan.

Vibe Coding for Beginners: The Core Competitiveness of Programmers in the Age of AI-Written Code
What is Vibe Coding? A 15-episode Bilibili tutorial opening explains AI programming's core capabilities and misconceptions: expression, decomposition, and judgment are all essential—not knowing how to code won't let you bluff your way through with AI, and a programmer's core competitiveness is shifting from writing code to assigning work and taking responsibility.