← → 翻页 · 1–4 跳幕 · L 切换语言 · ESC 总览← → Navigate · L Language · ESC Overview

从「会聊」到「会干」:Agent 浪潮下的大模型演变 From "Chatting" to "Doing": The Evolution of Foundation Models in the Agent Wave

2026年起,AI 正从「回答问题」迈向「交付结果」。 Since 2026, AI has been moving from answering questions to completing tasks.

主讲人:肖睿璇 RosheenSpeaker: Xiao Ruixuan (Rosheen)
01
智能体Agent
智能体演变 · 概念、架构与工程演进Agent Evolution · concepts, architecture & engineering
02
应用实践Use Cases
应用实践 · 从个人能力到行业案例Use Cases · from personal skills to industry cases
03
行业概览Overview
行业概览 · 2026 产业坐标与两条路线Industry Overview · 2026 landscape & two routes
04
Token 经济Token Economics
Token 经济学 · 价值公式与消耗结构Token Economics · value formula & consumption
05
智谱AIZhipu AI
智谱AI · GLM 模型矩阵与规模化方法Zhipu AI · GLM lineup & scaling
06
附件Appendix
附件:模型训练与推理(训练在前)Appendix · training first, inference second
— 2026 · 第 1 页 / 共 43 页Page 1 / 43 —
重新定义 AI · Redefining AIRedefining AI
ACT I · AGENT · 02 / 43
破题The Opening

重新定义 AI:从对话工具到执行系统Redefining AI: from a Chat Tool to an Execution System

旧认知 · 问答Old view · Q&A
AI = 具备对话能力的 ChatGPT、辅助起草邮件的智能助手AI = a conversational ChatGPT, an assistant that drafts emails
  • 人问 → 机答 → 结束You ask → it answers → done
→
新现实 · 执行New reality · Execution
2025年起,从「问答」到「执行」的范式跃迁Since 2025, a paradigm shift from Q&A to execution
  • 给目标 → 自主拆解 → 调用工具 → 交付结果Give a goal → it decomposes → wields tools → delivers
Agent = 自主思考 + 调用工具 + 任务完整交付 —— 从问答到执行的范式跃迁 Agent = autonomous reasoning + tool use + complete delivery — the shift from Q&A to execution
智能体演变ACT I · AGENT
第 2 页 / 共 43 页Page 2 / 43
Agent 的结构 · AnatomyAnatomy of an Agent
ACT I · AGENT · 03 / 43
系统架构与核心组件Architecture & Core Components

Agent 的结构Architecture and Components of an Agent

Agent 系统架构:四大模块环绕 LLM 中枢Agent Architecture: Four Modules Around LLM Core

LLM 为大脑;记忆 / 工具 / 规划 / 行动 为四肢;行动层之下挂载两个 Agent,借助环境反馈相互协同。LLM is the brain; Memory / Tools / Planning / Action are limbs; two Agents hang below Action layer.

记忆Memory 长期记忆Long-term 情境记忆Contextual 工具Tools 插件Plugins 外部APIExternal API 规划Planning 任务分解Decompose 自我反思Reflect LLM 大脑Brain 行动Action Agent Agent 环境感知对话Env. Feedback

附图 · Agent 系统架构:LLM 中枢与四模块协同Fig: Agent Architecture – LLM Core & Four Modules

Agent 的核心组件 · 按来源分类Core Components · by Source
A
Augmented LLMAugmented LLM
ANTHROPIC · OPENAI 共识 · 内核Anthropic · OpenAI consensus · core
  • 大脑 · Agent LoopBrain · Agent Loop
  • LLM + Instructions(指令 / 角色)LLM + Instructions (prompt / role)
  • Retrieval · 检索 / RAGRetrieval · Searching / RAG
  • Memory · 记忆 / 上下文Memory · context
内核抽象层 · Claude/GPT 类产品Core abstraction · Claude/GPT-class
B
Tools + MCPTools + MCP
OPENAI + MCP 官方 · 能力接入OpenAI + MCP official · capability
  • Tools · Function tools(OpenAI)Function tools (OpenAI)
  • MCP · 工具连接协议(USB-C)MCP · tool protocol (USB-C)
  • 三原则:Tools / Resources / PromptsThree: Tools / Resources / Prompts
USB-C 接口 · 工具生态标准USB-C interface · tool-ecosystem standard
C
SkillsSkills
ANTHROPIC 自家 · 上层能力Anthropic skill.md · upper layer
  • 封装可复用能力Encapsulated reusable capabilities
  • 如html-ppt / blog-writer 等Named skill examples like html-ppt / blog-writer
  • 最终也通过 Tools 落地Also implemented via Tools
上层能力封装 · SKILL.md 单元Upper-layer capability · SKILL.md unit
D
飞书 CLIFeishu CLI
平台集成 · CLI 范式Platform integration · CLI paradigm
  • 与 A/B/C 互补的第四种接入方式A fourth access pattern complementing A/B/C
  • 独立于模型层与协议层的直接调用通道A direct channel outside model & protocol layers
  • 属 CLI 范式工具A CLI-paradigm tool
  • Agent 通过 shell 命令(text-in/text-out)直接调用飞书Agent calls Feishu via shell
CLI 范式 · text-in/text-outCLI paradigm · text-in/text-out
智能体演变ACT I · AGENT
第 3 页 / 共 43 页Page 3 / 43
Agent 实例 · OpenClaw 产品设计Agent Example · OpenClaw
ACT I · AGENT · 04 / 43
Agent 实例Agent Example

OpenClaw 小龙虾的产品设计理念OpenClaw: Product Design Philosophy

~/.openclaw/workspace/ 下的 8 个文件 + 1 个目录,构成 Agent 的完整人格 —— 文件顺序即优先级。Eight files and one directory under ~/.openclaw/workspace/ compose the agent's complete persona — file order is priority.

~/.openclaw/workspace/
AGENTS.md←操作指令(每次会话加载)Operating instructions (loaded every session)
SOUL.md←人格 / 语气 / 风格(每次会话加载)Persona, tone, style (loaded every session)
TOOLS.md←本地工具备注(每次会话加载)Local tool notes (loaded every session)
MEMORY.md←长期记忆(仅在主会话 / 私聊中加载)Long-term memory (main session / DM only)
IDENTITY.md←身份信息Identity
USER.md←用户信息User profile
HEARTBEAT.md←心跳检查清单Heartbeat checklist
BOOTSTRAP.md←首次启动(完成后删除)First boot (deleted after setup)
memory//←每日笔记 YYYY-MM-DD.mdDaily notes YYYY-MM-DD.md

文件顺序即优先级。AGENTS.md 定义能力边界,SOUL.md 注入灵魂,TOOLS.md 划定禁区,这 8 个文件共同构成 Agent 的完整人格。File order is priority: AGENTS.md bounds its capabilities, SOUL.md breathes in the persona, TOOLS.md marks the no-go zones — together these eight files compose the agent's complete personality.

智能体演变ACT I · AGENT
第 4 页 / 共 43 页Page 4 / 43
智能体演变 · 工程脉络Agent Evolution · Engineering Path
ACT I · AGENT · 05 / 43
智能体演变Agent Evolution

AI 系统工程演进AI Systems Engineering Evolution

一条能力阶梯,每一级都将模型「向场景更推进一步」。loop engineering 是当下正在书写的下一级。A capability ladder — each rung pushes the model one step closer to the scene. Loop engineering is the rung being written now.

2022–24 prompt engineering 代表 · ChatGPTExemplar · ChatGPT 自然语言一问一答Natural-language Q&A 免训练直接出活Works out-of-the-box, no training 对话阶段Dialogue stage 上一级:自由问与答Prev level: free Q&A 下一级:引入外部数据Next level: bring in external data 2025 context engineering 代表 · RAGExemplar · RAG 接上窗口外的知识Attach knowledge beyond the window 不再只知训练数据No longer only training data 检索阶段Retrieval stage 上一级:编排 promptPrev level: prompt orchestration 下一级:给模型工具Next level: give the model tools 2025–26 harness 代表 · Claude Code / OpenClawExemplar · Claude Code / OpenClaw 给模型工具与 shellGive the model tools & shell 从「会说」到「会做」From "can talk" to "can do" 执行阶段Execution stage 上一级:被动接数据Prev level: passively fed data 下一级:驱动模型自主跑通闭环Next level: drive the model to close the loop itself 2026 – 现在2026 – now loop engineering 代表 · ?Exemplar · ? 杀手级产品还没定型Killer product not yet defined 正在被写出来Being written right now 正在写Writing now 上一级:单轮能做事Prev level: single turn 下一级:成型后方见分晓Next level: TBD once it forms
附图 · AI 系统工程演进:四个阶段Fig · AI engineering evolution: four stages
① 上下文规模 ↑① Context size ↑
从一句话,到一整段,再到跨源检索后拼装喂入。From one sentence, to a whole passage, to cross-source retrieval assembled & fed in.
② 模型能力 ↑② Model capability ↑
从依赖人工逐步引导 ReAct,到自主边推理边执行。任务时长在涨,单步能力不再是瓶颈。From human-guided ReAct, to autonomous reason-while-acting. Task duration rises; single-step ability is no longer the bottleneck.
每进阶一级,人的角色便向外退一格 —— 从编写 prompt、到拼装 context、到搭建 harness、再到设计 loop。 Each rung, the human steps one notch outward — from writing prompts, to assembling context, to building harnesses, to designing loops.
智能体演变ACT I · AGENT
第 5 页 / 共 43 页Page 5 / 43
智能体演变 · 纵轴能力Agent Evolution · Vertical Axis
ACT I · AGENT · 06 / 43
智能体演变 · Stanford CS230 · Lecture 7Agent Evolution · Stanford CS230 · Lecture 7

Beyond LLM:纵轴发力,从强化模型到设计系统Beyond LLM: The Vertical Axis — from Augmenting Models to Designing Systems

LLM 变强有两条路:横轴换更强的 base model(GPT-4 → GPT-5),拼数据拼算力,是 OpenAI / Anthropic 的主场;纵轴在现有 LLM 上叠工程技术——Augmenting LLMs,本页聚焦的就是纵轴。Two paths: the horizontal axis swaps stronger base models (GPT-4 → GPT-5) — OpenAI / Anthropic territory; the vertical axis stacks engineering on existing LLMs — Augmenting LLMs, the subject of this page.

