文章

第一章:大模型基础

  在人工智能的演进历程中,大语言模型(LLM)的快速发展催生了全新的技术范式。LLM 是 Agent 的”认知中枢”与”决策大脑”,赋予智能体理解复杂意图、规划长程任务、动态调用工具以及反思纠错的核心能力。当 LLM 的”思考力”与外部工具、记忆系统及环境交互所提供的”执行力”深度融合,Agent 便突破了传统软件依赖硬编码规则和固定流程驱动的局限,实现了从”被动响应的文本生成器(Chatbot)”向”自主解决现实问题的行动主体(Agent)”的跨越式演进。

  然而,要构建一个真正能够在生产环境中落地的 Agent,仅仅拥有一个聪明的”大脑”远远不够。本教程不涉LLM及底层数学推导、参数微调或分布式训练等”炼丹”细节,而是将视角上移至系统架构与工程应用层,把大模型视为 Agent 系统的核心引擎。我们将重点探讨如何通过 Agent 工程(Agent Engineering),以大模型为核心,运用上下文工程(Context Engineering)对模型所需信息进行系统组织与动态管理,并有机整合工具调用(Tool Use)、知识增强(RAG)和记忆管理(Memory)等关键能力,构建具备高可靠性、强可控性与可量化评估能力的 Agent 架构。

Chapter 1: Fundamentals of Large Language Models

  In the evolution of artificial intelligence, the rapid development of Large Language Models (LLMs) has given rise to an entirely new technological paradigm. LLMs serve as the “cognitive hub” and “decision-making brain” of an Agent, endowing intelligent agents with the core capabilities to understand complex intentions, plan long-range tasks, dynamically invoke tools, and reflect on and correct errors. When the “thinking power” of LLMs deeply integrates with the “execution power” provided by external tools, memory systems, and environmental interactions, Agents transcend the limitations of traditional software that relies on hard-coded rules and fixed process flows, achieving a leap from “passively responsive text generators (Chatbots)” to “autonomous actors that solve real-world problems (Agents).”

  However, building an Agent that can truly be deployed in production requires far more than just a clever “brain.” This tutorial does not delve into the underlying mathematical derivations, parameter fine-tuning, or distributed training of LLMs, but instead shifts the perspective upward to the system architecture and engineering application layer, treating the LLM as the core engine of the Agent system. We will focus on exploring how, through Agent Engineering, to use the LLM as the core, apply Context Engineering to systematically organize and dynamically manage the information needed by the model, and organically integrate key capabilities such as Tool Use, knowledge augmentation (RAG), and Memory Management, to build Agent architectures with high reliability, strong controllability, and quantifiable evaluation capabilities.