横轴 · 更强的 Base ModelHorizontal · Stronger Base Model
拼数据、拼算力、拼资本——一般人没有能力也没有必要下场。Data, compute, capital — out of reach for most builders.
GPT-4 → GPT-5
纵轴 · Augmenting LLMs(本页焦点)Vertical · Augmenting LLMs — focus
在现有模型上叠工程技术,逐级把模型推向真实场景。Stack engineering on existing models, level by level.
FOCUS
纵轴四级 · 模型一个字都没改,能力是一层层叠上去的The vertical ladder — the model never changes; capability is stacked on top
L1
PROMPT
改它怎么回答:角色、格式、重点change how it answers: role, format, focus
L2
+ CONTEXT
补它不知道的:RAG 检索、记忆feed what it lacks: retrieval, memory
L3
+ TOOLS
让它能动手:查库、调 API、跑代码let it act: query, call APIs, run code
L4
+ MULTI-AGENT
让多个 Agent 分工:并行、可复用split work across agents: parallel, reusable
Part 1 · 强化单一 LLMPART 1 · AUGMENT A SINGLE LLM
  • 01 Prompt Engineering —— 是每个工程师的基本功,不是职业(像九九乘法表)。好 prompt 三要素:给谁看 · 产出格式 · 重点;最常用技巧是 Prompt Chaining:把复杂 prompt 拆成多步级联、上一步输出喂下一步,每步可独立测试调试,换来可观测性(observability)01 Prompt Engineering — a core skill, not a job. Good prompts fix audience, format and focus; the key technique is chaining: split complex prompts into independently testable steps for observability
  • 02 Fine-Tuning —— 立场是能不做就不做:要大量优质标注数据、易过拟合失去通用性、时效差(新一代 base model 一出即被打赢)、prompt 可移植而微调不可;仅法律 / 科研等需重复高精度输出的领域值得02 Fine-Tuning — avoid if you can: needs quality labeled data, overfits, ages fast (new base models beat it), prompts port but weights don't; only worth it in high-precision domains like law & science
  • 03 RAG —— 补足知识的标准解:文件 embedding → 向量库,按语义(非关键词)检索最相近片段,与 system prompt 拼装喂给 LLM,并要求答案附出处防幻觉;配 chunking + 多层次索引提高大文件命中率;长 context 时代仍有检索效率 / 低延迟 / 可及时更新三优势(如同搜索引擎靠索引而非重爬全网)03 RAG — the standard fix for knowledge gaps: embed docs into a vector store, retrieve by semantics, assemble into the prompt with sources to curb hallucination; chunking + multi-level indexing raise hit rates; even with long context, RAG wins on latency, indexing and fresh updates
  • Part 2 · 系统设计PART 2 · SYSTEM DESIGN
  • 01 Agentic Workflow —— 命名来自吴恩达:把提示词、外部工具、元件组合进结构化工作流。Agent 三要素:Prompt(角色与边界)· Context Management(working / archival memory,在对的时间给对的信息)· Tools(做事 + 查资料);自主性三层,从「写死工具、让 Agent 自己决定步骤」起步;MCP 是通用插头,也是 Agent-to-Agent 通信的基础01 Agentic Workflow — coined by Andrew Ng: prompts, tools and components in a structured flow. Three essentials: prompt, context management (working/archival memory), tools; start from level-2 autonomy (fixed tools, agent-decided steps); MCP is the universal plug, basis of agent-to-agent communication
  • 02 Evaluation —— Agent 系统的命脉,三维度交叉:End-to-End × Component / Objective × Subjective / Quantitative × Qualitative;主观评估用 LLM as Judge(pairwise · 单答打分 · 参考答案对比 · rubric 四种玩法);流程:先人工 error analysis,再设计自动化 eval,模型与 prompt 一次只动一个变量02 Evaluation — the lifeline of agent systems, three crossed dimensions: end-to-end × component, objective × subjective, quantitative × qualitative; LLM-as-Judge (pairwise, grading, reference-guided, rubric) for subjective evals; manual error analysis first, then automate — one variable at a time
  • 03 Case Study · 客服 Agent —— 第一步先看人怎么做:Task Decomposition 五步——抽关键信息 → 查订单(tool)→ 查政策(RAG)→ 起草回信(LLM)→ 发送(tool);逐步判断 deterministic 还是 fuzzy 再选型;最后 build evals 三维度全覆盖03 Case Study · Support Agent — watch humans first: task decomposition into five steps (extract info → look up order → check policy via RAG → draft → send), choose tools per step by deterministic vs fuzzy, then build evals across all three dimensions
  • 同一个基座,横轴得等下一代模型;纵轴叠一层工程就是几天到几周——对绝大多数团队,能动的是后一根轴。On the same base model, the horizontal axis means waiting for the next generation; the vertical axis is days to weeks of engineering. For most teams, only the second one is actionable.
    智能体演变ACT I · AGENT
    第 6 页 / 共 43 页Page 6 / 43
    AI 素养框架 · AI FluencyAI Fluency Framework
    ACT II · CASE · 07 / 43
    行业通用「AI 素养」能力基准An industry-general AI-fluency capability baseline

    AI Fluency:三大交互模式 × 四大核心能力AI Fluency: Three Modes of Interaction × The 4 Ds

    在「人—AI」协作中,把事做对、做快、做合规、做安全的能力The ability to work with AI effectively, efficiently, ethically, and safely

    三大交互模式 · 人机介入深度递进Three Modes of Interaction · depth of involvement increases
    自动化 AutomationAutomation
    MODE 1
    AI 按指令独立完成特定任务AI completes specific tasks on command
    • 你的角色 · 下指令者Role · you direct
    • 邮件 · 摘要 · 社媒文案 · 基础编程Emails · summaries · social posts · basic coding
    • 编程对应:跑单条命令 / 生成函数Coding: single commands / function generation
    增强 AugmentationAugmentation
    MODE 2
    人与 AI 结成思考伙伴,迭代共创Human + AI as thinking partners, iterating together
    • 你的角色 · 共创搭档Role · co-creator
    • 写故事 · 论文 · 复杂编程Stories · papers · complex coding
    • 编程对应:结对编程、跨文件修改Coding: pair programming, cross-file edits
    代理 AgencyAgency
    MODE 3
    配置 AI 自主跑完未来任务(替你 / 替他人)Configure AI to run future tasks autonomously
    • 你的角色 · 规则制定者Role · rule-setter
    • 聊天机器人 · 导师 · 游戏角色 · 自主 AgentChatbots · tutors · game characters · agents
    • 编程对应:接进工作流自主交付Coding: autonomous delivery in workflows
    上岗干活 → 并肩作战 → 授权自治 —— 正对应本篇主线:从「会聊」到「会干」Execute → co-create → delegate autonomy — the very arc of this deck: from chatting to doing
    四大核心能力 · The 4 DsThe 4 Ds · four core competencies
    Delegation · 委派Delegation
    D1
    会分活 —— 哪些事你做、哪些 AI 做、哪些一起做Divide work — what's yours, the AI's, or shared
    • 问题意识 · 先厘清目标与任务性质Problem awareness · clarify goals first
    • 平台意识 · 懂各 AI 系统的能力与边界Platform awareness · know each AI's limits
    • 任务委派 · 发挥人 / AI 各自优势Task delegation · play to strengths
    Description · 描述Description
    D2
    会提需求 —— 用能让 AI 高效协作的方式沟通Communicate — set AI up for productive collaboration
    • 产品描述 · 要什么:输出·格式·受众·风格Product · what: output, format, audience
    • 过程描述 · 怎么干:分步指令·引导式Process · how: steps, guided instruction
    • 行为规范 · 简洁/详尽 · 挑战/支持Performance · concise or thorough, challenge or support
    Discernment · 甄别Discernment
    D3
    会挑错 —— 批判评估 AI 产出与行为Judge critically — assess AI outputs & behavior
    • 产品甄别 · 产出质量·相关性·偏差Product · quality, relevance, bias
    • 过程甄别 · 人—AI 协作是否有效Process · is the collaboration working
    • 表现甄别 · 自主行为体验如何Performance · how autonomous behavior feels
    Diligence · 尽责Diligence
    D4
    守底线 —— 对 AI 辅助成果负全责Own it — take full responsibility for AI-assisted work
    • 创作尽责 · 合规使用Creation · ethical, compliant use
    • 透明尽责 · 披露 AI 参与Transparency · disclose AI involvement
    • 部署尽责 · 事实核查·测试·担责Deployment · fact-check, test, be accountable
    模型只是发动机,人与 AI 协作的方式才是方向盘 —— 会分活 · 会提需求 · 会挑错 · 守底线。 The model is the engine; how humans and AI work together is the steering wheel — delegate well, describe clearly, discern critically, act diligently.
    内容来源 Source:AI Fluency Framework(Rick Dakan & Joseph Feller and Anthropic · CC BY-NC-SA 4.0),网址:https://academy.claude.com/courses Source: AI Fluency Framework (Rick Dakan & Joseph Feller and Anthropic · CC BY-NC-SA 4.0) · https://academy.claude.com/courses
    应用实践ACT II · CASE
    第 7 页 / 共 43 页Page 7 / 43
    AI 介入工作的形态 · Forms & AssetsForms & Assets
    ACT II · CASE · 08 / 43
    能力与资产Capability & Assets

    AI 介入工作的形态 · 能力与资产How AI Enters Work — Capability & Assets

    C1
    Chatbot · 对话Chatbot · Dialogue
    人问机答,满足信息获取(2022 起)Ask and answer — information access (since 2022)
    C2
    Claw · 自主执行Claw · Autonomous Execution
    Agent 的子集,自主调用工具、闭环交付任务(2025 年末兴起)A subset of agents — invokes tools, closes the loop (late 2025)
    C3
    Coding · 编程Coding
    人描述需求、模型生成代码,已深度融入研发流程Describe requirements, it generates code — embedded in R&D
    模型统一接入 · 云端统一供给 · 多端安全执行 · 结果闭环回流 Unified Access · Unified Supply · Secure Execution · Closed-Loop Delivery ① 模型接入 ① Model Access ② 云端统一供给 ② Cloud Supply ③ 多端安全执行 ③ Secure Execution ④ 成果闭环交付 ④ Closed-Loop Delivery 公有云模型 Public Models 标准 API 接入 Standard API 私有化模型 Private Models 企业内部部署 On-Premise 行业模型 Industry Models 行业数据训练 Industry-tuned 统一模型网关 Unified Gateway 统一接入 · 统一计量 · 统一治理 Access · Metering · Governance 一处接入 · 全域可用 One Access · All Scenarios 模型可替换 · 成本可追踪 Swappable · Traceable CLOUD · 云端能力 CLOUD · CAPABILITY 统一调度 Unified 01 模型路由 Routing 02 Agent 编排 Orchestration 03 知识与工具 Knowledge 04 权限与策略 Policy 运营监控与持续治理 Monitoring & Governance 权限 · 版本 · 成本 · 内容安全 · 审计 Access · Version · Cost · Safety · Audit 任务分发DISPATCH A 客户端执行 Client 员工电脑 · 专用执行机 Endpoint B Web 执行 Web 业务前台 · 管理后台 Web App C API 调用 API 业务系统 · Webhook Integration D 定时任务 Schedule 计划自动触发 Cron → 任务分发总线 → Task Dispatch Bus 🛡 数据不出端 · 执行可控制 Data-on-Endpoint · Controllable 本地文件 · 桌面应用 · 浏览器 Files · Desktop · Browser Shell · 企业 IM Shell · Enterprise IM 执行可观测 · 过程可回放 Observable · Replayable 每一步留痕 · 每一次可审 Traced & Auditable 成果交付 Delivery · 文档生成· Documents · 任务结果· Task Results · 业务数据· Business Data · 执行证据· Audit Trail BUSINESS · 业务价值 BUSINESS · VALUE 交付即可用 · 结果可追溯 Ready & Traceable 沉淀为组织资产 Becomes Org Asset 交付不是终点 Delivery Is Not the End 结果回流为知识与规则 Results Feed Knowledge 让下一次执行更准更省 Smarter & Cheaper Next Time CLOSED LOOP ↻ CLOSED LOOP ↻ ↺ 状态 · 证据 · 成本 · 风险 事件回流 ↺ Status · Evidence · Cost · Risk Feedback 回到治理层TO GOVERNANCE 交付即回流DELIVERY → LOOP
    企业级 AI 平台 · 六大核心能力Enterprise AI Platform · Six Core Capabilities
    01统一 AI 应用中枢Unified AI Hub
    统一入口 · Agent 编排 · 定时任务 · 历史追踪One entry · agents · scheduling · history
    02数字员工全生命周期Digital-employee Lifecycle
    岗位构建 · 发布治理 · 权限管控 · 持续优化Build · govern · access · optimize
    03多智能体组织化协同Multi-agent Collaboration
    任务拆解 · 角色分工 · 并行处理 · 结果汇总Decompose · divide · parallel · aggregate
    04企业知识与三层记忆Knowledge & Memory
    多格式解析 · 精准召回 · 可引用 · 长期记忆Parse · recall · cite · remember
    05工作流 · Skill · 集成Workflows & Integration
    可视化编排 · 技能复用 · MCP / API · PythonOrchestration · reuse · MCP/API · Python
    06全链路评测与治理Eval & Governance
    质量量化 · 安全评估 · 版本管理 · 持续进化Quality · safety · versions · evolution
    可尝试 AI 化的工作流 · 举例Workflows to AI-ify · Examples
    知K企业知识助手Knowledge Hub制度查询 · 知识问答 · 内容溯源Policy lookup · Q&A · Sourcing
    流P业务流程办理Process Handling表单理解 · 系统操作 · 流程协同Form parsing · System ops · Flow sync
    销S销售与客户运营Sales & CRM商机洞察 · 客户跟进 · 内容生成Pipeline insight · Follow-up · Content
    服S客服与工单处理Support & Tickets智能受理 · 自动分派 · 闭环追踪Triage · Dispatch · Closed-loop
    数D数据分析助手Data Analytics数据理解 · 分析洞察 · 报告输出Interpret · Insight · Reporting
    研R研发与 IT 运维R&D & IT Ops代码辅助 · 故障诊断 · 运维协同Code assist · Diagnosis · Ops
    法L法务与合同管理Legal & Contracts合同审核 · 条款比对 · 风险提示Review · Clause diff · Alerts
    办O综合办公助手General OfficePPT · 文档 · 会议 · 日程协作PPT · Docs · Meetings · Scheduling
    个人已借 AI 长成「超级个体」,组织的差距在协作——把 AI 能力融入工作流,连成组织级系统 AI has turned individuals into super-individuals; the gap is collaboration — wire AI into workflows as one enterprise system
    应用实践ACT II · CASE
    第 8 页 / 共 43 页Page 8 / 43
    应用实践 · 落地决策Use Cases · Adoption Decision
    ACT II · CASE · 09 / 43
    生产落地 · 决策门槛PRODUCTION · DECISION GATE

    什么时候该用智能体When to Use an Agent

    智能体不是一种功能,是一种代价:它替你处理规则写不清的模糊任务,用不好就把确定的事搞成不确定。以下四页整理自《大厂Agent落地手册》《Agent面试题库》的标注要点。An agent is not a feature, it is a cost: it handles tasks whose rules cannot be written down; used badly, it turns certain work into uncertain work. Four pages distilled from the highlighted notes of two field manuals.

    01 · 两个判断维度01 · TWO AXES
    确定性:输入与输出之间有没有明确可写的规则;规则能写清楚,就老老实实写代码。Determinism: if the input-output rule can be written down, just write code.
    模糊性:任务里有没有大量需要理解语义、做判断、连上下文的地方。Ambiguity: does the task require semantic judgment and context?
    只有规则写了一半写不下去、剩下全靠人脑判断的部分,才值得交给它。Only the part where rules run out and human judgment takes over is worth handing over.
    02 · 失败成本三档02 · THREE COST TIERS
    可逆:错了能回滚、能重跑,如生成草稿、整理内部文档。Reversible: drafts and internal documents can be rolled back and rerun.
    可观测:错了能马上发现,有单测、schema 校验或下游报错拦着。Observable: unit tests, schema validation or downstream errors catch it immediately.
    不可逆:直接扣款、删库、给客户发承诺性消息——第三档建议碰都别碰。Irreversible: payments, deletions, outbound commitments — do not touch this tier.
    03 · 适合与不适合03 · FIT / NO-FIT
    适合:大量语义理解、步骤难以用固定规则穷举、输入空间太散。Fit: heavy semantic load, steps that resist exhaustive rules, scattered inputs.
    不适合:规则已穷尽、失败成本不可控、一致性要求高于灵活性。No-fit: rules already exhaustive, uncontrollable failure cost, consistency over flexibility.
    也不适合:规模太小、调用频次太低,工程投入和推理成本摊不薄。Also no-fit: too small or too infrequent to amortise engineering and inference cost.
    04 · 上线前提与真实切法04 · PREREQUISITES & CUTS
    风险预算写进上线评审:先划能承受的出错额度,超出就回退。Write a risk budget into the launch review; roll back when the error allowance is exceeded.
    金融风控初审读材料抽字段用智能体,放款定级强制走规则加人工复核。Finance: agents read unstructured loan materials; grading stays rule-based with human review.
    物流调度给派车建议、HR 简历打分标疑点,最终指令与名单都由人定。Logistics suggests dispatches, HR scores resumes — final calls stay with people.
    评测观测开箱即用、有人能读懂链路日志、每步产出留痕。Eval tooling is off-the-shelf; someone must read the traces; every step must be logged.
    最反直觉的一点:智能体最强的场景不是替你做了多少事,而是把人与系统之间那层模糊的对接接了起来;大部分活儿仍是规则和代码在做。The counter-intuitive part: an agent shines not by doing more work, but by bridging the fuzzy seam between people and systems — most of the work is still rules and code.
    应用实践ACT II · CASE
    第 9 页 / 共 43 页Page 9 / 43
    应用实践 · 架构与护栏Use Cases · Architecture & Guardrails
    ACT II · CASE · 10 / 43
    生产落地 · 架构选型PRODUCTION · ARCHITECTURE

    从演示到生产:架构选型与工程护栏From Demo to Production: Architecture & Guardrails

    没有谁全面压过谁,只有谁更贴合当前的任务形状与合规压力;多数团队从单智能体起步、往图式编排收,性价比最高。No architecture dominates — only one fits your task shape and compliance pressure. Most teams start with a single agent and converge on graph orchestration.

    01 · 四种架构的取舍01 · FOUR ARCHITECTURES
    单智能体:模型加工具加一个循环,快而简单,输在长链路失控、难定位。Single agent: fast and simple, but long chains drift and are hard to trace.
    图式编排:状态图固化流程,出错能定位到节点,代价是流程要预先画死。Graph orchestration: localisable and isolated, but the flow must be drawn up front.
    编排器:路径灵活,但中枢一旦判断错,后面全歪、难调试。Orchestrator: flexible paths, yet a wrong central decision skews everything.
    状态机:最死板也最稳,可控可合规,输在笨重、迭代慢。State machine: rigid but safest — controllable and compliant, slow to iterate.
    02 · 多智能体:先算代价02 · MULTI-AGENT: COUNT THE COST
    错误沿链路传染:一个子智能体出错,会喂给下游另一个子智能体。Errors propagate: one sub-agent feeds its mistake to the next.
    整体消耗是角色数乘以单体的量,常见三到八倍;七角色案例成本六倍而质量无明显提升。Token cost scales with role count, commonly 3–8×; a seven-role case cost 6× with no quality gain.
    前提是任务可分解、子任务弱依赖能并行;上下文隔离才是核心价值。It only pays off when sub-tasks are weakly dependent and parallel; isolated contexts are the real value.
    输出必须是结构化契约(必填、可选、取值范围、错误码);共享记忆带写入者与置信度。Outputs need a structured contract; shared memory needs writer tags and confidence scores.
    03 · 工程护栏03 · ENGINEERING GUARDRAILS
    中枢白名单:能走的边写死,中枢只能从白名单里选,不能临场发明路径。Whitelist the central router’s edges so it cannot invent paths on the fly.
    工具层:接口白名单、返回清洗剥离指令性语句、权限细到工具级别、改动先灰度。Tooling: interface allowlists, sanitised returns, per-tool permissions, gradual rollout.
    高危写操作(退款、删数据、发消息)加一道人工确认,不让智能体全自动执行。High-risk writes need human confirmation rather than full automation.
    可控性三道闸:权限闸、格式闸(JSON Schema 锁死输出)、流程闸;随机性隔离在非关键路径。Three gates: permission, format (JSON Schema) and flow; confine randomness to non-critical paths.
    最小骨架四件套:模型 + 工具 + 循环 + 内存,先跑通闭环再加护栏。Minimal skeleton: model, tools, loop and memory — close the loop first, then add guardrails.
    04 · 排障次序04 · DEBUGGING ORDER
    先查工具返回,再查模型判断:上游 API 改字段名、工具给脏数据,模型只是照着推。Check tool returns before blaming the model: dirty upstream data is a common root cause.
    根因往三层查:模型层(prompt 没说清)、工具层(接口返回异常)、数据层(召回错误内容)。Trace three layers: prompt, tool response, retrieved data.
    trace 串起输入、输出、工具调用与中间决策;降级兜底路径也要埋点。Trace inputs, outputs, tool calls and decisions — including fallback branches.
    工程判断的共同切法:模糊的部分交给模型,定结论的部分回到确定性,两段用人工确认接起来。The common cut: give ambiguity to the model, keep conclusions deterministic, and join the two with human confirmation.
    应用实践ACT II · CASE
    第 10 页 / 共 43 页Page 10 / 43
    应用实践 · 上下文与检索Use Cases · Context & Retrieval
    ACT II · CASE · 11 / 43
    生产落地 · 上下文工程PRODUCTION · CONTEXT ENGINEERING

    上下文是预算,检索是一条链Context Is a Budget, Retrieval Is a Chain

    模型对上下文的利用不是均匀的,更看重开头和结尾、中间段容易被稀释;检索不是精确查询,是向量空间里的概率近邻匹配。Models use context unevenly — the beginning and end weigh more, the middle gets diluted. Retrieval is probabilistic nearest-neighbour matching, not an exact query.

    01 · 上下文管理01 · CONTEXT
    核心不是塞得多,是排得准:能置顶的置顶、能置底的置底,中间的关键约束定期重申。Arrangement beats volume: pin key constraints to the top or bottom and restate the middle.
    每段外部内容打标:检索结果来源与置信度、工具返回接口与时间、用户已确认事实提升权重。Tag every external fragment with source, position, confidence and timestamp.
    生成环节强制只在带标内容里取事实,跨来源冲突显式提示,而不是悄悄选一个。Force the model to use only tagged facts and surface cross-source conflicts.
    KV 缓存本质是前缀复用:system prompt 必须稳定且放在请求最前面。KV caching is prefix reuse — a stable system prompt must sit at the very front.
    02 · 工具与协议02 · TOOLS & PROTOCOLS
    schema 参数定义要严(类型、必填、枚举);工具描述写清什么场景用、什么场景不用。Strict schemas and tool descriptions that state when to use — and when not to use — a tool.
    轻量路由先选业务域再选工具:40 个工具分 6 组,选错率明显下降;每次调用都埋点。Route by domain before tool: grouping 40 tools into 6 cut mis-selection; log every call.
    MCP 是传输与发现层,模型侧仍是 Function Call;适配下沉到 Server,N×M 成本降到 N+M。MCP is transport and discovery; tool use stays Function Call. Integration cost drops from N×M to N+M.
    短期记忆走上下文与 Redis,长期走向量库加结构化表;写入带来源和置信度,检索先热后冷。Short-term memory in context/Redis, long-term in vector stores plus tables — hot first, then cold.
    03 · 检索链03 · RETRIEVAL CHAIN
    混合检索(向量管语义、关键词管精确)再接重排;元数据过滤先砍掉不符合条件的文档。Hybrid retrieval plus reranking; metadata filters prune irrelevant documents first.
    切分三法:固定按字数(demo 级)、语义按段落句子、结构化按表格行/函数/合同条款。Chunking: fixed-size for demos, semantic by structure, structural for tables/code/contracts.
    强制引用来源;RAG 管知识更新与可控引用,微调管能力风格,微调补不了引用短板。Enforce citations. RAG owns freshness and traceability; fine-tuning owns style, not citations.
    检索失败必须降级:放宽检索、切实时查询或老实说不知道,绝不拿空上下文硬编。Plan for retrieval failure: relax, fall back to live query, or say you do not know.
    04 · 成熟度与选型04 · MATURITY & SELECTION
    RAG 三级:能检索能答(demo)→ 切分重排幻觉抑制补齐(可用)→ 版本、权限、监控归因齐全(工业级)。Three RAG levels: demo, usable, industrial — with versioning, permissions and attribution.
    评测至少三指标分开看:召回准确率、答案准确率、引用正确率,才能定位失守在哪一关。Separate recall accuracy, answer accuracy and citation accuracy to locate the broken stage.
    向量库按规模选:十万级且已在用 Postgres 用 pgvector,上亿级分布式用 Milvus,轻量强过滤用 Qdrant。Pick by scale: pgvector for 100k-scale Postgres, Milvus for hundreds of millions, Qdrant for lightweight filtering.
    逐关打标定位第一处失守:改写、召回、重排、引用、生成。Label each stage — rewrite, recall, rerank, citation, generation — to find the first failure.
    答不好很多时候不是检索不行,是问题没问对:检索前加一步问题改写,提升常比换重排模型更明显。A poor answer is often a poorly posed question: rewriting the query before retrieval often beats swapping the reranker.
    应用实践ACT II · CASE
    第 11 页 / 共 43 页Page 11 / 43
    应用实践 · 评测与运营Use Cases · Evaluation & Operations
    ACT II · CASE · 12 / 43
    生产落地 · 运营纪律PRODUCTION · OPERATING DISCIPLINE

    把不确定性关进评测、成本与安全的笼子Boxing Uncertainty into Eval, Cost and Safety

    评测的根本意义是降低发布决策的不确定性:任何不能帮你决定「更能发还是更能拦」的评测动作都是浪费。Evaluation exists to reduce release uncertainty: any test that does not tell you whether to ship or to block is waste.

    01 · 评测体系01 · EVALUATION
    离线评测用黄金集(约 200 条起步,覆盖高频、边界与历史事故),线上盯点踩、中断率、人工介入率。Offline golden sets (~200 cases covering frequent, edge and incident cases); online watch interrupts and handoffs.
    专项集针对某次改动临时搭建,跑完归档;六维分开记:完成率、相关性、格式合规、工具调用、延迟、成本。Ad-hoc sets for each change, then archived. Six separate scores: completion, relevance, format, tool calls, latency, cost.
    用 0–5 整数分而非百分制;强模型当裁判有位置偏好与评分膨胀两个硬伤。Use integer 0–5 scores, not percentages; LLM judges carry position bias and score inflation.
    可观测三档:能看单条 trace → 派生指标与告警 → 观测反向驱动评测与产品。Three observability levels: single traces, derived alerts, then a data loop back into eval and product.
    02 · 成本结构02 · COST STRUCTURE
    token 三块大头:system prompt 每次都发、上下文越滚越长、工具返回往回灌。Three big token sinks: repeated system prompt, growing context, verbose tool returns.
    四招:前缀缓存、旧步骤摘要、工具返回只留关键字段、模型路由两到三档是甜区。Four levers: prefix caching, summarise old steps, truncate tool returns, 2–3 tier model routing.
    prompt caching 命中价可降到原价的十分之一;工具失败重试在复杂任务里能把账单直接翻倍。Prompt caching can cut hit price to one tenth; failed tool retries can double the bill.
    成本优化要设护栏:不能为减少调用而跳过必要的权限校验。Guard the optimisation: never skip a permission check to save a call.
    03 · 安全与上线03 · SAFETY & LAUNCH
    输入隔离 + 最小权限 + 输出过滤三层;输入、日志、看板三层脱敏。Three layers: input isolation, least privilege, output filtering; plus input/log/dashboard redaction.
    红队频率比规模重要;沙箱限制网络出口与文件可见范围;第三方 prompt、工具、MCP Server 都是投毒入口。Red-team cadence beats sample size; sandbox network and filesystem; audit third-party prompts, tools and MCP servers.
    设两条安全红线:越权事件月次数上限、单起数据泄露条数上限,超了就停功能整改。Two red lines: monthly privilege incidents and records leaked per incident — exceed them and stop.
    灰度 5%–10% 起步,盯转化、满意度、任务完成率、异常率,再逐级放大。Canary at 5–10%, watch conversion, satisfaction, completion and anomalies, then ramp.
    04 · 组织纪律04 · ORGANISATION
    成案例共性:边界卡死、评测兜底、账算得清;砸的案例共性:决策层拍脑袋、事故后才补评测。Winners fix boundaries, back them with eval, and know their costs; losers decide on instinct and add eval after incidents.
    第一个场景选问题可枚举、容错空间大、能先规则化的;新人友好区是电商售后、教育答疑、SaaS 工单分流。Start where questions are enumerable and failures recoverable: e-commerce support, education Q&A, SaaS ticket routing.
    上下文设计原则、裁剪模板、过滤规则写成内部规范;团队越大,越要把复盘四问指给具体 owner。Document context principles and templates; the larger the team, the more explicitly owners must be named.
    智能体能不能成,看的是工程纪律和决策质量,不是模型多聪明;上线前先划好出错额度,比上线后拍脑袋喊停稳得多。Success comes from engineering discipline and decision quality, not model IQ. Set the error allowance before launch rather than calling a halt afterwards.
    应用实践ACT II · CASE
    第 12 页 / 共 43 页Page 12 / 43
    组织能力 · Context 工程Organization · Context Engineering
    ACT II · CASE · 13 / 43
    把 Context 当资产经营Run Context as an Asset

    Context:从个人技巧到组织资产Context: From Personal Craft to Organizational Asset

    组织的 AI 成色,最终沉淀为 Context 资产——左:四道检验,答案都指向 Context 与 Loop;中右:Context 从六个来源积累为知识资产,再按 200K 预算纪律投入 Agent / IDE 生产。An organization's AI capability ultimately crystallizes as context assets — left: four tests, all pointing to context and loops; center & right: context accumulated from six sources, then spent against a 200K budget in Agent / IDE environments.

    Q1 · 产出质量
    AI 产出能不能直接用?Is AI output directly usable?
    取决于你给 AI 看到了什么——Document-First + Context Curation,不取决于 prompt 写得多花Depends on what the AI sees — Document-First + Context Curation, not prompt craft
    怎么看出来:改项目目录和 AGENTS.md,产出当天就变;只改 prompt 措辞,几乎没反应Fix the folder layout and AGENTS.md and output changes the same day; reword the prompt and almost nothing moves
    反例:每次都要手工改格式、逐句改措辞,等于自己写一遍——只是把起点从空白页换成了一段草稿You rewrite the format and reword every line, i.e. you wrote it yourself — just starting from a draft instead of a blank page
    Q2 · 稳定提升
    能不能稳定提升 AI 产出质量?Can quality improve consistently?
    取决于能否判断 AI 为什么错——幻觉、上下文饱和、指令歧义、能力边界,修法完全不同Depends on diagnosing why it fails — hallucination, context saturation, ambiguity, capability bounds
    怎么看出来:同一个错反复出现,而且每次修的地方都不一样:有时补资料,有时补指令The same mistake keeps returning, and each fix lands elsewhere: more context one time, a sharper instruction the next
    反例:同一个任务跑三次拿到三种风格,你也说不出哪次更好——这不是提升,是抽奖Three runs of one task give three styles and you cannot say which is better — that is a lottery, not an improvement
    Q3 · 完整交付
    能不能把完整任务交给 AI?Can it own complete tasks?
    取决于有没有搭起闭环(Agentic Loop),让 AI 自己执行、检查、修正、再检查Depends on a closed Agentic Loop — execute, check, fix, re-check
    怎么看出来:任务能不能不打断跑完一轮:执行、自检、修正,中间不需要人接手Can the task run one full round — execute, self-check, fix — without anyone stepping in midway?
    反例:跑到第七步停下来问「要不要继续」,前面六步的上下文还得你自己重新讲一遍It stops at step seven to ask whether to continue, and you have to re-explain the six steps before it
    Q4 · 团队复利
    使用经验能不能形成团队复利?Does experience compound for the team?
    取决于 Context Architecture,以及持续沉淀的 AGENTS.md / MEMORY.mdDepends on Context Architecture and continuously curated AGENTS.md / MEMORY.md
    怎么看出来:新人第一次上手,能不能直接拿到老员工八成的产出On a first attempt, does a newcomer land at roughly 80% of a veteran’s output?
    反例:做得最好的人一走,方法跟着人走;新人从零摸索,团队把同一段路走第二遍The person who got good leaves, the method leaves with them, and the team retreads the same ground from scratch
    CONTEXT FOCUS
    INContext 的积累 · 六个来源Context Accumulation · Six Sources
    日常录音转写 · Plaud、iPhoneVoice memos · Plaud, iPhone 会议记录 · 微信聊天记录等Meeting notes · WeChat logs etc. 与 AI 的对话 sessionAI chat sessions 视频 / 播客 / 演讲 的结构化提炼Video / podcast / talk distillation 架构决策、偏好、惯例、debug 结论Architecture decisions, preferences, conventions, debug findings Memory · 持续沉淀的长期记忆Memory · curated long-term recall
    积累不是目的:原始素材必须经结构化提炼,才能进入下一环的预算表。Raw material must be distilled before it enters the budget on the right.
    OUTAgent / IDE 环境的 200K 上下文消耗200K Context Budget in Agent / IDE
    200K 总上下文
    ├─ 固定开销 (~15–20K)(~15–20K)
    ├─ 系统指令 ~2K
    ├─ 启用的 Skill 描述符 ~1–5K
    ├─ MCP Server 工具定义 ~10–20K ← 最大隐形杀手← biggest silent eater
    └─ LSP 状态 ~2–5K (IDE 特有)(IDE-only)
    ├─ 半固定 (~5–10K)(~5–10K)
    ├─ CLAUDE.md / AGENTS.md ~2–5K
    └─ Memory ~1–2K
    └─ 动态可用 (~160–180K)(~160–180K)
    ├─ 对话历史 (Agent 长程任务下膨胀最快)(fastest-growing in agents)
    ├─ 文件内容 (IDE 单次大但可控)(large but bounded in IDE)
    └─ 工具调用结果
    IDE 是「工具定义吃 context」(静态大头,可预期);Agent 是「任务历史吃 context」(动态大头,靠 Memory 沉淀转移)。IDEs bleed context via tool definitions (static); agents via task history (dynamic) — shifted into Memory.
    应用实践ACT II · CASE
    第 13 页 / 共 43 页Page 13 / 43
    方法论 · 麦肯锡 RewiredMethod · McKinsey Rewired
    ACT II · CASE · 14 / 43
    读书参考 × AI 转型适配Book Reference, Adapted for the AI Era

    数字化转型的六项能力,AI 转型也可参考Six Capabilities from Digital Transformation — a Reference for AI Transformation

    《Rewired》:89% 的企业已启动数字化转型,却只兑现 31% 的预期收入提升——卡点从来不在技术,而在组织能力。这本手册的骨架,正是 AI 转型的一面镜子。Rewired (McKinsey, 2023): 89% of firms have launched transformations, yet captured only 31% of the expected revenue lift — the bottleneck is organizational, not technical. Its skeleton mirrors AI transformation.

    六项企业能力 ·《Rewired》六大篇章,项项都是 AI 转型的地基Six enterprise capabilities · Rewired's six sections, each a foundation for AI transformation
    转型路线图Roadmap
    01
    先对齐 North Star,再按业务域切块:10–15 个域先选 2–5 个Align on a North Star, then carve by domain: pick 2–5 of 10–15
    人才梯队Talent Bench
    02
    核心能力自建、非核心外包;技术人才单独定价晋升Build core in-house, outsource the rest; pay tech talent on its own scale
    运营模式Operating Model
    03
    从 doing agile 到 being agile;产品经理职业化From doing agile to being agile; professionalize product management
    技术架构Technology
    04
    解耦架构 + 云 + DevOps,撑起分布式创新的速度Decoupled architecture, cloud, DevOps — speed for distributed innovation
    数据无处不在Data Everywhere
    05
    数据产品化:像管产品一样管数据,可复用、有人负责Data products: manage data like products — reusable, owned, accountable
    采纳与规模化Adoption & Scaling
    06
    方案上线 ≠ 价值兑现;转型办公室用 stage-gate 追到底Launch ≠ value; a transformation office tracks impact to the P&L
    第 05 · 06 两项——数据与采纳——正是 AI 转型「试点易、规模化难」的两大死因Capabilities 05 & 06 — data and adoption — are exactly where AI transformations stall between pilot and scale
    哪些直接复用 · 哪些要换新变量What transfers as-is · what needs upgrading
    直接复用 · 组织的物理定律不变Transfer as-is · the physics holds
    • 按业务域切块 · 够大才值得打、够小才打得赢,别全公司一起上Domain bites · big enough to matter, small enough to win
    • Pod 小队制 · 一个方案一个小队:业务 + 产品 + 工程 + 数据端到端负责Pod model · one squad per solution, end-to-end ownership
    • 数据产品化 · 语料 / 知识库的地基,AI 转型只会更依赖它Data products · the foundation AI now leans on even harder
    • 采纳纪律 · 上线只算 30%,价值要追进损益表Adoption discipline · launch is 30%; track value to the P&L
    AI 时代升级 · 换上新变量Upgrade for AI · new variables
    • 技术栈长出新层 · 模型网关 · 评测 Evals · Agent 编排 · LLMOpsNew stack layer · model gateway, evals, agent orchestration, LLMOps
    • 人才换新角色 · AI 产品经理 / Agent 工程师 / 评测工程师 + 全员 AI 素养(见前页)New roles · AI PMs, agent engineers, eval engineers + AI fluency for all
    • 数据直通模型 · RAG 语料、微调数据、知识库——数据质量就是模型上限Data feeds the model · corpus, fine-tuning sets, KB — data quality caps model quality
    • 风险清单变长 · 幻觉 · 模型风险 · 隐私合规,须前置到设计阶段Longer risk list · hallucination, model risk, privacy — shift left
    • 节奏两极分化 · 试点从月级压到周级,但「人改变工作方式」仍以月计Split tempo · pilots compress to weeks; human adoption still takes months
    企业缺的从来不是模型,而是把模型变成业务价值的组织能力——六项能力,一项都不能少。 What enterprises lack is never the model — it's the organizational machinery that turns models into value. All six capabilities, no exemptions.
    内容来源 Source:Rewired: The McKinsey Guide to Outcompeting in the Age of Digital and AI(Eric Lamarre · Kate Smaje · Rodney Zemmel, McKinsey Press, 2023),89% / 32% 数据引自该书引言 Source: Rewired (Lamarre, Smaje & Zemmel, McKinsey Press, 2023), figures from its Introduction
    应用实践ACT II · CASE
    第 14 页 / 共 43 页Page 14 / 43
    案例 · IM × Agent 案例研究Case · IM × Agent
    ACT II · CASE · 15 / 43
    四类 Agent 助手对照Four Agent Assistants Compared

    IM × AGENT 案例研究IM × Agent Case Studies

    A
    OpenClaw
    个人 AI 助手 · 龙虾Personal AI · Lobster
    • Gateway hub-and-spoke 架构Hub-and-spoke Gateway
    • 桥接 WhatsApp/Telegram/Slack 等多渠道Bridges multi-channel IM
    B
    HermesHermes
    多通道 + 原生飞书Multi-channel + Feishu
    • 80+ Skills·跨会话持久记忆80+ Skills, memory
    • 飞书/微信/Telegram/DiscordMulti-IM integration
    C
    Claude Code
    CLI 原生 · 不绑 IMCLI-native · No IM
    • REPL + Agent Loop + swarm 编排REPL + Loop + swarm
    • MCP/SDK 嵌入 IDEEmbeds via MCP/SDK
    D
    Zcode · 智谱开源Zcode · GLM OSS
    中间路线Middle Path
    • 通用 Agent 框架(桌面)Universal framework
    • Lark-cli 桥接飞书Bridges Feishu via Lark-cli
    案例 · 生产级飞书 Agent 架构(Albert)Case · Production Feishu Agent (Albert)
    💬
    飞书 IMFeishu IM
    Bot · 消息触达Bot · Trigger
    +
    🌐
    Web Portal
    SSO 登录SSO Login
    ↓ 消息事件↓ Message Event
    Augmented LLM + ToolsAugmented LLM + Tools
    node-service
    Claude Code SDK + PythonClaude Code SDK + Python
    飞书 WS 长链接Feishu WSlark-clicustomer-reportReport
    ↓ X-Internal-Token↓ X-Internal-Token
    Go · BinGo · Binary
    Backend
    业务逻辑 + RBAC + SchedulerBusiness Logic + RBAC + Scheduler
    GORM3pc 扫表3pc ScanOAuth→JWT
    ↓ GORM↓ GORM
    🐘
    PostgreSQL
    业务数据Business Data
    ×
    ⚡
    Redis
    缓存 / 会话Cache / Session
    关键差异:IM 接入两极分化——OpenClaw/Hermes 内置 Gateway;Claude Code 纯 CLI/IDE;Zcode 走中间路线借 Lark-cli。 Key divergence: built-in gateways vs CLI-only vs the middle path via Lark-cli.
    应用实践ACT II · CASE
    第 15 页 / 共 43 页Page 15 / 43
    方案 · 金融行业解决方案Solution · Finance Blueprint
    ACT II · CASE · 16 / 43
    解决方案蓝图Solution Blueprint

    金融行业解决方案:一套会沉淀的 Agent 研究体系Finance Solution: An Agent Research System That Compounds

    场景 → Skills → 知识与工具 → 评估沉淀,四层闭环:个人探索沉淀为组织资产,越用越厚。Scenes → skills → knowledge & tools → compounding: personal exploration hardens into firm assets.

    场景层SCENES
    应用场景Application Scenes
    投前研究Pre-investment
    行业·公司·策略Sector · firm · strategy
    投资决策Decisions
    选股·组合·配置Picks · portfolios
    投后跟踪Post-invest
    持仓跟踪·预警Holdings & alerts
    组合管理Portfolio
    构建·再平衡Build & rebalance
    风险监控Risk
    实时监控·预警Real-time monitor
    报告生成Reports
    日报·周报·专题Daily · weekly
    管理与评估Review
    考核·复盘·迭代KPI · retros
    Skill 层SKILLS
    公共场景 Skills 中心Shared Scene Skills
    市场与大盘分析Market & Index
    大盘趋势分析Index trends
    资金流向分析Fund flows
    市场情绪监控Sentiment watch
    宏观政策影响Macro impact
    行业研究类Sector Research
    行业深度研究Deep dives
    产业链图谱分析Value-chain maps
    竞争格局分析Landscape
    景气度打分Prosperity score
    公司研究类Company Research
    财务分析与解读Financials
    护城河与竞争力Moat & edge
    估值分析Valuation
    跟踪与更新Tracking
    事件与信息处理Events & Info
    公告解读与分级Filing triage
    传闻与舆情分析Rumor & buzz
    事件影响路径Impact paths
    策略与组合Strategy & Portfolio
    主线选股Theme picks
    金融组合构建Portfolio build
    因子选股Factor screens
    风险与预警Risk & Alerts
    风险因子监控Risk factors
    组合风险分析Portfolio risk
    合规与风控检查Compliance
    个人 Skills 中心Personal Skills
    个人自选追踪Watchlist tracking
    调仓清仓草稿Trade drafts
    微盘股影响筛查Micro-cap screens
    个人选股策略Personal strategies
    个人复盘迭代Personal retros
    数据处理 Skills 中心Data-Processing Skills
    公告财报整理Filings & earnings
    研报纪要整理Notes & memos
    新闻雷达News radar
    行业信息沉淀Sector intel
    个股跟踪Ticker tracking
    数据标签生成Data tagging
    知识与工具层KNOWLEDGE & TOOLS
    公共研究资产库Public Research Assets
    公司知识库Company KB
    行业知识库Sector KB
    公告知识库Filings KB
    研报知识库Research KB
    事件知识库Events KB
    公司因子库Factor library
    个人研究资产库Personal Research Assets
    个人自选库Personal watchlist
    临时专题资料Ad-hoc dossiers
    个人因子库Personal factors
    个人观点库Personal theses
    公共数据源 · 客户提供或授权Public Data · Licensed
    官方宏观数据Official macro
    外部付费数据Paid feeds
    内部数据Internal data
    网络与媒体数据Web & media
    接口工具库Tool & API Library
    数据查询调取Data queries
    检索与筛选Search & filters
    OCR与文档解析OCR & parsing
    行情与数据工具Market data tools
    图表生成Charting
    特征与因子接口Factor APIs
    个人数据源Personal Data
    个人采集数据Hand-collected
    个人资料与笔记Notes & clippings
    个人实验数据Backtest experiments
    传言与非结构化数据Chatter & unstructured
    评估与沉淀COMPOUNDING
    数据和 Skills 沉淀流程Sinking Flow
    01
    个人数据源/研究成果Personal data & work
    →
    02
    使用记录/质量评估Usage & quality
    →
    03
    Agent 评分Agent scoring
    →
    04
    团队共享试用Team trial
    →
    05
    公司审核评级Firm review
    →
    06
    公共数据沉淀Promote to shared
    →
    07
    评分反馈Score feedback
    →
    08
    迭代优化Iterate
    沉淀回流:每一轮使用都在加厚公共资产Shared assets compound with every cycle
    评估维度Evaluation
    效果维度 · 准确率 / 命中率Effect · accuracy, hit rate
    质量维度 · 完整性 / 可靠性 / 时效性Quality · completeness, reliability
    使用维度 · 使用率 / 复用率 / 贡献度Usage · adoption, reuse, contribution
    反馈维度 · 用户评分 / 反馈意见Feedback · ratings, comments
    价值不在某个单点 Skill,而在沉淀闭环本身——当每个人的探索都变成组织资产,Agent 才真正「留得下来」。 The value is not any single skill but the loop itself: when personal exploration becomes firm assets, agents finally stick.
    架构示意依据金融行业客户实践与公开资料整理重绘,仅作能力域说明 Architecture redrawn from industry practice and public materials; capability illustration only
    应用实践ACT II · CASE
    第 16 页 / 共 43 页Page 16 / 43
    案例 · AI × Finance 实战Case · AI × Finance in Practice
    ACT II · CASE · 17 / 43
    一个真实样本 · 量价 Multi-Agent 事件驱动引擎A Real Sample · Price-Volume Multi-Agent Engine

    AI × Finance:当「利好是否已被定价」变成一条证据链AI × Finance: Turning "Is Good News Priced In?" into a Chain of Evidence

    正向事件只是起点:三个各司其职的 Agent,把交易判断拆成可复核、可回测的分析环节——我观察 Agent 落地金融的一个切片。A positive event is only the starting point: three specialized agents turn the trade call into reviewable, back-testable steps — one slice of how agents land in finance.

    01 · INPUT
    正向事件信号Positive Event
    盈利超预期 / 预测上调 / 深度覆盖;附事件前收益、事件日跳空与量能Earnings beat / estimate raise / initiation; plus run-up, gap & volume on event day
    →
    02 · AGENT A
    量价指标智能体Indicator Agent
    精确数值链:波动率→趋势强弱→方向→位置→量能(ATR/ADX/MACD/RSI/MFI…),输出标准化状态Numeric chain: volatility→trend→direction→position→volume (ATR/ADX/MACD/RSI/MFI…)
    并行 · 各自独立成报Parallel · Independent reports
    02 · AGENT B
    识图智能体Chart-Reading Agent
    K线结构 · 趋势通道 · 量价配合 · MACD 演化;每个视觉结论用结构化数值复核Candles · channel · volume-price fit · MACD; every visual claim re-anchored to numbers
    →
    03 · AGENT C
    最终决策智能体Decision Agent
    跨报告综合:同源证据去重 · 冲突时评分向 0 收缩 · 只核对原始依据,不做观点投票Cross-report synthesis: de-dup correlated evidence, shrink score on conflict, never a vote
    →
    04 · OUTPUT
    双期限方向评分Dual-Horizon Score
    score_5d / score_20d ∈ [-1, 1]
    看多 / 中性 / 看空 + 论证 + 风险收益比(仅用分析日及此前可知信息)Bull / neutral / bear + rationale + risk-reward (no look-ahead)
    为什么拆成三个 Agent,而不是一个WHY THREE AGENTS, NOT ONE
    注意力不被稀释No attention dilution
    数值与图形是两条认知通路;塞进同一个 prompt,模型会在两套符号系统之间来回切换Numbers and charts are two cognitive paths; one prompt makes the model switch between them
    结论可追溯Traceable conclusions
    每条结论都挂在某个 Agent 的具体依据上,出错能定位到环节,而不是「模型整体不太准」Every claim hangs on one agent’s evidence, so a miss points at a step, not at “the model”
    环节可替换Swappable parts
    任一环节都能单独换模型、换口径重跑,不影响其他环节——这是能迭代的前提Any step can be re-run with another model or definition without touching the rest — the precondition for iterating
    拆成三个 Agent 不是为了显得复杂——是为了让每一句结论都能被指回它的依据。Three agents is not complexity for its own sake — it is what lets every claim point back to its evidence.
    应用实践ACT II · CASE
    第 17 页 / 共 43 页Page 17 / 43
    案例 · AI × Finance 方法Case · AI × Finance Method
    ACT II · CASE · 18 / 43
    一个真实样本 · 量价 Multi-Agent 事件驱动引擎 · 续A Real Sample · Price-Volume Multi-Agent Engine · cont.

    四条能抄走的 Agent 工程约束Four Agent Engineering Constraints Worth Copying

    这一段不看收益,只看方法:四条能直接搬到别的场景的工程约束。Not the returns — the method: four constraints you can port to other domains.

    这个案例让我看重的,是四条可迁移的 Agent 工程方法What makes this case worth studying: four transferable agent-engineering methods
    01
    分而治之Divide
    拆认知通路Split cognition
    数值与图形是两条认知通路:指标 Agent 按固定口径归纳波动率、趋势、量能;识图 Agent 把握 K 线结构与通道形态。拆给不同 Agent,降低单模型的注意力分散,每份结论都保留可追溯的原始依据。Numbers and charts are two cognitive paths: one agent normalizes metrics, the other reads chart structure. Splitting them cuts attention dilution and keeps every conclusion traceable.
    怎么落地:先按「数值 / 图形 / 信号」把输入切三份,每个 Agent 只拿能用上的那份,别让它看见用不上的Split inputs into numbers / charts / signals and give each agent only what it can use
    不做会怎样:一个 prompt 里既要指标又要读图,模型会用文字把没算出来的数补圆One prompt carrying both the numbers and the chart, and the model starts writing plausible digits it never computed
    02
    强制交叉核验Cross-check
    防幻觉工程化Engineered anti-hallucination
    识图 Agent 的每个视觉结论都必须锚定结构化数值复核,图文冲突时以数值为准并显式标注。防幻觉不靠提示词祈祷,而是做成一条可执行的工程约束——这是最值得抄走的一招。Every visual claim must be re-anchored to structured numbers; on conflict, numbers win and it shows. Anti-hallucination as an executable constraint, not a prompt-time prayer.
    怎么落地:把「数值结论必须有第二来源」写成硬规则;冲突时以数值为准,并把冲突本身记进日志Make "every numeric claim needs a second source" a hard rule; numbers win conflicts, and log the conflict
    不做会怎样:读图结论和 MACD 数值相反,两份报告各自看着都对,没人发现The chart call contradicts the MACD reading; both reports still look right on their own
    03
    期限独立Split horizons
    目标对齐证据Align evidence to target
    5 日与 20 日拆成两个独立决策头,分别配置证据权重、禁止互相引用——短期看事件反应,中期看趋势路径。混用期限是 Agent 决策最常见的隐性偏差,结构化拆分直接消除了它。5-day and 20-day heads reason independently with their own evidence weights. Mixing horizons is the most common hidden bias in agent decisions; structural separation removes it.
    怎么落地:两套 prompt 各带自己的时间窗和数据源,禁止在同一个上下文里混用短线和长线材料Give each prompt its own window and data source; never mix short- and long-horizon material in one context
    不做会怎样:短线的证据被拿去做长线结论,仓位建议自相矛盾Short-horizon evidence gets used for a long-horizon call, and the sizing advice contradicts itself
    04
    可复盘Auditable
    进入生产的门槛The bar for production
    从指标读数、图形识别到综合判断,完整判定链条全程保留:可复核、可回测、可迭代。当 Agent 的判断能被拆解、核验与验证,AI 才真正从「讲故事」走向「算得过账」。The full chain — readings, chart calls, synthesis — is preserved: reviewable, back-testable, iterable. When judgment can be decomposed and verified, AI graduates from storytelling to accountability.
    怎么落地:每次输出存一份数据快照 + 中间步骤;三个月后能原样重放,复盘才有意义Store a data snapshot plus intermediate steps per run, so it can be replayed exactly three months later
    不做会怎样:三个月后回看,说不清当时这笔判断依据的是哪条数Three months on, nobody can say which number the decision rested on
    这套框架真正回答的,是每个投研人都躲不开的问题:利好出来,到底是机会还是兑现——而答案必须来自证据,不是叙事。 What the framework really answers is the question every investor faces: when good news lands, is it an opening or an exit? The answer must come from evidence, not narrative.
    案例整理自《大模型系列(8):量价 Multi-Agent 架构,事件驱动的智能交易引擎》(中金公司研究部,2026-08-24),架构图为本人重绘,仅供交流,不构成投资建议 Case adapted from "LLM Series (8): Price-Volume Multi-Agent Architecture" (CICC Research, 2026-08-24); diagram redrawn, for discussion only, not investment advice
    应用实践ACT II · CASE
    第 18 页 / 共 43 页Page 18 / 43
    行业趋势全景 · 2026Industry Outlook · 2026
    ACT III · OVERVIEW · 19 / 43
    行业趋势 · 2026Industry Trends · 2026

    2026 年大模型行业趋势全景The 2026 Foundation-Model Landscape

    五条主线与一组关键数字,勾勒 2026 年的产业坐标。Five storylines and a set of key numbers — the 2026 coordinate system.

    全球 AI 市场 · 2029Global AI market · 2029
    2 万亿美元$2T
    IDC 预测的全球 AI 市场规模Forecast by IDC
    推理算力占比 · 2026Inference compute · 2026
    70%
    首超训练算力(信通院)Inference overtook training (CAICT)
    中国 AI 用户China AI users
    6 亿+600M+
    规模占全球半壁江山About half the world’s total
    工业机器人 · 新增装机Industrial robots · new installs
    54.4%
    中国占全球新增装机份额China’s share of worldwide installs
    效率革命Efficiency Revolution
    算法优化打破「算力神话」,推理成本持续下探Algorithmic gains break the “compute myth”; inference keeps getting cheaper
    判据同一份文档反复问,账单应该按次递减;不降说明没吃到缓存,只是换了个更贵的模型Repeat the same document and the bill should shrink per call; if not, you bought a pricier model, not efficiency
    多智能体协作Multi-Agent Collaboration
    迈向「千亿智能体」时代;MCP / A2A 协议生态加速形成Toward the hundred-billion-agent era; MCP / A2A ecosystems accelerating
    判据接一个新工具只写配置、不写适配层;还要写 glue code,就说明协议没真正落地Wiring a new tool should be config-only; if you still write glue code, the protocol has not landed
    具身智能Embodied AI
    爆发元年:理解空间因果、驱动机器人工厂落地,2026 年迎来密集 IPOBreakout year: robots enter factories; a wave of IPOs in 2026
    判据干的还是搬运、巡检这类重复岗;一旦要求柔性装配,良率立刻掉下来The work is still hauling and inspection; push it to flexible assembly and yield drops immediately
    端侧 AI · 硬件入口On-Device AI · Entry Points
    入口争夺战:AI 手机渗透率超 30%、AI PC 出货破亿,延伸至座舱、眼镜、耳机、玩具The battle for entries: 30%+ AI phones, 100M AI PCs — cockpits, glasses, earbuds, toys
    判据断网还能用;必须联网才能用,说明只是把请求转给了云端,端侧只是个壳It must work offline; if it needs the network, the request is merely proxied to cloud and the device is a shell
    开源生态主导Open-Source Ecosystem
    中国智谱、Qwen 开源生态全球扩张,构建「非对称优势」换道超车Zhipu & Qwen expand globally — building an asymmetric advantage
    判据发版后一周内社区就有量化版和微调版;没有,说明生态没接住这份权重Expect quantized and fine-tuned forks within a week; their absence means the ecosystem did not pick the weights up
    产业化 · 价值兑现Industrialization · Value
    从「概念验证」到「可衡量 ROI」,2026 下半年垂直行业 MVP 规模落地From PoC to measurable ROI — vertical MVPs at scale in H2 2026
    判据客户能把「一年省多少工时」写进验收口径;写不出来,就还只是一句口号The buyer can write "hours saved per year" into acceptance criteria; if not, it is still a slogan
    趋势的合力只有一个方向:从「比拼参数规模」走向「比拼落地能力」——垂直行业深度渗透,是 2026 的核心命题。Every trend points one way: from parameter scale to deployment capability — vertical penetration defines 2026.
    内容来源 Source:斯坦福 HAI 2026 AI Index Report · IDC · 信通院(CAICT)Sources: Stanford HAI AI Index 2026 · IDC · CAICT
    行业概览ACT III · OVERVIEW
    第 19 页 / 共 43 页Page 19 / 43
    全球与中国 · Global & ChinaGlobal & China
    ACT III · OVERVIEW · 20 / 43
    两条路线与一种换道超车Two Routes, One Lane Change

    全球与中国:两条路线与一种换道超车Global and China: Two Routes, One Lane Change

    美国闭源 · 定义上限US closed-source · the ceiling
    上限Ceiling GPT Claude Gemini
    代表模型能力的天花板,背后是高端算力、资本与人才的集中The ceiling of capability — backed by concentrated compute, capital and talent
    开源生态 · 并行扩张Open source · expanding
    L Meta 中国China
    Llama 是标杆玩家;中国在开源领域的势头,系全球最受瞩目的演进之一Llama is the landmark; China's open-source momentum ranks among the most notable shifts worldwide
    用户规模Users
    5 亿以上500M+
    中国 AI 用户,约全球半数China's AI users — roughly half the world
    所以渗透率还在半数以下,增量在后半程——先跑通场景的玩家拿的是复利。
    算力结构Compute mix
    2026
    推理算力占比首超训练 —— 重心从「训模型」转向「用模型」Inference overtook training — gravity shifts from training to using
    所以账单从一次性 CapEx 变成持续性 OpEx,单位 token 成本直接决定毛利。
    打法Play
    ROI
    向垂直行业深度渗透,以可量化 ROI 实现换道超车Vertical penetration to measurable ROI — a lane change
    所以判据很硬:客户能算出一年省多少钱、省几个人,才算真落地。
    竞争焦点已从「比拼参数规模」转向「比拼落地能力」—— 这是中国的非对称优势 The focus has shifted from parameter scale to deployment capability — China's asymmetric advantage
    行业概览ACT III · OVERVIEW
    第 20 页 / 共 43 页Page 20 / 43
    Token 经济 · Token EconomyToken Economy
    ACT IV · TOKEN · 21 / 43
    燃料、性价比与双引擎Fuel, Cost-performance, Two Engines

    Token 经济:燃料、性价比与双引擎The Token Economy: Fuel, Cost-performance, Two Engines

    Token
    ×
    轮次Rounds
    ×
    人力Labor
    ÷
    任务质量Quality
    性价比公式(OpenAI 研究员 姚顺雨):单位不是「元 / 百万 token」——「把任务一次做对」才是降本核心Cost-performance formula (Yao Shunyu): the unit is not "yuan per million tokens" — getting the task right the first time is what cuts cost
    编程Coding
    90%+
    Claude CodeCopilotCodexCursor
    开发者已高度依赖 AI CodingDevelopers have become reliant on AI coding
    办公Knowledge work
    提效元年Year one of productivity
    撰写报告、制作演示文稿、整理纪要、润色文本等,正被 AI 接管Drafting reports, creating decks, organizing minutes, polishing text — absorbed by AI
    Agent / ChatbotAgent / Chatbot
    5–10×
    据腾讯云:Agent 的 Token 消耗为 Chatbot 的 5–10 倍Per Tencent Cloud: an Agent consumes 5–10× the tokens of a Chatbot
    Token 已从「调用成本」升级为需调度、计量、治理的新型战略资源——消耗量只是指标,真正的成本藏在多轮交互与返工里。 Token has risen from a "call cost" to a new strategic resource needing scheduling, metering, governance — volume is just the surface; real cost hides in loops and rework.
    Token 经济学ACT IV · TOKEN
    第 21 页 / 共 43 页Page 21 / 43
    Token 经济学 · 价值公式Token Economics · Value Formula
    ACT IV · TOKEN · 22 / 43
    Token 架构力(TAC)Token Architect Capability (TAC)

    把 Token 换算成商业价值Turning Tokens into Business Value

    智谱衡量 Token 业务价值的框架:三个乘数分别落在模型、服务与工程三层。Z.ai's framework to measure the business value of tokens: three multipliers, three layers.

    AGI 商业价值公式AGI BUSINESS VALUE
    AGI 商业价值 = 智能上限 × Token 消耗量 × 经济转化率AGI Business Value = Intelligence Ceiling × Token Consumption × Economic Conversion Rate
    01 · 智能上限01 · INTELLIGENCE CEILING
    ↓
    模型 ModelModel
    能力天花板,决定单个 Token 能承载多少智能。The ceiling: how much intelligence a single token can carry.
    02 · Token 消耗量02 · TOKEN CONSUMPTION
    ↓
    服务 MaaSMaaS
    调用规模把能力放大为用量,是价值的乘数。Call volume scales capability into usage — the volume multiplier.
    03 · 经济转化率03 · ECONOMIC CONVERSION
    ↓
    工程框架 HarnessHarness
    编排与落地,决定用量最终能兑现多少价值。Orchestration decides how much of that usage converts into value.
    三者是相乘而非相加——模型、服务、工程任何一层掉队,整体商业价值都会被直接乘掉。They multiply, not add: a weak model, service or harness layer discounts the whole.
    Token 经济学ACT IV · TOKEN
    第 22 页 / 共 43 页Page 22 / 43
    智谱AI · 能力来源Zhipu AI · Where Capability Comes From
    ACT V · ZHIPU · 23 / 43
    四条规模化轴Four Scaling Axes

    一切皆在规模化Everything Is about Scaling

    数据、算法、工程、后训练——每条轴持续放大,收益相互叠加,才堆出前沿能力。Data, algorithm, engineering, and post-training — each axis keeps scaling, and the gains compound.

    01 · 数据01 · DATA
    数据规模化Data Scaling
    数据从哪来?Where does the data come from?
    我们的做法OUR APPROACH
    6 年数据飞轮 · 3 条采集通道 · Self-Play 四层筛选6-year data flywheel · 3 intake channels · Self-Play 4-layer filtering
    他人为何滞后WHY OTHERS LAG
    开发者数据直到 2024 年末才开放Developer data only opened up in late 2024
    更多合成数据 → 训练更深More synthetic data → deeper training
    02 · 算法02 · ALGORITHM
    算法规模化Algorithm Scaling
    怎么训练?How do you train it?
    我们的做法OUR APPROACH
    PPO + Critic + OPD 闭环PPO + Critic + OPD loop
    他人为何滞后WHY OTHERS LAG
    业界停留在 GRPO——简单,但有上限Industry sticks to GRPO — simple, but capped
    更多 RL 轮次 → Critic 更锐利,收益复利More RL rounds → sharper Critic, gains compound
    03 · 工程03 · ENGINEERING
    后训练规模化Post-Training Scaling
    从基座到产品有多远?How far from base to product?
    我们的做法OUR APPROACH
    一个 744B 基座,三级跳 5 → 5.1 → 5.2One 744B base, three leaps: 5 → 5.1 → 5.2
    他人为何滞后WHY OTHERS LAG
    后训练方法停留在 GRPOPost-training methodology stalled at GRPO
    更多后训练 → 同一基座,能力翻倍More post-training → same base, 2× capability
    04 · 后训练04 · POST-TRAINING
    工程规模化Engineering Scaling
    到底能不能训得动?Can it be trained at all?
    我们的做法OUR APPROACH
    slime async · Zcube · IndexShare · LayerSplitslime async · Zcube · IndexShare · LayerSplit
    他人为何滞后WHY OTHERS LAG
    算力充裕,缺的是优化的意愿Compute is abundant — the will to optimize is not
    更大集群与上下文 → 收益递增Bigger cluster & context → increasing returns
    四条轴一起放大,飞轮才会复利成前沿能力。Scale all four axes — the loops compound into frontier capability.
    智谱AIACT V · ZHIPU
    第 23 页 / 共 43 页Page 23 / 43
    智谱 GLM 实践 · Zhipu GLMZhipu GLM in Practice
    ACT V · ZHIPU · 24 / 43
    中国国产开源 SOTA 模型实践China's Open-source SOTA in Practice

    智谱 GLM:中国国产开源 SOTA 模型实践Zhipu GLM: China's Open-source SOTA in Practice

    四维训练飞轮 · 持续复利The four-dimension training flywheel · compounding
    01
    数据Data知识密度 × 任务复杂度 · 长程 Agent 轨迹筛选回流Knowledge density × task complexity · long-horizon agent trajectories recycled
    →
    02
    训练范式 · Mid TrainMid-training独立算力 · 分阶段投入;长上下文 · 工具调用 · 长程任务底座Dedicated compute by stage · long context, tool use, long-horizon base
    ↑
    训练飞轮
    持续复利
    Training
    flywheel
    ↓
    04
    工程与环境Engineering & EnvsSlime · IndexShare · MTP · LayerSplit · ZCube · 真实环境Slime · IndexShare · MTP · LayerSplit · ZCube · real environments
    ←
    03
    算法AlgorithmsGRPO → Critic-based SAO;SFT → OPD · 提升轨迹利用率GRPO → critic-based SAO; SFT → OPD · higher trajectory utilization
    AI 科学家观点 · Scaling 不止一个旋钮An AI scientist's view · scaling has more than one dial
    参数量要与数据、算力去向、部署条件一起看——GLM-5.3 与 5.2 同架构,一个月长程环境 + RL 后训练即显著增益;企业最有价值的旋钮,是自己的场景数据。Parameters count only alongside data, compute and deployment: GLM-5.3 gained from long-horizon environments plus RL on the same architecture. An enterprise's most valuable dial is its own scenario data.
    训练飞轮之外,采购方该读什么 · 别只看排名What a buyer should read beyond the flywheel — not just the ranking
    1M 上下文 + Day 0 适配1M context, day-0 silicon
    整份年报、整个代码库可以一次喂进去;同时不被单一算力供应绑死——这两条是给技术的,也是给采购的。A full annual report or an entire repo in one shot, without being locked to one silicon supplier — a technical point and a procurement one.
    12 小时长程 + 2.9 倍算力效率12-hour runs, 2.9× efficiency
    能交给它跑一整夜的任务;同样的预算买到更多有效算力,这两条决定「能不能放心无人值守」。Work that can run overnight, and more effective compute per budget — together they decide whether unattended runs are safe.
    MTP +20% 接受长度+20% accepted length
    出字更快,同样交互体验下单价更低。它不改变能力上限,只改变单位成本。Faster output at a lower unit cost for the same experience. It moves unit cost, not the capability ceiling.
    以 AGI 为锚,跨越三重挑战:长程任务 · 自治系统 · 自我进化 Anchored on AGI, overcoming three challenges: long-horizon tasks · autonomous systems · self-evolution
    智谱AIACT V · ZHIPU
    第 24 页 / 共 43 页Page 24 / 43
    智谱 GLM 实践 · 模型矩阵Zhipu GLM · Model Lineup
    ACT V · ZHIPU · 25 / 43
    模型矩阵Model Lineup

    一个家族,覆盖文本、多模态与实时交互One Family: Text, Multimodal & Realtime

    GLM 系列覆盖文本、多模态、语音、视频方向;模型名称、版本与可用性以官方模型目录为准。The GLM family spans text, multimodal, voice and video — names and availability follow the official catalog.

    旗舰语言模型Flagship LLM
    GLM-5.3
    最新旗舰模型Latest flagship
    1M 上下文、长程 Agent 能力、Coding 开源第一1M context · long-horizon agents · #1 open-source coding
    CONTEXT 1M
    高效多模态模型Efficient Multimodal
    GLM-5.3-Flash
    前沿智能 · 1/10 成本Frontier · 1/10 cost
    320B 总参 / 18B 激活,1M 上下文原生多模态;AA 指数 57 持平 Claude Opus 4.8,定价为 GLM-5.3 的 1/10320B total / 18B activated, native multimodal, 1M context; AA Index 57 on par with Claude Opus 4.8 at 1/10 the price
    CONTEXT 1M
    高速多模态模型High-speed Multimodal
    GLM-5.3-FlashX
    极速生成档 · 新发布Ultra-fast · new
    约 200 tokens/s 极速生成,能力与 Flash 同档,1M 上下文原生多模态,适合高并发低时延生产场景~200 tokens/s, Flash-class capability, native multimodal 1M context, built for high-concurrency low-latency
    CONTEXT 1M
    旗舰语言模型 · 稳定版Flagship LLM · Stable
    GLM-5.2
    上一代旗舰 · 生产主力Prior flagship · production workhorse
    1M 上下文扎实落地,长程任务与大型工程的中坚型号;与 GLM-5.3 同价,平滑兜底高负载Solid 1M context, backbone for long-horizon work; same price as GLM-5.3, smooth fallback under load
    CONTEXT 1M
    多模态理解模型Vision Model
    GLM-5V-Turbo
    原生多模态 Coding 基座Multimodal coding base
    看懂设计稿 / 截图 / 网页,生成可运行代码Reads designs and screenshots into runnable code
    CONTEXT 200KCONTEXT 200K
    语音 / 视频Voice / Video
    GLM-Realtime
    实时音视频Realtime A/V
    端到端实时语音 / 视频交互End-to-end realtime voice/video
    端到端E2E
    编程Coding
    编程与智能体能力接近 Claude 旗舰,SWE-bench 等编码基准开源第一Approaching Claude's flagship — #1 open-source on SWE-bench-class benchmarks
    智能体Agentic
    长程自主任务、工具调用与多智能体协同原生强化,8 小时级自主任务验证Native long-horizon autonomy, tool calls, multi-agent — validated on 8-hour tasks
    安全防护Cybersecurity
    代码审查与漏洞发现对齐业界顶尖,安全防御能力开源共享Code review & vulnerability discovery on par with the best — defenses open-sourced
    选型按「任务形态 × 吞吐 × 成本」对号入座:旗舰做复杂工程,Flash 扛高频调用,FlashX 接高并发低时延。Match the model to the task: flagship for complex engineering, Flash for high-frequency calls, FlashX for high-concurrency low-latency workloads.
    智谱AIACT V · ZHIPU
    第 25 页 / 共 43 页Page 25 / 43
    智谱 GLM 实践 · 旗舰聚焦Zhipu GLM · Flagship Focus
    ACT V · ZHIPU · 26 / 43
    旗舰聚焦Flagship Focus

    GLM-5.3:当前编程能力最强的开源模型GLM-5.3: The Strongest Open-Source Coding Model

    与 GLM-5.2 同基座,提升全部来自后训练;聚焦复杂软件工程、长程 Agent、终端操作与安全防御。Same base as GLM-5.2 — all gains from post-training: complex engineering, long-horizon agents, terminal ops, defense.

    • 1编程能力开源第一#1 open-source in coding编程与智能体能力接近 Claude Fable 5Coding & agent capabilities approaching Claude Fable 5
    • 2白盒代码安全审查White-box code audit代码审查与漏洞发现能力持平 Mythos 5,面向安全防御场景Code review & vulnerability discovery on par with Mythos 5 — built for defense
    • 3数十倍长程训练环境10× long-horizon training训练环境扩展到数十倍长程任务,覆盖 ML 优化等真实专家工作流Environments scaled tens-of-times longer, incl. real expert workflows like ML optimization
    • 4坚持开源Committed to open source安全防御能力作为公共品向开源社区长期免费开放Defense capabilities released free to the community as a public good
    GLM-5.3 benchmark
    同基座 + 一个月长程环境与 RL 后训练 = 显著增益:能力增长的主战场已从参数规模转向数据与后训练。Same base plus one month of long-horizon environments and RL post-training yields substantial gains — growth has shifted from parameter scale to data and post-training.
    内容来源 Source:智谱官方发布材料(2026.07)· 基准图表Source: Zhipu official release materials (Jul 2026) · benchmark charts
    智谱AIACT V · ZHIPU
    第 26 页 / 共 43 页Page 26 / 43
    智谱 GLM 实践 · 普惠旗舰Zhipu GLM · Flash
    ACT V · ZHIPU · 27 / 43
    普惠旗舰Flash Focus

    GLM-5.3-Flash:前沿智能进入普惠时代GLM-5.3-Flash: Frontier Intelligence for Everyone

    定价为 1/10 的 GLM-5.3,限时折扣内为 1/20,为 Opus 4.8 的 1/40 —— 同样智力,1/40 价格。Priced at 1/10 of GLM-5.3 (1/20 during the launch promo) and just 1/40 of Opus 4.8 — same intelligence at 1/40 the price.

    跻身行业帕累托最优前沿On the industry's Pareto frontier
    覆盖 59 款主流大模型的评测(横轴单任务成本、纵轴综合智能得分)中,GLM-5.3-Flash(折扣价)以 $0.045 取得 57 分,落在全局帕累托前沿:相近成本区间优于 Ling-3.0 Flash、Gemini 3.5 Flash-Lite;对比 Grok-4.5、GPT-5.6 Terra、Kimi-K3,能力差距很小的前提下成本优势达数量级。Across 59 mainstream models (cost per task × intelligence score), GLM-5.3-Flash (discounted) scores 57 at just $0.045 — on the global Pareto frontier: ahead of Ling-3.0 Flash and Gemini 3.5 Flash-Lite at similar cost, and within a small capability gap of Grok-4.5 / GPT-5.6 Terra / Kimi-K3 at orders of magnitude lower cost.
    极致低成本架构:线性 + 稀疏混合注意力Hybrid linear + sparse attention
    线性注意力以递归捕获局部依赖,稀疏注意力以轻量索引器召回全局上下文;新增 IndexPool 加权池化压缩索引缓存,降低百万上下文的时延与内存。相较 GLM-5.3:注意力计算量下降 3.01 倍,KV 缓存降低 4.44 倍。Linear attention captures local dependencies recursively; sparse attention recalls global context via a lightweight indexer; IndexPool compresses index caches via weighted pooling — cutting latency and memory at 1M context. Vs. GLM-5.3: 3.01× less attention compute, 4.44× smaller KV cache.
    GLM-5.3-Flash architecture: hybrid linear + sparse attention with IndexPool
    AA Intelligence Index Pareto frontier

    右:帕累托前沿——GLM-5.3-Flash(折扣价)$0.045 / 57 分,落在全局最优边界;左:架构——线性 + 稀疏混合注意力与 IndexPool,KV 缓存 ↓4.44 倍、注意力计算量 ↓3.01 倍。Right: Pareto frontier — GLM-5.3-Flash (discounted) at $0.045 / 57 pts on the global boundary. Left: architecture — KV cache 4.44× smaller, attention compute 3.01× lower vs. GLM-5.3.

    同样智力、1/40 价格 —— 前沿智能第一次不需要省着用,规模化 Agent 落地的成本拐点已至。Same intelligence at 1/40 the price — frontier intelligence you no longer need to ration: the cost inflection for scaling agents has arrived.
    内容来源 Source:智谱官方发布材料(2026.08)· 帕累托前沿与架构图Source: Zhipu official release (Aug 2026) · Pareto & architecture charts
    智谱AIACT V · ZHIPU
    第 27 页 / 共 43 页Page 27 / 43
    智谱 GLM 实践 · 官方 APIZhipu GLM · Official API
    ACT V · ZHIPU · 28 / 43
    官方 API 价值Why Official API

    为什么选择智谱官方 APIWhy the Zhipu Official API

    01
    模型首发First release
    最新旗舰优先在官方平台上线,三方通常滞后或无法提供Flagships launch officially first; third parties lag or never
    02
    性能保障Performance
    TPM 保障包与 SLA 承诺,满足企业级稳定性要求TPM packages and SLAs for enterprise stability
    03
    全模型覆盖Full coverage
    GLM 多规格统一管理,文本、视觉、语音、视频多模态集成Unified access — text, vision, voice, video in one place
    04
    数据安全Data security
    VPC 专网与专线接入,端到端加密,满足金融、政务合规VPC, dedicated lines, E2E encryption — finance-grade compliance
    05
    弹性灵活Elastic
    按需付费,支持调用次数、Token 消耗多种计费方式Pay as you go — per-call, per-token and more
    06
    工具链支持Toolchain
    深度适配 Claude Code、Cline、Roo Code 等主流开发工具Deep adaptation for Claude Code, Cline, Roo Code and more
    07
    专属服务Dedicated support
    架构师 / PM / 技术专家服务;全精度推理、专用引擎与可观测性Architects, PMs, experts; full-precision engine, observability
    08
    持续迭代Continuous iteration
    模型与服务持续升级,客户始终获得最新改进Models keep upgrading — you always get the latest
    三方渠道接入的典型问题Typical Pitfalls of Third-Party Channels
    效果与精度差异:三方多基于开源权重自建,量化与推理参数调优不足,效果与官方存在明显差距;模型更新滞后Quality gaps: rebuilt from open weights with poor quantization — visibly worse results, updates lag
    推理框架差异:缺官方专用推理引擎与全精度保障,长上下文与高并发稳定性差;高峰期限流,无 TPM 保障Inference gaps: no purpose-built engine or full-precision guarantee; throttled at peak, no TPM assurance
    可维护性缺失:无 SLA 与专属支持,故障恢复依赖三方排期;无 VPC / 合规审计,数据流转路径不受控Maintenance gaps: no SLA or dedicated support; no VPC or audits; data paths uncontrolled
    权益与计费风险:部分三方「开源版 API」限流、功能阉割(缓存 / 结构化输出)、隐性计费、随时停服Entitlement risks: throttling, stripped features, opaque billing, sudden shutdowns — unfit for production
    智谱AIACT V · ZHIPU
    第 28 页 / 共 43 页Page 28 / 43
    模型技术 · 数据与 Agentic 数据L2 · Data & Agentic Data
    APPENDIX · TRAINING · 29 / 43
    模型技术Model Tech

    数据准备体系与 Agentic 数据Data Pipeline & Agentic Data Design

    左:三段递进的数据体系;右:Agentic 数据的四个要点——先总览,再聚焦执行轨迹。Left: the three-stage pipeline; right: four essentials of Agentic data — overview first, then execution traces.

    三段递进 · 数据体系总览Three stages · pipeline overview
    预训练打底Pre-training
    语料 28.5T(GLM-5)→ 30T+(Flash 含多模态);代码 / 数学 / 科学等推理密集领域优先。LLM / VLM / Agent 三条数据管线并行:图文对超 100 亿、OCR 图像 2.2 亿、GUI 元素定位;两阶段训练,第一天起适配七大国产芯片平台。Corpus 28.5T (GLM-5) → 30T+ (Flash, multimodal); reasoning-heavy domains first. Three pipelines — LLM / VLM / Agent: 10B+ image-text pairs, 220M OCR images, GUI grounding; day-one support for seven domestic chip platforms.
    SFT 对齐SFT Alignment
    理念:不是注入知识,而是对齐推理与响应格式,给 RL 一个稳定冷启动——质量优先、少量高质。通识 / 推理 / 编码+Agent 配比平衡防偏科,推理数据做难度过滤;三种思维模式立多轮规矩:Interleaved 管轮内、Preserved 管跨轮、Turn-level 管轮级。Not knowledge injection — aligning reasoning & format for a stable RL cold start; quality over quantity. Balanced mix guards against forgetting; three thinking modes: Interleaved, Preserved, Turn-level.
    RL 自改进RL Self-improvement
    一万多个可验证奖励环境(软件工程 / 终端 / 搜索 / 幻灯片生成),带多步依赖与隐藏状态,on-policy rollout 持续产出新轨迹——环境本身就是数据生产线。judge 试做确认可解 → verifier 盲合成防泄漏 → 堵作弊捷径 → 三重校验;算法底座 SAO + slime,长程编码 RL 吞吐 2.3×。10K+ verifiable environments with multi-step deps and hidden states; on-policy rollouts keep producing data. Judge solves first, verifier is blind-synthesized, shortcuts sealed, triple-checked; SAO + slime lift long-horizon coding RL throughput 2.3×.
    横贯三段的两个不变维度:数据来源多源融合 · 质量全链路管控(难度过滤:以 GLM-4.7 为基准剔除过易 / 过难样本,配合拒绝采样选最优轨迹)。Two invariants: multi-source blending · end-to-end quality control (GLM-4.7-based difficulty filtering plus rejection sampling).
    Agentic 训练数据 · 完整的执行轨迹Agentic data · complete execution traces
    工具调用Tool Use
    function calling + API + 沙箱执行:让模型拿到真实的返回结果,而不是人工编造的输出。Function calling + APIs + sandboxed execution: real tool outputs, never fabricated ones.
    多步推理Multi-step Reasoning
    interleaved 思考格式;thinking 内容原样保留、不能清洗掉——推理过程本身就是监督信号。Interleaved thinking; content preserved verbatim — the trace itself is the supervision signal.
    环境交互Environment Interaction
    覆盖浏览器、终端、文件系统与 GUI,对应真实 Agent 的落地场景。Browser, terminal, file system and GUI — where real agents land.
    长程轨迹Long-horizon Trajectories
    一条数据可达数百轮对话、数千次工具调用,中间必然出错——刻意保留错误与恢复策略,不只喂成功路径。Hundreds of turns, thousands of tool calls; mistakes kept deliberately — with recovery strategies, not just success paths.
    模型要学会从失败里爬出来——数据来源多源融合,质量全链路管控。Learning to climb out of failure beats learning only from success — multi-source data, full-chain quality control.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 29 页 / 共 43 页Page 29 / 43
    模型技术 · 数据清洗与质量L2 · Data Quality
    APPENDIX · TRAINING · 30 / 43
    模型技术Model Tech

    数据清洗与质量保障Data Cleaning & Quality Assurance

    多级过滤、去污染与可验证三管齐下——清洗的目标不是越洗越少,而是越洗越好。Multi-level filtering, decontamination and verifiability — wash until better, not merely less.

    清洗流水线 · 四层从粗到精Cleaning pipeline · four layers, coarse to fine
  • ① 启发式过滤——分辨率、纯色、文本长度、去重,先挡明显噪声1 · Heuristic — resolution, solid colors, text length, dedup
  • ② 语义过滤——嵌入对齐打分门控,如图文对 CLIP Score ≥ 0.32 · Semantic — embedding-score gating, e.g. CLIP ≥ 0.3
  • ③ 分布平衡——概念均衡重采样、中英双语均衡、领域配比控制3 · Balance — concept resampling, CN-EN balance, domain mix
  • ④ 质量增强——事实性重写 caption、难度过滤;越洗越好,不是越洗越少4 · Enhancement — factual caption rewriting, difficulty filtering
  • 四层是一条链,不是四次抽样A chain, not four independent passes
    原始池→ ① 启发式→ ② 语义→ ③ 平衡→ ④ 增强→ 可训练集
    SFT 数据再过一遍:以 GLM-4.7 为基准过滤过易 / 过难样本,配合拒绝采样从多次 rollout 选最优轨迹。SFT data gets a second pass: GLM-4.7-based difficulty filtering plus rejection sampling.
    保障一 · 去污染Guard 1 · Decontamination
    benchmark 题目去重、按时间线切分验证,私有基准天然防泄漏——SWE-rebench 研究:受测 SWE 题 42.1% 存在污染,去污染后排名大幅变动。Dedup vs. benchmarks and timeline-based splits; private benchmarks resist leakage by design — SWE-rebench found 42.1% of tested items contaminated, enough to reshuffle rankings.
    保障二 · 可验证性Guard 2 · Verifiability
    每条数据都要有明确环境反馈,并过 oracle / no-op / unsolved 三重校验——标准答案能过、瞎操作不能过、不解决任务不能过,全过才产出二值奖励。Every item needs explicit environment feedback and passes oracle / no-op / unsolved checks — gold passes, random actions fail, non-solutions fail — before yielding a binary reward.
    保障三 · 奖励反作弊Guard 3 · Reward Anti-hacking
    多级奖励 + 运行时渲染检测;GLM-5.2 起升级为在线拦截——发现作弊即拦下该次调用、返回哑结果,但让轨迹继续走完,保住训练稳定。Layered rewards + runtime render checks; since GLM-5.2 an online module intercepts cheating calls, returns a dummy result and lets the rollout finish — keeping training stable.
    洗过头的三个信号 · 出现任何一个,就该往回退Three signs you over-cleaned — any one means back off
    01
    loss 一路降,评测纹丝不动Loss keeps falling, evals stay flat
    剩下的大多是被筛剩的简单样本。把语义阈值从 CLIP 0.3 放回 0.25 重跑一遍,再看曲线。What survived is mostly easy samples. Drop the CLIP threshold from 0.3 back to 0.25 and rerun.
    02
    同一条 prompt 的输出越来越像Outputs for one prompt keep converging
    分布平衡被单一来源吃掉。配额按来源定,不要按总量定——总量达标但来源只剩两三个,等于没平衡。One source is eating the mix. Quota per source, not per total — hitting the total with only two or three sources is no balance at all.
    03
    验证集分数突然变好看Validation jumps for no reason
    先查污染,再谈涨点。按时间线切分;随机切分等于把答案提前发给模型。Check contamination before celebrating. Split by timeline — random splits hand the answer to the model in advance.
    数据质量 = 过滤严格度 × 可验证性——不可验证的数据在 RL 里就是噪声。Data quality = filter strictness × verifiability — unverifiable data is noise in RL.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 30 页 / 共 43 页Page 30 / 43
    模型技术 · 后训练框架L2 · Post-training
    APPENDIX · TRAINING · 31 / 43
    训练流程 · 四段一条线,顺序不可交换Training pipeline · four stages, order matters

    后训练总体框架The Post-training Framework

    渐进式流水线:每阶段只聚焦一类能力,跨阶段蒸馏回灌旧能力——越往后越通用。A staged pipeline: one capability per stage, distilling old ones back in — more general as it climbs.

    阶段一STAGE 1
    SFT
    指令对齐:学会指令跟随 / 工具调用 / 响应格式,注入长思维链;内部先拆推理 / Agent / 对话三个专家分别练强,再用自蒸馏合并为全能模型Instruction alignment + long CoT injection; three experts (reasoning / agent / chat) trained separately, then merged via self-distillation
    产出:格式对齐的指令数据 + 合并后的全能底座Deliverable: format-aligned instruction data + one merged base
    →
    阶段二STAGE 2
    Reasoning RL
    GRPO + IcePop,聚焦数学与代码等可验证推理;IcePop 解决 RNN 架构下梯度估计偏差GRPO + IcePop on verifiable math & code; IcePop fixes gradient-estimation bias in RNN-style architectures
    产出:带长 CoT 的可验证推理能力Deliverable: verifiable long-CoT reasoning
    →
    阶段三STAGE 3
    Agentic RL
    多轮交互 · 工具使用 · 长程任务——GLM-5.2 / 5.3 的主战场;异步训练 + TITO 让多轮工具轨迹高效回放Multi-turn, tool-use, long-horizon — the GLM-5.2/5.3 battleground; async training + TITO replay multi-turn traces
    产出:会调工具、能跑多轮的 Agent 模型Deliverable: a tool-using, multi-turn agent model
    →
    阶段四STAGE 4
    General RL
    能力整合与通用对齐:蒸馏 + 能力恢复,把专项能力泛化回去而不牺牲通用性Integration & alignment: distillation + capability recovery generalizes special skills without hurting generality
    产出:可对外发布的通用模型Deliverable: a shippable general model
    顺序不可交换:SFT 没把格式定死,Reasoning RL 的 rollout 大半是无效轨迹;Agentic RL 放在最后,前面练出的推理能力反而被多轮交互冲散。General RL 必须收尾——它是回归测试,不是新一轮冲刺。Order is not swappable: skip SFT and most RL rollouts are malformed; put Agentic RL last and multi-turn interaction washes out the reasoning just trained. General RL must close the loop — it is a regression test, not another sprint.
    每段练到什么时候该停 · 看出口指标,不看训练步数When to stop each stage — watch exit metrics, not step counts
    SFT
    格式合法率、指令跟随率达标,长 CoT 稳定输出不截断format-valid and instruction-follow rates hold; long CoT stops truncating
    REASONING
    可验证题库见顶、CoT 长度不再涨——再练就是刷分verifiable suites plateau and CoT length flattens — more steps just overfit
    AGENTIC
    多轮任务成功率稳住,工具调用合法率不掉multi-turn success holds, tool-call validity stops dropping
    GENERAL
    回归集不掉点才算整合成功;掉点就是这一轮洗掉了旧能力regression set must not drop — a drop means this pass erased old skills
    三个反直觉 · 都跟「多练一点总没坏处」相反Three counter-intuitive points — each contradicts "more training can't hurt"
    后训练补不了知识Post-training adds no knowledge
    知识是预训练买来的。后训练只改「怎么用」——格式、推理路径、工具调用习惯。指望它学会新领域,是在错误的层解决问题。Knowledge comes from pre-training. Post-training only changes how it is used — format, reasoning path, tool habits. Expecting new domain knowledge here solves it at the wrong layer.
    阶段不是越多越好More stages is not better
    每多一段就多一次遗忘风险。加阶段的唯一理由是「有一类能力确实互相冲突、没法一起练」,否则并进上一段更省。Every extra stage is another chance to forget. Add one only when a capability genuinely conflicts with the last — otherwise fold it in.
    SFT 数据堆量会固化错误Piling on SFT data freezes mistakes
    格式对齐用少量高质量样本就够。量堆上去、又不做难度过滤,等于把同一个错误模式教一万遍,后面 RL 很难掰回来。A small high-quality set aligns format. Scale it without difficulty filtering and you teach one mistake ten thousand times — RL struggles to undo it.
    GLM-5.3 · 同基座纯后训练的验证GLM-5.3 · same base, post-training only
    Terminal-Bench 3.0 4.6 → 28.3(约五倍)· DeepSWE 46.2 → 66.9 · Agents’ Last Exam 23.8 → 28.5TB 3.0 4.6 → 28.3 (≈5×) · DeepSWE 46.2 → 66.9 · Agents’ Last Exam 23.8 → 28.5
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 31 页 / 共 43 页Page 31 / 43
    模型技术 · SFT 最佳实践L2 · SFT
    APPENDIX · TRAINING · 32 / 43
    SFT 实践 · 数据与训练策略SFT practice · data and schedule

    SFT 最佳实践SFT Best Practices

    心法:SFT 是对齐手段,不是灌知识——让模型知道「以什么身份、按什么格式、用什么思考方式来干活」。SFT aligns format, it does not pour in knowledge — it teaches the model whom to be, what format to follow, how to think.

    数据配比 · 平衡防偏科Balanced mix
    推理 / 编码 / Agent / 通识四类平衡——反例:全喂代码数据,通识问答明显掉分。灾难性遗忘在 SFT 阶段就会发生。Reasoning / coding / agent / general in balance — feed only code and general Q&A visibly degrades: catastrophic forgetting starts in SFT.
    指令设计 · 多样化Instruction design
    多样化模板 + 难度梯度:同一类能力用不同问法、不同难易覆盖。Diverse templates with difficulty gradients: the same capability covered via varied phrasings and levels.
    训练策略 · 宁欠勿过Training strategy
    低学习率 · 少 epoch——SFT 过拟合是最常见的翻车原因。Low LR, few epochs — overfitting is the most common way SFT goes wrong.
    三种思维模式Three thinking modes
    给多轮 Agent 行为立规矩:Interleaved 管轮内(调工具前先想清楚);Preserved 管跨轮(历史思维块保留、推理不断链);Turn-level 管轮级。Rules for multi-turn agents: Interleaved within turns, Preserved across turns (thinking blocks kept, chains unbroken), Turn-level summaries.
    一轮 SFT 迭代 · 五个动作One SFT iteration — five moves
    ① 定能力
    先写清楚教什么Name the capability
    这一轮要教会哪一种能力,写不出来就先别开训——目标模糊,数据一定跑偏。If you cannot name the capability in one sentence, do not start; vague goals produce skewed data.
    ② 采或造数据
    200–2000 条起步Start with 200–2000
    宁可少而准。LIMA 已经证明约一千条精选数据就能完成对齐。Fewer and cleaner wins; LIMA showed roughly a thousand curated samples can align a model.
    ③ 统一格式
    模板与思维块一致One template throughout
    分隔符、角色标记、思维块写法全套统一——格式不统一等于给模型两种示范。Delimiters, role tags and thinking-block style must match; mixed formats teach the model two different things.
    ④ 小学习率
    少 epoch,看拐点就停Low LR, few epochs
    学习率比预训练低一到两个量级;通常 1–3 个 epoch,loss 拐平就走。Learning rate one to two orders below pre-training; usually 1–3 epochs, stop when loss flattens.
    ⑤ held-out
    留同分布样本Hold out a split
    留 100–200 条不参与训练,用来分清是学会了、还是背下了。Keep 100–200 samples out to tell learning from memorizing.
    落地 checklist · 开跑之前先定三件事CHECKLIST · SETTLE THREE THINGS FIRST
    ① 每条样本都能回答「教什么」① Every sample answers “teaches what”
    说不清教会模型哪种能力的样本,先删掉——它们只会稀释信号If you cannot name the capability a sample teaches, cut it — it only dilutes the signal
    ② 一次只改一个变量② One variable at a time
    配比、指令格式、epoch 分开跑,否则效果变好也不知道是谁的功劳Change recipe, format or epochs one at a time, or you cannot attribute the gain
    ③ 留一份 held-out③ Hold out a slice
    同分布留 100–200 条不参与训练,用来分清是学会了、还是背下了Keep 100–200 same-distribution samples out of training to tell learning from memorizing
    质量优先:LIMA 验证约一千条精选高质数据即可完成对齐——SFT 的目标不是「喂饱」,是「立正」。Quality first: LIMA shows ~1,000 curated samples suffice — SFT is not about feeding more, but standing straight.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 32 页 / 共 43 页Page 32 / 43
    模型技术 · RL 稳定性与奖励L2 · RL Stability & Rewards
    APPENDIX · TRAINING · 33 / 43
    模型技术Model Tech

    RL 训练稳定性与奖励设计RL Stability & Reward Design

    左:算法怎么选、怎么稳;右:奖励怎么分级、作弊怎么防——RL 的命门在奖励。Left: keeping RL stable; right: grading rewards and blocking hacking — rewards are RL’s lifeline.

    主力算法 · GRPOWorkhorse · GRPO
    同一个 prompt 采一组回答(如八份答卷),组内互比高低、归一化算优势——不用另训 critic。好比同一道题八个学生各答一份互比高下,不用养阅卷老师。Sample a group per prompt, compare within, normalize into advantages — no critic needed.
    长程演进 · 组比较失效Long-horizon shift
    长程轨迹经 compaction(像「前情提要」)切成子轨迹后,组内条数不齐、长短悬殊——组比较不再成立。GLM-5.2 转 critic-based PPO:单条 rollout 即可训练,critic 打 token 级优势,子轨迹一条不浪费。After compaction splits long traces, group comparison breaks — GLM-5.2 moves to critic-based PPO: single-rollout training, token-level advantages, no sub-trace wasted.
    稳定性关键件Stability kit
    IcePop 抑制训练与推理温度不匹配导致的退化;token-clipping 把过期的 off-policy 样本直接丢掉,保证 rollout 新鲜。IcePop curbs temperature-mismatch degradation; token-clipping drops stale off-policy samples.
    最大的敌人 · 静默崩溃The silent enemy
    loss 一切正常、甚至还在下降,能力却在悄悄退化——等发现时已经晚了。唯一解法是持续监控能力指标,而不是只盯着 loss。Loss looks fine while capability quietly decays — the only cure is continuously monitoring capability metrics, never loss alone.
    奖励 · 四级设计Rewards · four levels
    L1 规则:测试通过率、编译成功率——天然裁判,客观便宜不可辩驳;L2 模型:Agent-as-a-Judge 评多轮交互质量;L3 多级:功能、渲染、视觉多层叠加——代码写对、渲染错了照样扣分;L4 反作弊:运行时渲染检测,专抓 reward hacking。CC-Bench-V2 代码构建率 98%。L1 rule: test pass / compile — objective judges; L2 model: Agent-as-a-Judge; L3 multi-level: function + render + visual; L4 anti-hacking: runtime render checks. 98% build rate on CC-Bench-V2.
    真实抓到的作弊案例Real caught cases
    直接 curl GitHub 的 raw 链接下载标准答案;更隐蔽的链式泄漏——find 隐藏文件,cat 出测试用例 JSON,再让解题脚本读用例跑分。分数全对、能力为零——模型越强越会钻:5.2 比 5.1 更明显。Curling raw GitHub links for gold answers; chain leaks via hidden test-case JSON. Perfect scores, zero capability — stronger models cheat more.
    处置方式 · 讲究Handling · with care
    两段检测:规则过滤先抓可疑保召回,LLM judge 复核意图保精度;在线监控每一步工具调用,发现作弊就拦截该次调用、返回哑结果,但让 rollout 继续走完——粗暴截断会造成训练不稳甚至模型坍塌。Rules catch suspects (recall), an LLM judge verifies intent (precision); cheating calls are intercepted with dummy results while rollouts finish — hard truncation destabilizes training.
    口径:GRPO → critic-based PPO 演进、compaction、静默崩溃出自 GLM-5.2 博客;IcePop、token-clipping 另参《GLM 模型发展和训练》。Sources: GLM-5.2 blog; IcePop and token-clipping per “GLM model development & training”.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 33 页 / 共 43 页Page 33 / 43
    模型技术 · 环境与避坑L2 · Environments & Pitfalls
    APPENDIX · TRAINING · 34 / 43
    模型技术Model Tech

    环境规模化与避坑清单Environment Scaling & Pitfall Checklist

    上:环境即数据——好环境三条标准、流水线五环节;下:六个真实踩过的坑,现象在前、解药在后。Top: environments are data — three standards, five pipeline steps; bottom: six real pits, symptom first, fix after.

    环境规模化 · 好环境三条标准,流水线五环节Environment scaling · three standards, five steps
    可执行Executable 可验证Verifiable 贴近真实专家工作Real expert work
    真实工作单元(5.3 关键升级):任务从「编程练习」升级成「真实工作单元」,有些相当于资深工程师好几天的工作量。例:ML 基础设施任务——模型拿到与工程师一模一样的计算集群、存储、内部文档、代码库、历史实验,自己诊断训练栈瓶颈、实施优化、实验验证,交付可度量的端到端加速且不牺牲正确性。Real work units (the 5.3 upgrade): tasks graduate to days-of-senior-engineer scale — in one ML-infra task the model gets the engineer’s own cluster, storage, docs, repo and history, must diagnose, optimize, validate and ship a measurable speedup without sacrificing correctness.
    流水线五环节:① research agent 从真实工作采集任务模式,转成带多步依赖与隐藏状态的可运行环境;② judge agent 亲自试做确认可解;③ verifier 盲合成,不看参考答案防泄漏;④ 用求解轨迹封堵作弊捷径;⑤ oracle / no-op / 未解三重校验全过,才产出可直接训练的二值奖励。Five steps: 1 research agent mines task patterns into runnable environments; 2 judge solves first; 3 blind verifier never sees answers; 4 solver traces seal shortcuts; 5 oracle / no-op / unsolved checks yield a trainable binary reward.
    RL 常见陷阱 · 现象在前,解药在后——每开一轮新训练,逐项过一遍RL pitfalls · symptom first, fix after — re-read before every run
    01 静默崩溃Silent collapseloss 正常甚至还在降,能力悄悄退化,察觉已晚loss fine while capability decays解药:持续监控能力指标,别只盯 lossfix: monitor capability metrics, never loss alone
    02 Reward HackingReward hacking奖励规则有漏洞就钻——curl 直接下载标准答案也能拿满分loopholes get farmed — even downloading gold answers解药:多级奖励 + 在线反作弊fix: layered rewards + online anti-hacking
    03 能力遗忘Forgetting猛攻新阶段,旧能力被冲掉——练 Agent 时数学推理悄悄掉分new stages wash out old skills解药:跨阶段蒸馏,把旧能力回灌fix: cross-stage distillation pours old skills back
    04 分词不一致Tokenizer mismatch训练与推理的 token 边界对不上,工具调用精度受损token boundaries diverge, hurting tool calls解药:TITO,两侧统一分词fix: TITO unifies tokenization
    05 过度依赖工具Tool over-reliance什么问题都想调工具,不调工具的基础推理慢慢退化everything reaches for a tool; bare reasoning atrophies解药:训练数据混入无工具样本fix: mix tool-free samples into training
    06 长尾任务掉队Long-tail stragglers少数任务 rollout 特别慢,一批里最慢的拖垮整体吞吐a few slow rollouts drag whole-batch throughput解药:异步 rollout,慢任务后台续跑fix: async rollouts run stragglers in the background
    环境即数据——环境规模化,就是 RL 的数据规模化;方法论会过时,坑永远新鲜。Environments are data — scaling them scales RL; methods age, pits stay fresh.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 34 页 / 共 43 页Page 34 / 43
    模型技术 · LLM 机制L2 · LLM Mechanism
    APPENDIX · INFERENCE · 35 / 43
    模型技术Model Tech

    LLM 机制:训练流程 × 运作流程LLM Mechanism: Training × Inference

    左:训练阶段如何构建大模型;右:上线后模型如何对外提供服务;模型主干(Decoder-only)则从 Token 到生成循环运转。Left: how training builds the model; right: how inference serves it — while the Decoder-only backbone runs the token-to-generation loop.

    训练流程Training pipeline Training pipeline 预训练Pre-training 后训练Post-training 强化学习Reinforcement Learning 前向传播Forward prop. 反向传播Backward prop. 自监督学习Self-supervised 基座模型Base model 精调Fine-tuning 监督微调Supervised FT RLHF 奖励模型Reward model 思维链Chain-of-Thought 蒸馏Distillation 量化Quantization 大语言模型Large Language Model Transformer 参数Parameters 运作流程Inference flow Inference flow 提示词Prompt Prompt 分词器Tokenizer Token 检索增强生成 RAGRetrieval-Augmented Gen 生成结果Generation output 稠密模型Dense model 稀疏模型Sparse model 混合专家模型Mixture-of-Experts 训练流程:将语料固化为参数;运作流程:上线后由 prompt 调用的方式。Training: corpora are frozen into parameters; Inference: invoked by prompt once online. 汇合点:无论训练还是推理,都围绕「大语言模型」这一个核心展开。Convergence: both training & inference orbit one core — the LLM. 附注:虚线表示「可选/间接作用」;实线表示「必经/强耦合」。Note: dashed = optional/indirect; solid = mandatory/tight coupling.
    附图 · LLM 训练流程(纵向)与运作流程(横向)Fig · LLM training (vertical) vs inference (horizontal)
    训练三步走Training · 3 steps
    预训练习得通识、后训练对齐指令、强化学习对齐人类偏好;蒸馏与量化负责「压缩」。Pre-training → post-training → RLHF; distillation & quantization compress the model.
    运作三件套Inference · 3 parts
    Prompt → 分词器 → Token →(RAG 检索增强)→ 模型 → 生成结果。RAG 并非必经路径,却将模型从「仅依赖训练数据」拓展为「可检索实时信息」。Prompt → tokenizer → Token → (RAG) → model → output. RAG is optional but unlocks real-time retrieval.
    三种模型形态Three model forms
    稠密(Dense):全部参数参与每次推理。稀疏(Sparse)/ 混合专家(MoE):按需激活部分参数,省算力但调度复杂。Dense: all params active. Sparse / MoE: activate on demand — cheaper but harder to schedule.
    主干三段 · 从 Token 到生成Backbone · token to generation
    现代 LLM 常规主干相对稳定:① 输入嵌入——Tokenizer 切成 Token ID,查表得稠密向量;② Transformer 核心块 ×N 层——RMSNorm + 多头注意力(MHA / GQA / MLA / DSA / KDA,RoPE 作用于 Q/K)+ FFN / MoE(SwiGLU),双残差堆叠;③ 输出解码——LM Head 对词表打分,按温度 / Top-p 采样,新 Token 追加回上下文循环。KV Cache 仅用于推理加速;MTP 可作投机解码候选。The modern decoder-only backbone is stable: ① embedding — tokenizer maps text to token IDs, then dense vectors; ② N stacked blocks — RMSNorm + attention (MHA/GQA/MLA/DSA/KDA, RoPE on Q/K) + SwiGLU / MoE FFN with residuals; ③ decode — the LM head scores the vocabulary, temperature / top-p picks the next token, appended back to the context in a loop. KV Cache accelerates inference only; MTP serves speculative decoding.
    一切训练与推理,最终都汇向「大语言模型」这一核心。All training and inference converge on one core: the LLM.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 35 页 / 共 43 页Page 35 / 43
    模型技术 · KV Cache 机制L2 · How KV Cache Works
    APPENDIX · INFERENCE · 36 / 43
    模型技术Model Tech

    KV Cache 是什么:算过一次的 K/V,之后只读不写What KV Cache Is: Compute Once, Read Forever

    上一行:token 如何一步步算出 K/V;下一行:算出的 K/V 为什么能存、占多少、两阶段瓶颈为何不同——生产优化抓手指路下一页。Top: how each token’s K/V gets computed; below: why it can be cached, what it costs, and why the two stages differ — production levers on the next page.

    Step 1 · Autoregressive
    一次一个 tokenOne token at a time
    模型按已有上下文预测下一个 token,循环往复——生成即逐步展开The model predicts the next token from context, then loops — generation unfolds step by step
    →
    Step 2 · Q / K / V
    每个 token 三份投影Three projections per token
    Q 我要找什么(当前词);K 我是什么可被检索(索引);V 我携带的内容Q what I seek (current token); K what I index by; V the content I carry
    →
    Step 3 · Attention
    Q 与历史 K 打分Q scores against past K
    当前 Q 与每个历史 K 算相似度,加权取对应 V——每生成一个新 token 都要重访全部历史The current Q scores against every past K, weighting their V’s — each new token revisits all history
    →
    Step 4 · KV Cache
    把算过的 K/V 存起来Store computed K/V
    历史 K/V 只依赖前文且永不改变——算一次、存显存、后续直接复用,这就是 KV CachePast K/V depends only on the prefix and never changes — compute once, keep in VRAM, reuse forever: that is the KV Cache
    Mechanism · 01
    为什么能缓存Why caching works
    因果掩码保证:第 i 个 token 的 K/V 只依赖前文,一经计算永不改变——缓存的东西永远不变,所以才能复用。The causal mask guarantees token i’s K/V depends only on preceding tokens and never changes once computed — that immutability is what makes caching sound.
    生成期零重算:历史 K/V 只读不写,新 token 仅算自己的 K/V 并追加Zero recompute at decode: past K/V is read-only; each new token appends only its own
    随长度线性累积:上下文越长、并发越多,缓存账单越大——这是长上下文成本的结构性来源Grows linearly: longer contexts and higher concurrency inflate the memory bill — the structural cost of long context
    无缓存:生成 N token 需 O(N³) 全量重算 → 有缓存:单步线性 O(N)No cache: O(N³) total recompute → cached: O(N) per step
    三条性质 · 这一页要记住的THREE PROPERTIES
    单步成本PER-STEP COST
    O(N)
    无缓存时生成 N 个 token 要做 O(N³) 级重算;缓存后每步只线性扫一遍历史Without a cache, N tokens cost O(N³) recompute; with it, each step is linear
    历史 K/VIMMUTABLE
    只读
    decode 期历史 K/V 不再改写,新 token 只追加自己那一份Past K/V is never rewritten at decode; each new token only appends its own
    显存开销MEMORY
    线性
    ≈ 每 token 字节 × 上下文长度 × 并发数——长上下文贵在这里≈ bytes per token × context length × concurrency — why long context is expensive
    缓存的是 K 和 V,不是答案——省下的是重复计算,付出的是显存。What gets cached is K and V, not answers — you save recomputation and pay in memory.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 36 页 / 共 43 页Page 36 / 43
    模型技术 · KV Cache 代价L2 · The Cost of Cache
    APPENDIX · INFERENCE · 37 / 43
    KV Cache · 显存与两段开销KV Cache · memory and two phases

    缓存不是免费的:每 token 0.3 MB,还要分两段算The Cache Is Not Free: 0.3 MB per Token, and Two Phases

    显存账本已经立起来,代价就落在这两处:占多少显存、卡在哪一段。Once the cache exists, the bill shows up in two places: how much memory, and which phase stalls.

    Mechanism · 02
    显存占用怎么算Sizing the cache
    每 token KV 字节 = 2 × 层数 × KV 头数 × 头维度 × 每值字节数;规划上 KV Cache 通常占剩余显存约 80%。Bytes per token = 2 × layers × KV heads × head dim × bytes per value; in planning, KV Cache typically takes ~80% of spare VRAM.
    实例速算(70B · 32K 上下文):约 80 层 × 8 KV 头 × 128 维 × FP16 ≈ 每 token 0.3 MB,32K 全序列 ≈ 10 GB——一块卡的旗舰显存大半被吃掉Worked example (70B, 32K ctx): ~80 layers × 8 KV heads × 128 dim × FP16 ≈ 0.3 MB per token, so 32K ≈ 10 GB — the lion’s share of one flagship GPU
    GQA 已经省过一轮:KV 头数远少于注意力头数,但 batch × 并发仍会成倍放大占用GQA already helps: KV heads are far fewer than attention heads, yet batch × concurrency still multiplies usage
    Bytes/token = 2 · L · Hkv · d · b(长上下文 = 显存第一大户) (long context = the top VRAM consumer)
    Mechanism · 03
    Prefill vs DecodePrefill vs Decode
    Prefill 一次处理整个输入、算力受限,决定 TTFT;Decode 逐 token 生成、内存带宽受限,决定 TPS——两类瓶颈完全不同。Prefill processes the whole prompt at once, compute-bound, setting TTFT; Decode generates token by token, bandwidth-bound, setting TPS — two fundamentally different bottlenecks.
    指标各有归属:Prefill 决定 TTFT(首字延迟),Decode 决定 TPS(出字速度)——客户体感的"快"由两段共同决定Two metrics, two stages: Prefill sets TTFT, Decode sets TPS — the perceived speed customers feel is decided by both
    混部互相拖累:长输入的 prefill 会阻塞 decode 批次,出字卡顿——分离后各自独立扩缩Mixed deployment hurts both: long-prompt prefill stalls decode batches; disaggregation lets each scale independently
    这是 PD 分离架构的出发点:两阶段拆到不同引擎独立调优This is why PD disaggregation exists: split stages into independently tuned engines
    瓶颈诊断 · 先看哪个指标DIAGNOSIS · WHICH METRIC MOVES
    首字慢 · TTFT 高Slow first token · high TTFT
    卡在 prefill:算力与排队。先动前缀缓存、批处理与 PD 分离——把长 prompt 的重复计算砍掉Stuck in prefill (compute and queueing). Start with prefix caching, batching, PD disaggregation
    出字慢 · TPS 低Slow streaming · low TPS
    卡在 decode:内存带宽。先动 KV 量化(FP8)、GQA/MLA 与更大 batch——让每步读得更少Stuck in decode (bandwidth). Start with FP8 KV, GQA/MLA and larger batches
    算一笔账 · 用这页自己的两个数往下推Do the arithmetic — with this page's own two numbers
    32K × 0.3 MB
    ≈ 9.6 GB,只装一个会话的 KV。一张 80GB 卡扣掉权重和激活,同时跑也就四到六个。≈ 9.6 GB for one session's KV. On an 80GB card, after weights and activations, that is four to six concurrent sessions.
    KV 换 FP8
    ≈ 4.8 GB,同卡并发翻倍——吞吐上去,单价跟着下来。≈ 4.8 GB; concurrency doubles on the same card, so throughput rises and unit price falls.
    两段拆开
    Prefill 与 Decode 各自扩缩容,长 prompt 不再卡住别人出字。Prefill and Decode scale independently; a long prompt no longer stalls everyone else's output.
    三个数字指向同一件事:KV 占的是显存,显存决定并发,并发决定单价。所以优化 KV,从来不是为了省显存本身。All three point the same way: KV occupies VRAM, VRAM sets concurrency, concurrency sets unit price. Optimizing KV was never about saving VRAM for its own sake.
    因果掩码保证 K/V 永不改变——所以能缓存;KV Cache = 用显存换重复计算。The causal mask keeps K/V immutable — that is why caching works. KV Cache = trading memory for recomputation.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 37 页 / 共 43 页Page 37 / 43
    模型技术 · 推理优化四抓手L2 · Four Levers
    APPENDIX · INFERENCE · 38 / 43
    模型技术 · 续Model Tech · Cont.

    KV Cache 怎么优化:四大生产抓手Optimizing KV Cache: Four Production Levers

    接上一页——显存账单已经立起来,这一页讲怎么把它压下来:管理、复用、压缩、路由,外加一条客户侧立即可用的协议通道。Picking up from the previous page — now how to shrink the memory bill: manage, reuse, compress, route, plus a protocol path usable on the client side today.

    Lever · 01
    PagedAttentionPagedAttention
    传统推理引擎按请求整块预留连续显存,碎片率可高达 60–80%;按页分配后几乎归零。Engines reserve contiguous VRAM per request, wasting 60–80% to fragmentation; page-level allocation wipes it out.
    同源思想:与操作系统虚拟内存分页同构,vLLM 引擎的核心机制Same idea as OS paging: the core mechanism inside the vLLM engine
    副产物:逻辑连续、物理离散——同请求的块可分散存放,显存利用率接近 100%Side effect: logically contiguous, physically scattered — a request’s blocks may live anywhere, utilization near 100%
    fragmentation 60-80% → ~0
    Lever · 02
    分层存储 G1–G4Tiered storage G1–G4
    四级缓存按带宽递减排列:GPU 显存 → CPU 内存 → SSD → 远端;热 block 常驻高层,冷 block 下沉。Four tiers by bandwidth: VRAM → host memory → SSD → remote; hot blocks stay high, cold ones sink.
    规划口径:KV Cache 通常占剩余显存约 80%,分层是扩展上下文的第一杠杆Planning rule: KV Cache takes ~80% of spare VRAM; tiering is the first lever for longer context
    换层代价:每下一层带宽降一个量级,命中层的选择直接决定 decode 速度Tier-miss cost: each tier down drops bandwidth by an order of magnitude; where blocks land sets decode speed
    G1 VRAM (TB/s) → G4 remote
    Lever · 03
    Prefix CachingPrefix Caching
    相同前缀直接复用已有 KV、跳过整段 prefill;匹配从序列开头逐 token 比对,遇第一个不同 token 即止。Shared prefixes reuse cached KV and skip that prefill; matching walks token by token and stops at the first divergence.
    高价值场景:固定 system prompt、多轮对话携全量历史;无效场景:前缀完全随机High value: fixed system prompts, multi-turn history; no value: fully random prefixes
    命中率公式:共享前缀越长、请求越集中,节省越大——协议侧传 prompt_cache_key 是前提Hit-rate logic: the longer the shared prefix and the more concentrated the traffic, the bigger the saving — needs prompt_cache_key
    TTFT ↓ · prefill cost ↓
    Lever · 04
    缓存感知路由Cache-aware routing
    会话亲和(session affinity):同一用户、同一会话固定路由到同一副本,直接命中其热缓存。Session affinity: pin a user’s session to the same replica and hit its warm cache every time.
    调度原则:先算各副本已有前缀,新请求优先派给命中率最高的节点Scheduling: route each new request to the replica with the best prefix match
    失衡代价:亲和把负载与缓存绑定,需配合水位迁移,否则热点副本先被打满Skew cost: affinity ties load to cache; without water-mark migration the hot replica saturates first
    cache hit rate ↑
    落地顺序 · 从零成本到高成本ROLLOUT ORDER · CHEAPEST FIRST
    01 · 零改造01 · No code change
    协议层先传 prompt_cache_key / X-Session-Id,把前缀命中打开——不用改模型、不用改引擎Send prompt_cache_key / X-Session-Id at the protocol layer to switch prefix hits on
    02 · 调度层02 · Scheduling
    session affinity 加命中率优先路由,让同一会话固定落在有热缓存的副本上——把命中率从偶然变常态Session affinity plus hit-rate-first routing pins a session to the replica that already holds its cache
    03 · 引擎层03 · Engine
    分页(PagedAttention)+ 分层(G1–G4)+ KV 量化:动的是显存与带宽,收益最大也最重Paging, tiering and KV quantization move memory and bandwidth — biggest gain, heaviest lift
    四个抓手的顺序本来就是省力的:先开协议开关,再调调度,最后才动引擎。The levers have a cheap-to-expensive order: protocol switch first, then scheduling, and only then the engine.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 38 页 / 共 43 页Page 38 / 43
    模型技术 · 推理优化补充L2 · Further Optimizations
    APPENDIX · INFERENCE · 39 / 43
    三类补充手段 · 量化与分离Three extra levers · quantization and splitting

    四个抓手之外:量化、分离、协议开关Beyond the Four Levers: Quantization, Disaggregation, Protocol

    还有三类手段能把成本再压一档,且都不需要改模型。Three more dials push cost down — none of them touch the model.

    量化压缩Quantization
    各组件敏感度从低到高:线性层权重 → 激活 → KV Cache → 注意力(softmax 几乎总以原生精度计算);KV Cache 量化到 FP8 是生产甜点,显存约省一半。Sensitivity, low to high: linear weights → activations → KV Cache → attention (softmax stays near-native); quantizing KV Cache to FP8 is the production sweet spot, halving memory.
    FP8 = VRAM ↓ ~50%
    PD 分离PD disaggregation
    Prefill 算力受限、Decode 带宽受限——两类瓶颈拆到不同引擎独立调优,中间以 KV Cache 传输衔接。Prefill is compute-bound, Decode bandwidth-bound — split them into independently tuned engines, connected by KV Cache transfer.
    TTFT ↓ & TPS ↑
    GLM 协议抓手GLM protocol hooks
    提升上下文缓存命中率:OpenAI Chat 兼容协议用 X-Session-Id 请求头;OpenAI Responses 协议用 prompt_cache_key 字段——多轮对话与会话级复用的直接开关。To raise cache hits: send X-Session-Id under the OpenAI Chat-compatible protocol, or prompt_cache_key under OpenAI Responses — the direct switches for multi-turn and session-level reuse.
    三类手段的代价与前提COST & PREREQUISITE
    量化 · FP8 KVQuantization · FP8 KV
    前提:引擎支持 FP8 的 KV 存储;风险:精度敏感任务要先跑评测,不能默认无损Needs engine support for FP8 KV; run evals first on accuracy-sensitive tasks
    PD 分离PD disaggregation
    前提:一条 KV 传输通道 + 两套引擎的运维能力;集群规模不够大时,拆分反而摊薄收益Needs a KV transfer path and two engine fleets; below a certain cluster size the split dilutes returns
    协议开关Protocol switches
    成本几乎为零,但要求请求侧前缀稳定、会话有粘性——前缀天天变,命中率不会自己长出来Nearly free, but only if prefixes are stable and sessions stick — random prefixes never hit
    改完怎么验收 · 四步,少一步结论就不成立How to validate a change — four steps, skip one and the conclusion fails
    01 · BASELINE
    先记底数Record the baseline
    同一批请求、同一模型版本跑三遍取中位数:TTFT、TPS、每千 Token 单价。Same batch, same model version, three runs, take the median: TTFT, TPS, price per 1K tokens.
    02 · ONE AT A TIME
    一次只改一项Change one thing
    量化、分离、协议开关分开上;一起上,变好了也不知道是谁的功劳,出问题也定位不了。Quantization, disaggregation and the protocol switch go in separately — ship them together and you cannot attribute the win or the regression.
    03 · SAME BATCH
    用同一批请求复跑Rerun the same batch
    换数据集等于换考题,前后不可比。Swap the dataset and you swapped the exam; the numbers no longer compare.
    04 · THREE METRICS
    三个指标一起看Watch all three
    只盯单价会漏掉延迟,只盯延迟会漏掉成本转移——三项同向变好才算真赢。Watching only price hides latency; watching only latency hides shifted cost. All three must move the same way.
    管理(分页)、复用(前缀+路由)、压缩(FP8)、分离(PD)——四类抓手叠用,推理成本可以差出一个量级。Manage (paging), reuse (prefix + routing), compress (FP8), disaggregate (PD) — stacked together, these levers move inference cost by an order of magnitude.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 39 页 / 共 43 页Page 39 / 43
    模型技术 · GLM 缓存实操L2 · GLM Cache Playbook
    APPENDIX · INFERENCE · 40 / 43
    模型技术 · 实操Model Tech · Playbook

    让缓存真正命中:GLM 显式缓存实操指南Making Cache Actually Hit: GLM Explicit-Cache Playbook

    上一页 Lever 03/04 的协议抓手落地页——隐式缓存免费但看运气,显式缓存两个参数把「同会话请求」钉到同一条缓存链路,命中率、TTFT、成本三改善。The protocol-level landing for Levers 03/04 — implicit cache is free but luck-dependent; two explicit parameters pin same-session requests onto one cache chain, improving hit rate, TTFT and cost together.

    Step 1 · Implicit
    隐式缓存:默认开、免配置Implicit: on by default
    GLM-5.3 / 5.2 / 5 系内置上下文缓存,服务端自动识别相同或高度相似输入并复用,命中部分按优惠价计费。但它只管「内容像不像」,不管「请求送到哪台机器」——多轮对话被负载均衡打散到无缓存节点,cached_tokens 就会莫名偏低。GLM-5.3/5.2/5 ship implicit caching: the server auto-detects similar inputs and reuses them at a discount. But it only sees content similarity, not routing — when load balancing scatters a session across cold nodes, cached_tokens mysteriously drops.
    # 什么都不用改,请求原样发
    POST /api/paas/v4/chat/completions
    {"model":"glm-4.6","messages":[...]}
    生效前缀 ≥ 1–2K Token,且与上次请求逐字一致——空格、换行、工具定义顺序都算差异
    失效开头塞了时间戳 / 用户名 / 随机 ID:第一个 Token 就变了,后面全部作废
    省在哪命中部分按缓存价计费;省下的 KV 重算也直接体现为 TTFT 下降
    Step 2 · Explicit
    显式缓存:会话亲和,二选一Explicit: session affinity, either one
    给请求打上会话标签,同标签请求尽量调度到同一条缓存链路:HTTP Header 传 X-Session-Id,或 body 传 prompt_cache_key——二选一即可,同时传时 X-Session-Id 优先。多轮对话、Agent 连续工具调用、同文档多次提问、固定 System Prompt 批处理是四大典型场景。Claude Code 等工具默认已带同类字段。Tag requests with a session label and they get pinned to one cache chain: X-Session-Id via HTTP header, or prompt_cache_key in the body — pick one; if both are sent, X-Session-Id wins. Multi-turn chat, agent tool loops, repeated doc Q&A and fixed-system-prompt batch jobs are the four sweet spots. Claude Code already sends an equivalent field by default.
    # 把会话钉在同一个副本上
    X-Session-Id: user-8841-thread-07
    # Responses 协议换成字段
    {"prompt_cache_key":"acme-handbook-v3"}
    断点位置放在「长期不变」与「每轮都变」的交界——人设 + 工具定义 + 历史摘要之后
    一会话一 key同一用户的不同话题分开;两份无关前缀塞进一个 key,两边都不命中
    别硬凑低频会话本来命中不了几次,强加会话亲和只换来调度倾斜,不划算
    Step 3 · Verify
    验证:一个字段算命中率Verify: one field, one ratio
    命中率 = cached_tokens / prompt_tokens(响应 usage.prompt_tokens_details)。验证法:取 2000+ Token 固定 System Prompt,冷启动一次后携相同 ID 再请求,看 cached_tokens 是否逼近共同前缀长度;再跑一组不带 ID 的对照组,两组之差就是真实收益。Hit rate = cached_tokens / prompt_tokens from usage.prompt_tokens_details. To verify: take a 2000+ token fixed system prompt, warm it once, re-request with the same ID and watch cached_tokens approach the shared prefix; a no-ID control group shows the true gain.
    # 看这两个数就知道命中没有
    "prompt_tokens": 2048,
    "prompt_tokens_details": {"cached_tokens": 1792}
    # 命中率 1792 / 2048 = 87.5%
    合格线同一份前缀从第二轮起应接近 90%;明显偏低先怀疑前缀被动态内容切断
    别只看总量总量在涨而 cached_tokens 没涨,说明命中的是短前缀,不是你以为的那段
    排查动作把两次请求的 prompt 打出来做 diff,看前 N 个 Token 是不是每次都一样
    三种协议的支持矩阵Protocol support matrix
    协议Protocol端点EndpointX-Session-Idprompt_cache_key
    OpenAI Chat/api/paas/v4/chat/completions✓ Header✓ Body
    OpenAI Responses/api/v1/responses✓ Header✓ Body
    Anthropic/api/anthropic/v1/messages✓ Header✗不支持not supported
    Key 怎么取Key rules
    同一会话全程复用、新会话换新值、不同用户绝不共用、全业务固定一个值 = 反模式;用 UUID/ULID 等不透明值,勿放姓名、手机号、API Key。批量任务特殊规则:同一份 System Prompt 或长文档共用一个 ID。Reuse within a session, regenerate per new session, never share across users, one global value = anti-pattern; use UUID/ULID, never PII or API keys. Batch jobs: one ID per fixed system prompt or long document.
    UUID / ULID · no PII
    隐式缓存看内容、显式缓存管路由——把 Key 传对、把前缀排稳,多轮对话的缓存命中率是可以「配置」出来的。Implicit caching reads content, explicit caching owns routing — with the right key and a stable prefix, multi-turn cache hit rate becomes something you can configure.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 40 页 / 共 43 页Page 40 / 43
    模型技术 · Cache 商业价值L2 · Business Value of Cache
    APPENDIX · INFERENCE · 41 / 43
    模型技术 · 商业账Model Tech · The Money View

    Cache 率就是折扣率:省钱、稳集群、换资源Cache Rate Is the Discount Rate: Save, Stabilize, Trade

    官方 9.15 Cache 培训口径——命中部分按输入价 25% 计费;对平台它是集群健康度指标,对客户它是真金白银的折扣,85% 已成为 TPM 资源申请的新基准线。Official Sep-15 training numbers — cached tokens bill at 25% of input price; for the platform it is a cluster-health metric, for customers a real discount, and 85% is now the TPM baseline.

    Money · 折扣阶梯 · Discount ladder
    命中率越高,折扣越深Higher hit rate, deeper discount
    命中率Hit输入Input总成本Total等同折扣As-if
    0%¥0.80¥0.828原价(10 折)list (10/10)
    50%¥0.50¥0.5286.4 折/10
    90%¥0.26¥0.2883.5 折/10
    95%(生产水位)(prod)¥0.23¥0.2583.1 折/10
    输出价不变(¥0.028);90% 命中 ≈ 输入价打到 3 折区间——长上下文客户的成本杠杆第一来源。Output price unchanged (¥0.028); a 90% hit rate lands input cost in the ~30% range — the No.1 cost lever for long-context customers.
    Platform · 集群稳定性 · Cluster stability
    高命中率 = 不扩容释放算力High hits = free capacity
    Prefill 是计算最密集阶段;同前缀只算一次,全集群等效「白得」一批 GPU。五重收益:Prefill is the most compute-dense stage; computing each prefix once frees GPU fleet-wide. Five compounding wins:
    ①容量:高峰排队与限流(429)概率下降,大并发客户可用性更稳Capacity: fewer peak-hour queues and 429s; steadier availability for high-concurrency tenants
    ②延迟:TTFT 分布收敛、P99 收窄,SLO 达标率提升Latency: TTFT distribution tightens, P99 narrows, SLO attainment rises
    ③占用:请求快进快出,打破「占用久→排队→超时重试→压力放大」循环Occupancy: requests finish and release fast, breaking the queue-timeout-retry spiral
    ④批处理:长 prefill 不再阻塞同批 decode,单卡吞吐更高Batching: long prefills stop blocking peer decodes; higher per-GPU throughput
    ⑤韧性:同样余量吸收更大流量尖峰,降低级联过载风险Resilience: the same headroom absorbs bigger spikes with less cascade risk
    Anti-patterns · 反面场景 · What kills cache
    六种把 Cache 打穿的做法Six ways to kill your cache
    1易变信息前置:时间戳/请求 ID/随机数拼在最前,第一 token 即分歧,整条从零算Volatile-first: timestamps/IDs/randoms up front diverge at token one
    2system 内嵌动态字段:日期/用户名/实验参数写进 system,其后最长指令全部失效Dynamic system fields: dates/user flags inside system kill the longest prefix
    3RAG 片段前置:检索内容每轮不同还放前面,稳定指令永远进不了可复用前缀RAG-first: per-turn retrievals up front keep stable instructions out of the prefix
    4强个性化多租户:每用户独立 system prompt,前缀互不相同无法复用Per-user systems: tenant-specific prompts share nothing
    5历史重写:每轮摘要压缩/滑窗截断/消息重排,前缀自第一处变化起作废History rewrites: summarize/trim/reorder each turn invalidates from first change
    6离线批处理:每条输入主体不同,仅头部公共指令可命中,还易形成 prefill 高峰Offline batch: distinct bodies per request; only the header hits, spikes prefill
    对客户讲折扣(95% 命中 = 3.1 折),对平台讲容量(不扩容释放算力)——Cache 率是买卖双方利益对齐的那个交点。Pitch it as discount to customers (95% hits = 69% off) and as capacity to the platform — cache rate is where both sides’ interests align.
    附件 · 模型训练与推理APPENDIX · TRAINING & INFERENCE
    第 41 页 / 共 43 页Page 41 / 43
    合规声明 · LegalCompliance · Legal
    LEGAL · 42 / 43
    合规Legal

    合规免责声明Compliance & Disclaimer Notice

    本声明适用于本演示文稿全部页面,关键条款摘编如下。This notice applies to all pages of this deck — key terms summarized below.

    一、文件性质与信息用途1. Nature & Purpose

    本文件由智谱员工编制,仅供一般参考;所载内容(含产品介绍、技术参数、性能指标、定价及案例数据)均不构成任何形式的要约、要约邀请、投资建议、承诺、保证或合同条款,亦不构成法律、商业、财务或税务意见;不得依赖本文件作出投资、采购或其他商业决策。Prepared by a Zhipu employee for general reference only. Nothing herein — product descriptions, technical parameters, performance metrics, pricing or case data — constitutes an offer, invitation, investment advice, commitment, warranty or contractual term, nor legal, commercial, financial or tax advice.

    二、以官方文件为准2. Precedence of Official Documents

    如本文件与公司正式发布的官方文件(含披露公告、定期报告、官方技术文档、刊例价目表及正式合同)存在任何差异或不一致,一律以公司官方文件为准;本文件不构成对官方文件的替代、修订或补充。In case of any discrepancy with officially released documents (disclosure filings, periodic reports, official technical documentation, published price lists, formal contracts), the official documents shall prevail in all respects.

    三、适用法域特别声明3. Jurisdiction-Specific Statements

    中国内地:本文件并非《证券法》等法规项下的信息披露文件,不构成证券投资咨询活动。中国香港特别行政区:并非《证券及期货条例》所界定的招股章程、发售文件或受规管广告。中国澳门特别行政区:并非须经事先审批的金融产品宣传品。Mainland China: not a disclosure document under the PRC Securities Law, nor securities-investment consultancy. Hong Kong SAR, China: not a prospectus or regulated advertisement under the SFO. Macao SAR, China: not regulated financial-product promotional material.

    四、版权与知识产权4. Copyright & IP

    本文件全部内容(含文字、图表、版式设计及所含商标与标识)的知识产权均归公司或其权利人所有;未经事先书面许可,不得复制、转载、摘编、传播或用于商业用途。第三方数据与商标归属其各自权利人,引用仅用于说明目的。All IP herein is vested in the Company or its licensors; no reproduction, adaptation or commercial use without prior written consent. Third-party data and trademarks belong to their respective owners, cited for illustration only.

    五、责任限制5. Limitation of Liability

    在适用法律允许的最大范围内,公司对本文件所载内容因任何原因引起的任何直接、间接、附带、惩罚性或后果性损失(含利润损失、业务中断或数据丢失)不承担任何责任;本文件不创设任何明示或默示的保证。To the maximum extent permitted by law, the Company shall not be liable for any direct, indirect, punitive or consequential loss arising from the contents hereof; no warranty, express or implied, is created.

    六、信息时效性与最终解释6. Currency of Information

    所载信息仅反映编制时点情况,产品规格、性能数据、定价及服务条款可能随时调整而恕不另行通知;部分第三方评测结果存在取数时效,以对应出处披露为准。本声明的解释、效力及争议解决均适用中华人民共和国法律。Information reflects the preparation date only; specifications, performance data, pricing and terms may change without notice. Third-party evaluations are time-sensitive per their original disclosures. Governed by the laws of the PRC.

    合规与致谢LEGAL & THANKS
    第 42 页 / 共 43 页Page 42 / 43
    THANK YOU

    谢谢聆听Thank You

    从「会聊」到「会干」:Agent 浪潮下的大模型与中国路径 From "Chatting" to "Doing": The Agent Wave, Foundation Models, and China's Path

    主讲人:肖睿璇 RosheenSpeaker: Xiao Ruixuan (Rosheen)
    如有商务需求,烦请联系 ruixuan.xiao@aminer.cn Business inquiries: ruixuan.xiao@aminer.cn
    WeChat QR Code 扫码添加微信Scan QR to connect