diff --git a/articles/003-GPT-5.4 深度解析:OpenAI 的全能战士来了.md b/articles/003-GPT-5.4 深度解析:OpenAI 的全能战士来了.md new file mode 100644 index 0000000..a5ad6b4 --- /dev/null +++ b/articles/003-GPT-5.4 深度解析:OpenAI 的全能战士来了.md @@ -0,0 +1,299 @@ +# GPT-5.4 深度解析:OpenAI 的全能战士来了 + +> 发布日期:2026-03-16 +> 分类:技术解读 / 深度分析 +> 作者:老邓唠AI + +![封面](https://cdn.union.jxyunge.com/self-media/003/cover.png) + +## 引子:这次不只是"更强",而是"会干活了" + +3 月 5 日深夜,OpenAI 扔出了一颗重磅炸弹——**GPT-5.4**。 + +如果你以为这又是一次"跑分更高、回答更准"的常规升级,那你低估了这次更新的意义。GPT-5.4 不只是变聪明了,它**第一次学会了操作电脑**。 + +是的,你没看错。它能看到你的屏幕截图,然后像一个真人一样移动鼠标、点击按钮、敲键盘——帮你订机票、填表格、发邮件、操作 Excel。在桌面操作测试中,**它的表现超越了人类**。 + +这不是概念演示。这是已经上线的 API,任何开发者今天就能调用。 + +今天老邓带你全面拆解 GPT-5.4 的六大核心能力、跑分数据、定价策略,以及它跟 Claude Opus 4.6、Gemini 3.1 Pro 的正面对决。 + +--- + +## 一、GPT-5.4 是什么? + +GPT-5.4 是 OpenAI 于 2026 年 3 月 5 日发布的最新旗舰模型,官方定义为**"最强大且高效的专业工作前沿模型"**。 + +它不是一个模型,而是**一个模型家族**: + +| 版本 | 定位 | 适用人群 | +|------|------|---------| +| **GPT-5.4** | 标准版,日常专业工作 | ChatGPT Plus / Team / API 开发者 | +| **GPT-5.4 Thinking** | 推理增强版,展示思考过程 | ChatGPT Plus / Team / Pro | +| **GPT-5.4 Pro** | 最高性能版,极限推理深度 | ChatGPT Pro / Enterprise / API | + +三个版本共享同一个基座模型,区别在于**推理深度**和**计算资源分配**。 + +![GPT-5.4 能力全景](https://cdn.union.jxyunge.com/self-media/003/capability-stack.svg) + +![GPT-5.4 模型家族](https://cdn.union.jxyunge.com/self-media/003/diagram-01-model-family.png) + +--- + +## 二、六大核心能力拆解 + +![六大核心能力思维导图](https://cdn.union.jxyunge.com/self-media/003/diagram-02-capabilities.png) + +### 2.1 原生计算机操控(Computer Use) + +这是 GPT-5.4 最炸裂的能力——**OpenAI 首个原生支持计算机操控的通用模型**。 + +![GPT-5.4 官方宣传图](https://cdn.union.jxyunge.com/self-media/003/openai-gpt54.png) + +它的工作方式很直觉: + +![Computer Use 工作流程](https://cdn.union.jxyunge.com/self-media/003/diagram-03-computer-use.png) + +1. **看屏幕**:模型接收桌面/浏览器的截图 +2. **理解界面**:识别按钮、输入框、菜单等 UI 元素 +3. **发出指令**:返回结构化的鼠标移动、点击、键盘输入动作 +4. **你的程序执行**:由你的代码(harness)将这些动作应用到真实环境 + +简单说,GPT-5.4 就像一个**坐在你电脑前的远程助手**,看着屏幕告诉你"点这里、输入那个"。 + +**实际能做什么?** + +- 自动填写复杂的 Web 表单 +- 跨应用操作工作流(打开邮件 → 读取内容 → 创建日历事件) +- 操作 ERP、CRM 等企业系统 +- 自动化测试 Web 应用 + +**跑分有多强?** + +| 基准测试 | GPT-5.4 | GPT-5.2 | 人类表现 | +|---------|---------|---------|---------| +| OSWorld-Verified(桌面操作) | **75.0%** | 47.3% | 72.4% | +| WebArena-Verified(浏览器操作) | **67.3%** | - | - | +| Online-Mind2Web(截图识别) | **92.8%** | - | - | + +**OSWorld 75.0%,人类 72.4%——AI 在桌面操作任务上,第一次超越了人类基准。** + +![OSWorld 桌面操作基准测试](https://cdn.union.jxyunge.com/self-media/003/diagram-04-osworld.png) + +当然也有局限:截图传输有延迟,密集 UI 元素(如超大表格)的精确度还不够完美。但作为 v1 版本,这个起点已经足够惊艳。 + +--- + +### 2.2 百万级上下文窗口 + +GPT-5.4 的标准上下文窗口为 **272K tokens**(比 GPT-5.3 Codex 的 200K 扩大了 36%),而通过 Codex 配置,可以解锁高达 **100 万 tokens** 的超大上下文。 + +100 万 tokens 是什么概念? + +| 内容类型 | 大约容量 | +|---------|---------| +| 普通中文文字 | 约 150 万字 | +| 代码 | 约 75 万行 | +| PDF 文档 | 约 3000 页 | + +这意味着你可以把**一整个代码仓库**、**一本完整的技术手册**、或者**几个月的聊天记录**一次性喂给模型,它都能理解和引用。 + +对于 Agent 场景尤其关键——智能体在执行长链条任务时,不会因为"忘了之前做过什么"而翻车。 + +![上下文窗口演进](https://cdn.union.jxyunge.com/self-media/003/diagram-05-context-window.png) + +--- + +### 2.3 上下文压缩(Compaction) + +大上下文的问题是**贵**。100 万 tokens 每个请求都要收费,成本飞涨。 + +GPT-5.4 引入了一个巧妙的解决方案——**Compaction(上下文压缩)**。这是 OpenAI 首个在主线模型中训练支持的压缩能力。 + +![上下文压缩原理](https://cdn.union.jxyunge.com/self-media/003/diagram-06-compaction.png) + +它的原理是:在长对话或 Agent 执行过程中,模型会**自动总结和压缩早期的上下文**,保留关键信息,丢弃冗余细节。这样即使对话轮次很多,也不会撑爆上下文窗口。 + +开发者可以通过两个参数来控制: +- `model_context_window`:设置最大上下文窗口 +- `model_auto_compact_token_limit`:设置触发自动压缩的阈值 + +--- + +### 2.4 工具搜索(Tool Search) + +这是一个面向 API 开发者的重磅特性。 + +传统做法是把所有工具的定义一股脑塞进 prompt,100 个工具的 schema 轻松吃掉几万 tokens。**GPT-5.4 的工具搜索彻底改变了这个局面。** + +新方案: +1. 模型只接收一个**轻量的工具列表**(名称 + 简短描述) +2. 需要用某个工具时,**按需加载**该工具的完整定义 +3. 用完即弃,不占用后续请求的 token + +效果?**Token 使用量直降 47%,准确率不变。** + +对于构建大规模 Agent 系统的团队来说,这意味着成本直接砍半。 + +![传统方式 vs Tool Search](https://cdn.union.jxyunge.com/self-media/003/diagram-07-tool-search.png) + +--- + +### 2.5 可配置推理深度 + +GPT-5.4 提供了 **5 档推理深度**,开发者可以精细控制模型的"思考力度": + +| 档位 | 用途 | 成本 | +|------|------|------| +| `none` | 直接回答,不推理 | 最低 | +| `low` | 简单逻辑、摘要 | 低 | +| `medium` | 通用场景,平衡性价比 | 中 | +| `high` | 多步分析、自我修正 | 高 | +| `xhigh` | 极限推理,科研级 | 最高 | + +不同场景用不同档位,简单问题不浪费算力,复杂问题全力以赴——这是一个非常实用的成本优化手段。 + +![可配置推理深度](https://cdn.union.jxyunge.com/self-media/003/diagram-08-reasoning.png) + +--- + +### 2.6 编码能力大幅升级 + +GPT-5.4 融合了 GPT-5.3 Codex 的编码能力,在代码任务上表现惊人: + +| 基准测试 | GPT-5.4 | GPT-5.3 Codex | Claude Opus 4.6 | +|---------|---------|---------------|-----------------| +| SWE-Bench Verified | **~80.0%** | 75.2% | 80.8% | +| HumanEval | **95.1%** | 93.8% | 94.6% | +| Terminal-Bench 2.0 | **75.1%** | - | 65.4% | +| SWE-Bench Pro | **57.7%** | - | - | + +在 SWE-Bench Verified(真实 GitHub issue 修复能力)上,GPT-5.4 与 Claude Opus 4.6 仅差 0.8 个百分点,几乎持平。而在 Terminal-Bench 2.0(终端操作能力)上,GPT-5.4 以 75.1% 的成绩大幅领先。 + +--- + +## 三、专业知识工作:逼近人类专家 + +GPT-5.4 最让行业震动的数据来自 **GDPval 基准测试**——这个测试覆盖 44 个职业领域,衡量模型在"真实经济价值工作"中的表现。 + +| 指标 | GPT-5.4 | GPT-5.2 | 提升 | +|------|---------|---------|------| +| GDPval 综合 | **83.0%** | 70.9% | +12.1% | +| 投行电子表格建模 | **87.3%** | 68.4% | +18.9% | +| 演示文稿偏好率 | **68.0%** | 32.0% | - | +| 错误率降低 | **-33%** | - | 单个陈述 | +| 整体回答错误率降低 | **-18%** | - | 完整回答 | + +**83% 的 GDPval 成绩意味着什么?** 在 44 个职业领域中,GPT-5.4 的工作输出质量已经**接近行业从业者的平均水平**。投行建模 87.3%,比 GPT-5.2 猛涨近 19 个百分点——这不是微调,这是质的飞跃。 + +![GDPval 知识工作基准测试(官方图表)](https://cdn.union.jxyunge.com/self-media/003/gdpval-chart.png) + +![GPT-5.4 vs GPT-5.2 关键指标提升](https://cdn.union.jxyunge.com/self-media/003/diagram-09-gdpval.png) +> 浅色 = GPT-5.2,深色 = GPT-5.4 + +--- + +## 四、三国争霸:GPT-5.4 vs Claude Opus 4.6 vs Gemini 3.1 Pro + +2026 年 3 月,三大 AI 巨头的旗舰模型罕见地同台竞技。老邓帮你拉了一张全维度对比表: + +### 4.1 基准跑分对比 + +| 基准测试 | GPT-5.4 | Claude Opus 4.6 | Gemini 3.1 Pro | 谁赢了 | +|---------|---------|-----------------|----------------|--------| +| GDPval(知识工作) | **83.0%** | 78.0% | - | GPT-5.4 | +| GPQA Diamond(科学推理) | 92.8% | 91.3% | **94.3%** | Gemini | +| ARC-AGI-2(抽象推理) | 73.3% | 75.2% | **77.1%** | Gemini | +| MMMU Pro(视觉理解) | 81.2% | **85.1%** | 80.5% | Claude | +| SWE-Bench Verified(代码修复) | ~80.0% | **80.8%** | 80.6% | Claude(微弱) | +| Terminal-Bench 2.0(终端操作) | **75.1%** | 65.4% | 68.5% | GPT-5.4 | +| OSWorld(桌面操控) | **75.0%** | - | - | GPT-5.4 | +| BrowseComp(网页浏览) | 82.7% | 84.0% | **85.9%** | Gemini | + +### 4.2 定价对比 + +| 模型 | 输入价格(/百万 tokens) | 输出价格(/百万 tokens) | 上下文窗口 | +|------|----------------------|----------------------|-----------| +| Gemini 3.1 Pro | **$2** | **$12** | 2M | +| GPT-5.4 | $2.50 | $15 | 272K(最大 1M) | +| Claude Opus 4.6 | $5 | $25 | 200K | +| GPT-5.4 Pro | $30 | $180 | 272K(最大 1M) | + +### 4.3 各家优势领域一目了然 + +![三大模型优势领域对比](https://cdn.union.jxyunge.com/self-media/003/diagram-10-comparison.png) + +### 4.4 怎么选? + +**一句话总结:没有全能冠军,只有场景之王。** + +- **选 GPT-5.4**:如果你需要**桌面自动化、知识工作、工具编排**——它是唯一一个 Computer Use 超越人类的模型 +- **选 Claude Opus 4.6**:如果你的核心场景是**代码开发、多文件重构、视觉理解**——它在 SWE-Bench 和 MMMU Pro 上仍然最强 +- **选 Gemini 3.1 Pro**:如果你**预算有限但要求高质量推理**——它用 GPT-5.4 Pro 十五分之一的价格,达到了同级别的科学推理水平 + +--- + +## 五、定价与可用性 + +### 5.1 API 定价 + +| 模型 | 输入 | 输出 | 备注 | +|------|------|------|------| +| GPT-5.4 | $2.50/M | $15/M | 标准档 | +| GPT-5.4 Pro | $30/M | $180/M | 极限性能 | +| Batch 模式 | 标准 50% | 标准 50% | 异步批量处理 | +| Flex 模式 | 标准 50% | 标准 50% | 弹性定价 | +| Priority 模式 | 标准 200% | 标准 200% | 优先响应 | + +### 5.2 谁能用? + +| 渠道 | 可用版本 | +|------|---------| +| ChatGPT Plus / Team | GPT-5.4 Thinking | +| ChatGPT Pro / Enterprise | GPT-5.4 Thinking + GPT-5.4 Pro | +| API | gpt-5.4、gpt-5.4-pro | + +GPT-5.2 Thinking 将保留至 **2026 年 6 月 5 日**,之后下线。如果你还在用旧版,记得提前迁移。 + +![API 输出价格对比](https://cdn.union.jxyunge.com/self-media/003/diagram-11-pricing.png) + +![模型选择指南](https://cdn.union.jxyunge.com/self-media/003/model-selection-map.svg) + +--- + +## 六、老邓的观点 + +说几句大实话。 + +**GPT-5.4 最大的意义不在跑分,而在 Computer Use。** + +跑分上,GPT-5.4、Claude Opus 4.6、Gemini 3.1 Pro 三家在大多数评测中只差 2-3 个百分点,说实话对普通用户几乎没有体感差异。真正拉开差距的是**能力维度的拓展**。 + +Computer Use 让 AI 第一次真正能"用电脑"。这不是花活,这是生产力工具的范式转变。想象一下: + +- 财务人员让 AI 自动操作 SAP 系统出报表 +- 运营人员让 AI 自动在后台批量上架商品 +- HR 让 AI 自动在多个招聘平台发布岗位 + +这些场景以前需要 RPA(机器人流程自动化)工具,写一堆脆弱的规则脚本。现在?给 GPT-5.4 一个截图,它自己看着干。 + +当然,v1 版本还有明显的局限——延迟、精确度、安全边界都需要打磨。但方向是对的,OpenAI 在这一局抢了先手。 + +**另一个被低估的特性是 Tool Search。** 47% 的 token 节省对大规模 Agent 系统来说是巨大的成本优化,这个设计思路值得所有做 AI 应用的团队学习。 + +**最后说说价格。** Gemini 3.1 Pro 用十五分之一的价格打到了同级别的推理水平,Google 在性价比上确实卷得最狠。但 OpenAI 的 Batch 和 Flex 半价模式也很香,异步场景下成本可以压得很低。 + +总之,2026 年的 AI 模型市场,已经不是"谁最强"的问题了,而是**"谁在你的场景里最合适"**。 + +--- + +## 参考资料 + +- [Introducing GPT-5.4 | OpenAI](https://openai.com/index/introducing-gpt-5-4/) +- [OpenAI launches GPT-5.4 with Pro and Thinking versions | TechCrunch](https://techcrunch.com/2026/03/05/openai-launches-gpt-5-4-with-pro-and-thinking-versions/) +- [GPT-5.4: Native Computer Use, 1M Context Window, Tool Search | DataCamp](https://www.datacamp.com/blog/gpt-5-4) +- [GPT-5.4 vs Opus 4.6 vs Gemini 3.1 Pro: Best AI Model? | DigitalApplied](https://www.digitalapplied.com/blog/gpt-5-4-vs-opus-4-6-vs-gemini-3-1-pro-best-frontier-model) +- [GPT-5.4 Release Date, Features & Pricing | NxCode](https://www.nxcode.io/resources/news/gpt-5-4-release-date-features-pricing-2026) +- [OpenAI GPT-5.4 正式登场 | IT之家](https://www.ithome.com/0/926/344.htm) +- [Computer Use API | OpenAI](https://developers.openai.com/api/docs/guides/tools-computer-use/) +- [GPT-5.4 API Developer Guide | NxCode](https://www.nxcode.io/resources/news/gpt-5-4-api-developer-guide-reasoning-computer-use-2026) diff --git a/articles/003/capability-stack.png b/articles/003/capability-stack.png new file mode 100644 index 0000000..e990de9 Binary files /dev/null and b/articles/003/capability-stack.png differ diff --git a/articles/003/capability-stack.svg b/articles/003/capability-stack.svg new file mode 100644 index 0000000..1e2f25c --- /dev/null +++ b/articles/003/capability-stack.svg @@ -0,0 +1,54 @@ + + GPT-5.4 能力全景:专业工作、编码、计算机操控、工具使用与长上下文 + + + + + + + + + + GPT-5.4 能力全景 + 这不是常规升级,而是一次模型产品线的重置 + + + + 1. 专业知识工作 + GDPval 83.0%,投行建模 87.3%,演示文稿、文档、事实准确性均大幅超越 GPT-5.2。 + 83.0% + + + + + 2. 编码与智能体循环 + SWE-Bench Pro 57.7%,与 GPT-5.3-Codex 持平,同时在研究和工具使用上覆盖面更广。 + 57.7% + + + + + 3. 原生计算机操控 + OSWorld-Verified 75.0%,支持基于截图的浏览器和桌面操作,通过 Computer Use API 实现。 + 75.0% + + + + + 4. 工具使用与 MCP + BrowseComp 82.7%,MCP Atlas 67.2%,支持大规模延迟工具目录的 Tool Search 机制。 + 82.7% + + + + + 5. 长上下文与推理 + 上下文窗口 105 万 tokens,输出 12.8 万 tokens,但远端检索质量仍有下降。 + 1.05M + + + + + + + diff --git a/articles/003/cover-compressed.png b/articles/003/cover-compressed.png new file mode 100644 index 0000000..144b987 Binary files /dev/null and b/articles/003/cover-compressed.png differ diff --git a/articles/003/cover.png b/articles/003/cover.png new file mode 100644 index 0000000..d1356d4 Binary files /dev/null and b/articles/003/cover.png differ diff --git a/articles/003/diagram-01-model-family.mmd b/articles/003/diagram-01-model-family.mmd new file mode 100644 index 0000000..691a1ea --- /dev/null +++ b/articles/003/diagram-01-model-family.mmd @@ -0,0 +1,18 @@ +graph TD + A["GPT-5.4 基座模型"] --> B["GPT-5.4 标准版"] + A --> C["GPT-5.4 Thinking"] + A --> D["GPT-5.4 Pro"] + + B --> B1["日常专业工作"] + B --> B2["API 调用"] + + C --> C1["展示推理过程"] + C --> C2["复杂问题求解"] + + D --> D1["极限推理深度"] + D --> D2["科研/金融级任务"] + + style A fill:#10a37f,stroke:#fff,color:#fff + style B fill:#1a7f64,stroke:#fff,color:#fff + style C fill:#1a7f64,stroke:#fff,color:#fff + style D fill:#1a7f64,stroke:#fff,color:#fff diff --git a/articles/003/diagram-01-model-family.png b/articles/003/diagram-01-model-family.png new file mode 100644 index 0000000..1b5a9db Binary files /dev/null and b/articles/003/diagram-01-model-family.png differ diff --git a/articles/003/diagram-02-capabilities.mmd b/articles/003/diagram-02-capabilities.mmd new file mode 100644 index 0000000..3f8e065 --- /dev/null +++ b/articles/003/diagram-02-capabilities.mmd @@ -0,0 +1,21 @@ +mindmap + root((GPT-5.4
六大能力)) + 原生计算机操控 + 截图理解 + 鼠标键盘操作 + 跨应用工作流 + 百万级上下文 + 标准 272K + 最大 1M tokens + 上下文压缩 + 自动总结压缩 + 保留关键信息 + 工具搜索 + 按需加载工具 + Token 降低 47% + 可配置推理 + 5 档深度 + 成本精细控制 + 编码能力升级 + SWE-Bench ~80% + Terminal-Bench 75.1% diff --git a/articles/003/diagram-02-capabilities.png b/articles/003/diagram-02-capabilities.png new file mode 100644 index 0000000..3479558 Binary files /dev/null and b/articles/003/diagram-02-capabilities.png differ diff --git a/articles/003/diagram-03-computer-use.mmd b/articles/003/diagram-03-computer-use.mmd new file mode 100644 index 0000000..107b564 --- /dev/null +++ b/articles/003/diagram-03-computer-use.mmd @@ -0,0 +1,10 @@ +graph LR + A["🖥️ 截取屏幕"] --> B["🧠 GPT-5.4
理解界面"] + B --> C["📋 返回动作指令
点击/输入/滚动"] + C --> D["⚙️ 你的程序
执行操作"] + D --> A + + style A fill:#f9f,stroke:#333 + style B fill:#10a37f,stroke:#fff,color:#fff + style C fill:#bbf,stroke:#333 + style D fill:#fbb,stroke:#333 diff --git a/articles/003/diagram-03-computer-use.png b/articles/003/diagram-03-computer-use.png new file mode 100644 index 0000000..fde4f84 Binary files /dev/null and b/articles/003/diagram-03-computer-use.png differ diff --git a/articles/003/diagram-04-osworld.mmd b/articles/003/diagram-04-osworld.mmd new file mode 100644 index 0000000..7356422 --- /dev/null +++ b/articles/003/diagram-04-osworld.mmd @@ -0,0 +1,5 @@ +xychart-beta + title "OSWorld-Verified 桌面操作基准测试" + x-axis ["GPT-5.2", "人类表现", "GPT-5.4"] + y-axis "成功率 (%)" 0 --> 100 + bar [47.3, 72.4, 75.0] diff --git a/articles/003/diagram-04-osworld.png b/articles/003/diagram-04-osworld.png new file mode 100644 index 0000000..3c0ce83 Binary files /dev/null and b/articles/003/diagram-04-osworld.png differ diff --git a/articles/003/diagram-05-context-window.mmd b/articles/003/diagram-05-context-window.mmd new file mode 100644 index 0000000..7ca43c9 --- /dev/null +++ b/articles/003/diagram-05-context-window.mmd @@ -0,0 +1,5 @@ +xychart-beta + title "上下文窗口演进(单位:K tokens)" + x-axis ["GPT-5.2", "GPT-5.3 Codex", "GPT-5.4 标准", "GPT-5.4 最大"] + y-axis "K tokens" 0 --> 1100 + bar [128, 200, 272, 1000] diff --git a/articles/003/diagram-05-context-window.png b/articles/003/diagram-05-context-window.png new file mode 100644 index 0000000..b535c0a Binary files /dev/null and b/articles/003/diagram-05-context-window.png differ diff --git a/articles/003/diagram-06-compaction.mmd b/articles/003/diagram-06-compaction.mmd new file mode 100644 index 0000000..a0ed0f8 --- /dev/null +++ b/articles/003/diagram-06-compaction.mmd @@ -0,0 +1,17 @@ +graph LR + subgraph 压缩前["❌ 压缩前:全量加载"] + A1["轮次 1
1.2K tokens"] --> A2["轮次 2
3.5K tokens"] + A2 --> A3["轮次 3
2.8K tokens"] + A3 --> A4["轮次 4
4.1K tokens"] + A4 --> A5["...
持续膨胀 💥"] + end + + A5 --> C["🗜️ Compaction
自动压缩"] + + subgraph 压缩后["✅ 压缩后:智能摘要"] + C --> B1["摘要
0.6K tokens"] + B1 --> B2["轮次 4
4.1K tokens"] + B2 --> B3["新轮次
继续对话 ✅"] + end + + style C fill:#10a37f,stroke:#fff,color:#fff diff --git a/articles/003/diagram-06-compaction.png b/articles/003/diagram-06-compaction.png new file mode 100644 index 0000000..fe410ec Binary files /dev/null and b/articles/003/diagram-06-compaction.png differ diff --git a/articles/003/diagram-07-tool-search.mmd b/articles/003/diagram-07-tool-search.mmd new file mode 100644 index 0000000..bd45a78 --- /dev/null +++ b/articles/003/diagram-07-tool-search.mmd @@ -0,0 +1,15 @@ +graph TB + subgraph 传统方式["❌ 传统方式:全量加载"] + T1["请求开始"] --> T2["加载全部 100 个工具定义
~40K tokens"] + T2 --> T3["模型选择 1 个工具"] + T3 --> T4["99 个工具的定义被浪费"] + end + + subgraph 新方式["✅ Tool Search:按需加载"] + N1["请求开始"] --> N2["加载轻量工具列表
~2K tokens"] + N2 --> N3["模型搜索需要的工具"] + N3 --> N4["按需加载 1 个工具定义
~400 tokens"] + end + + style T4 fill:#c62828,stroke:#fff,color:#fff + style N4 fill:#10a37f,stroke:#fff,color:#fff diff --git a/articles/003/diagram-07-tool-search.png b/articles/003/diagram-07-tool-search.png new file mode 100644 index 0000000..74b04b5 Binary files /dev/null and b/articles/003/diagram-07-tool-search.png differ diff --git a/articles/003/diagram-08-reasoning.mmd b/articles/003/diagram-08-reasoning.mmd new file mode 100644 index 0000000..97e24b5 --- /dev/null +++ b/articles/003/diagram-08-reasoning.mmd @@ -0,0 +1,13 @@ +graph LR + A["用户请求"] --> B{"判断任务复杂度"} + B -->|"简单查询"| C["none
⚡ 极速 · 极省"] + B -->|"日常问答"| D["low
💬 轻推理"] + B -->|"通用任务"| E["medium
⚖️ 平衡"] + B -->|"复杂分析"| F["high
🔬 深度思考"] + B -->|"科研/金融"| G["xhigh
🧠 极限推理"] + + style C fill:#4caf50,stroke:#fff,color:#fff + style D fill:#8bc34a,stroke:#fff,color:#fff + style E fill:#ff9800,stroke:#fff,color:#fff + style F fill:#f44336,stroke:#fff,color:#fff + style G fill:#9c27b0,stroke:#fff,color:#fff diff --git a/articles/003/diagram-08-reasoning.png b/articles/003/diagram-08-reasoning.png new file mode 100644 index 0000000..3cfe66d Binary files /dev/null and b/articles/003/diagram-08-reasoning.png differ diff --git a/articles/003/diagram-09-gdpval.mmd b/articles/003/diagram-09-gdpval.mmd new file mode 100644 index 0000000..9ee18f4 --- /dev/null +++ b/articles/003/diagram-09-gdpval.mmd @@ -0,0 +1,6 @@ +xychart-beta + title "GPT-5.4 vs GPT-5.2 关键指标提升" + x-axis ["GDPval 综合", "投行建模", "OSWorld 桌面", "BrowseComp 网页"] + y-axis "得分 (%)" 0 --> 100 + bar [70.9, 68.4, 47.3, 65.7] + bar [83.0, 87.3, 75.0, 82.7] diff --git a/articles/003/diagram-09-gdpval.png b/articles/003/diagram-09-gdpval.png new file mode 100644 index 0000000..32102fb Binary files /dev/null and b/articles/003/diagram-09-gdpval.png differ diff --git a/articles/003/diagram-10-comparison.mmd b/articles/003/diagram-10-comparison.mmd new file mode 100644 index 0000000..712f765 --- /dev/null +++ b/articles/003/diagram-10-comparison.mmd @@ -0,0 +1,22 @@ +graph TB + subgraph GPT54["🟢 GPT-5.4 领先"] + G1["GDPval 知识工作 83.0%"] + G2["OSWorld 桌面操控 75.0%"] + G3["Terminal-Bench 终端 75.1%"] + end + + subgraph Claude["🔵 Claude Opus 4.6 领先"] + C1["SWE-Bench 代码修复 80.8%"] + C2["MMMU Pro 视觉理解 85.1%"] + C3["多文件重构 最佳体验"] + end + + subgraph Gemini["🟡 Gemini 3.1 Pro 领先"] + GE1["GPQA Diamond 科学推理 94.3%"] + GE2["ARC-AGI-2 抽象推理 77.1%"] + GE3["BrowseComp 网页浏览 85.9%"] + end + + style GPT54 fill:#0d2137,stroke:#10a37f,color:#e0f7fa + style Claude fill:#0d2137,stroke:#d97706,color:#e0f7fa + style Gemini fill:#0d2137,stroke:#4285f4,color:#e0f7fa diff --git a/articles/003/diagram-10-comparison.png b/articles/003/diagram-10-comparison.png new file mode 100644 index 0000000..2311113 Binary files /dev/null and b/articles/003/diagram-10-comparison.png differ diff --git a/articles/003/diagram-11-pricing.mmd b/articles/003/diagram-11-pricing.mmd new file mode 100644 index 0000000..2f8242e --- /dev/null +++ b/articles/003/diagram-11-pricing.mmd @@ -0,0 +1,5 @@ +xychart-beta + title "API 输出价格对比($/百万 tokens)" + x-axis ["Gemini 3.1 Pro", "GPT-5.4", "Claude Opus 4.6", "GPT-5.4 Pro"] + y-axis "价格 ($)" 0 --> 200 + bar [12, 15, 25, 180] diff --git a/articles/003/diagram-11-pricing.png b/articles/003/diagram-11-pricing.png new file mode 100644 index 0000000..5fe6ef7 Binary files /dev/null and b/articles/003/diagram-11-pricing.png differ diff --git a/articles/003/gdpval-chart.png b/articles/003/gdpval-chart.png new file mode 100644 index 0000000..9d705c0 Binary files /dev/null and b/articles/003/gdpval-chart.png differ diff --git a/articles/003/mermaid-config.json b/articles/003/mermaid-config.json new file mode 100644 index 0000000..14c54a7 --- /dev/null +++ b/articles/003/mermaid-config.json @@ -0,0 +1,37 @@ +{ + "theme": "base", + "themeVariables": { + "primaryColor": "#0d2137", + "primaryTextColor": "#e0f7fa", + "primaryBorderColor": "#00e5ff", + "lineColor": "#00b8d4", + "secondaryColor": "#0a1628", + "secondaryTextColor": "#b2ebf2", + "secondaryBorderColor": "#00bcd4", + "tertiaryColor": "#112240", + "tertiaryTextColor": "#e0f7fa", + "tertiaryBorderColor": "#26c6da", + "noteBkgColor": "#0d2137", + "noteTextColor": "#e0f7fa", + "noteBorderColor": "#00e5ff", + "edgeLabelBackground": "#0a1628", + "clusterBkg": "#0a1a2e", + "clusterBorder": "#1a5276", + "titleColor": "#00e5ff", + "actorBkg": "#0d2137", + "actorBorder": "#00e5ff", + "actorTextColor": "#e0f7fa", + "actorLineColor": "#00b8d4", + "signalColor": "#00e5ff", + "signalTextColor": "#e0f7fa", + "labelBoxBkgColor": "#0d2137", + "labelBoxBorderColor": "#00e5ff", + "labelTextColor": "#e0f7fa", + "loopTextColor": "#80deea", + "activationBorderColor": "#00e5ff", + "activationBkgColor": "#112240", + "sequenceNumberColor": "#00e5ff", + "fontFamily": "SF Pro Display, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif", + "fontSize": "15px" + } +} diff --git a/articles/003/mermaid-fix.css b/articles/003/mermaid-fix.css new file mode 100644 index 0000000..0d2e48e --- /dev/null +++ b/articles/003/mermaid-fix.css @@ -0,0 +1,7 @@ +.mindmap-node text, .mindmap-node tspan, +.node text, .node tspan, +.label text, .label tspan, +text, tspan { + fill: #ffffff !important; + color: #ffffff !important; +} diff --git a/articles/003/mermaid-mindmap.css b/articles/003/mermaid-mindmap.css new file mode 100644 index 0000000..ef87705 --- /dev/null +++ b/articles/003/mermaid-mindmap.css @@ -0,0 +1,54 @@ +/* Mindmap sci-fi style - force visible node backgrounds */ + +text, tspan { + fill: #e0f7fa !important; + font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important; +} + +/* Root node */ +.mindmap-node:first-of-type circle { + fill: #0d2137 !important; + stroke: #00e5ff !important; + stroke-width: 3px !important; + filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.6)) !important; +} + +/* All mindmap section/node shapes */ +.mindmap-node rect, +.mindmap-node polygon, +.mindmap-node circle, +.mindmap-node ellipse, +.mindmap-node path { + stroke: #00b8d4 !important; + stroke-width: 2px !important; + filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.35)) !important; +} + +/* Force different section colors instead of black */ +.section-0 rect, .section-0 path { fill: #0d3b66 !important; stroke: #00e5ff !important; } +.section-1 rect, .section-1 path { fill: #1a3a4a !important; stroke: #26c6da !important; } +.section-2 rect, .section-2 path { fill: #1b3044 !important; stroke: #4dd0e1 !important; } +.section-3 rect, .section-3 path { fill: #14293d !important; stroke: #00bcd4 !important; } +.section-4 rect, .section-4 path { fill: #0f2b3d !important; stroke: #80deea !important; } +.section-5 rect, .section-5 path { fill: #0d3352 !important; stroke: #4fc3f7 !important; } +.section-6 rect, .section-6 path { fill: #102a40 !important; stroke: #29b6f6 !important; } +.section-7 rect, .section-7 path { fill: #0e2d44 !important; stroke: #81d4fa !important; } +.section-8 rect, .section-8 path { fill: #113148 !important; stroke: #b3e5fc !important; } + +/* Generic fallback: any rect/path that ends up black */ +rect[fill="#000"], rect[fill="#000000"], rect[fill="black"], +path[fill="#000"], path[fill="#000000"], path[fill="black"] { + fill: #0d3b66 !important; +} + +/* Catch-all: any element with inline black-ish fill */ +[style*="fill: rgb(0, 0, 0)"], [style*="fill:rgb(0,0,0)"], +[style*="fill:#000"], [style*="fill: #000"] { + fill: #0d3b66 !important; +} + +/* Lines between nodes */ +line, path.edge { + stroke: #00b8d4 !important; + stroke-width: 2px !important; +} diff --git a/articles/003/mermaid-tech.css b/articles/003/mermaid-tech.css new file mode 100644 index 0000000..c01c606 --- /dev/null +++ b/articles/003/mermaid-tech.css @@ -0,0 +1,115 @@ +/* Sci-fi / Tech style for mermaid diagrams */ + +/* Node styling */ +.node rect, .node polygon, .node circle, .node ellipse { + stroke-width: 2px !important; + filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.4)) !important; + rx: 8 !important; + ry: 8 !important; +} + +/* All text white/cyan */ +text, tspan { + fill: #e0f7fa !important; + font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important; +} + +/* Cluster/subgraph borders */ +.cluster rect { + stroke: #1a6a8a !important; + stroke-width: 2px !important; + stroke-dasharray: 6 3 !important; + fill: rgba(10, 26, 46, 0.7) !important; + rx: 12 !important; + ry: 12 !important; + filter: drop-shadow(0 0 8px rgba(0, 184, 212, 0.2)) !important; +} + +/* Cluster labels */ +.cluster text, .cluster tspan { + fill: #4dd0e1 !important; + font-weight: 600 !important; + font-size: 14px !important; +} + +/* Edge/arrow lines */ +.edge-pattern-solid, .flowchart-link { + stroke: #00b8d4 !important; + stroke-width: 2px !important; +} + +/* Arrow markers */ +marker path { + fill: #00e5ff !important; +} + +/* Sequence diagram lines */ +.messageLine0, .messageLine1 { + stroke: #00b8d4 !important; + stroke-width: 2px !important; +} + +/* Sequence diagram actors */ +.actor { + stroke: #00e5ff !important; + fill: #0d2137 !important; + stroke-width: 2px !important; + filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.3)) !important; +} + +/* Labels on edges */ +.edgeLabel rect { + fill: #0a1628 !important; + opacity: 0.9 !important; +} + +.edgeLabel span, .edgeLabel text, .edgeLabel tspan { + fill: #80deea !important; + color: #80deea !important; + font-size: 12px !important; +} + +/* Note boxes */ +.note { + fill: #112240 !important; + stroke: #00e5ff !important; +} + +/* Mindmap specific */ +.mindmap-node rect, .mindmap-node circle, .mindmap-node polygon { + filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.4)) !important; +} + +.mindmap-node text, .mindmap-node tspan { + fill: #e0f7fa !important; +} + +/* Activation bars in sequence diagrams */ +.activation0, .activation1, .activation2 { + fill: #112240 !important; + stroke: #00e5ff !important; +} + +/* Loop/alt boxes */ +.loopLine { + stroke: #1a6a8a !important; + stroke-dasharray: 4 3 !important; +} + +.loopText tspan, .loopText text { + fill: #4dd0e1 !important; +} + +/* Label styling */ +.label text, .label tspan { + fill: #e0f7fa !important; +} + +/* Highlighted nodes with custom styles from mermaid */ +[style*="fill:#4A90D9"], [style*="fill:#E74C3C"], [style*="fill:#27AE60"], +[style*="fill:#F39C12"], [style*="fill:#8E44AD"], [style*="fill:#9B59B6"], +[style*="fill:#2ECC71"], [style*="fill:#3498DB"], [style*="fill:#E67E22"] { + filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.6)) !important; + stroke: #00e5ff !important; + stroke-width: 2px !important; +} diff --git a/articles/003/model-selection-map.png b/articles/003/model-selection-map.png new file mode 100644 index 0000000..9774811 Binary files /dev/null and b/articles/003/model-selection-map.png differ diff --git a/articles/003/model-selection-map.svg b/articles/003/model-selection-map.svg new file mode 100644 index 0000000..8909675 --- /dev/null +++ b/articles/003/model-selection-map.svg @@ -0,0 +1,51 @@ + + GPT-5.4 模型选择指南:GPT-5.4、GPT-5.4 Pro、GPT-5.3-Codex、GPT-5.2 对比 + + + + + + + + + + 该选哪个 OpenAI 模型? + X 轴:工作流覆盖广度 Y 轴:成本与延迟 + + + + + 覆盖面更广的混合工作流 → + ← 窄领域专精工作流 + 更贵 / 更慢 ↑ + ↓ 更便宜 / 更快 + + + GPT-5.4 + 最佳全能默认选择 + 研究 + 编码 + 工具 + 浏览器 + $2.50 输入 / $15 输出 + + + GPT-5.4 Pro + 最高性能天花板 + 准确度优先于延迟时使用 + $30 输入 / $180 输出 + + + GPT-5.3-Codex + 编码专精之选 + 擅长终端密集型循环任务 + $1.75 输入 / $14 输出 + + + GPT-5.2 + 上代模型(过渡参考) + 临时迁移基准线 + + + + + + 选型建议:通用工作选 GPT-5.4,追求极限精度选 GPT-5.4 Pro,纯编码场景选 GPT-5.3-Codex。 + diff --git a/articles/003/openai-gpt54.png b/articles/003/openai-gpt54.png new file mode 100644 index 0000000..81838f3 Binary files /dev/null and b/articles/003/openai-gpt54.png differ diff --git a/scripts/render_mermaid.js b/scripts/render_mermaid.js new file mode 100644 index 0000000..895cff2 --- /dev/null +++ b/scripts/render_mermaid.js @@ -0,0 +1,227 @@ +/** + * 用 Playwright 渲染 Mermaid .mmd 文件为高质量 PNG + * 用法: node render_mermaid.js [width] + */ + +const { chromium } = require('/Users/bing/node_modules/.pnpm/playwright@1.58.2/node_modules/playwright'); +const fs = require('fs'); +const path = require('path'); + +const mmdFile = process.argv[2]; +const outFile = process.argv[3]; +const width = parseInt(process.argv[4] || '2400', 10); + +if (!mmdFile || !outFile) { + console.error('Usage: node render_mermaid.js [width]'); + process.exit(1); +} + +const mmdContent = fs.readFileSync(mmdFile, 'utf-8'); + +// 检测图表类型 +const isMindmap = mmdContent.trim().startsWith('mindmap'); +const isXYChart = mmdContent.includes('xychart-beta'); + +const html = ` + + + + + + + +
+
+${mmdContent}
+
+
+ + +`; + +(async () => { + const browser = await chromium.launch(); + const page = await browser.newPage({ + viewport: { width: width, height: 1600 }, + deviceScaleFactor: 2 + }); + + await page.setContent(html, { waitUntil: 'networkidle' }); + await page.waitForSelector('.mermaid svg', { timeout: 15000 }); + await page.waitForTimeout(1000); + + const box = await page.locator('#diagram').boundingBox(); + if (!box) { + console.error('Failed to locate diagram'); + await browser.close(); + process.exit(1); + } + + const padding = 40; + await page.screenshot({ + path: outFile, + clip: { + x: Math.max(0, box.x - padding), + y: Math.max(0, box.y - padding), + width: box.width + padding * 2, + height: box.height + padding * 2 + } + }); + + console.log(`OK: ${outFile} (${Math.round(box.width)}x${Math.round(box.height)})`); + await browser.close(); +})(); diff --git a/scripts/upload_qiniu_003.py b/scripts/upload_qiniu_003.py new file mode 100644 index 0000000..dbaac5f --- /dev/null +++ b/scripts/upload_qiniu_003.py @@ -0,0 +1,53 @@ +"""上传文章 003 的所有图片到七牛云 OSS""" + +import os +import glob +from qiniu import Auth, put_file + +ACCESS_KEY = 't1PIPGcvBY9lJVXFZFb48maTQsGGhvLsR5QQlNq0' +SECRET_KEY = 'KGooFdF5eCLdCIMCOD6x5ofMzu4vYE17T5Mvp9qC' +BUCKET_NAME = 'union-saas' +CDN_DOMAIN = 'https://cdn.union.jxyunge.com' +UPLOAD_PREFIX = 'self-media/003/' + + +def upload_file(local_path, key): + """上传单个文件到七牛""" + q = Auth(ACCESS_KEY, SECRET_KEY) + token = q.upload_token(BUCKET_NAME, key, 3600) + ret, info = put_file(token, key, local_path, version='v2') + if info.status_code == 200: + url = f'{CDN_DOMAIN}/{key}' + print(f' OK {os.path.basename(local_path)} -> {url}') + return url + else: + print(f' FAIL {os.path.basename(local_path)}: {info}') + return None + + +def main(): + img_dir = os.path.join(os.path.dirname(__file__), '..', 'articles', '003') + + # 收集所有图片文件(PNG + SVG) + files = sorted( + glob.glob(os.path.join(img_dir, '*.png')) + + glob.glob(os.path.join(img_dir, '*.svg')) + ) + + results = {} + for f in files: + name = os.path.basename(f) + key = UPLOAD_PREFIX + name + url = upload_file(f, key) + if url: + results[name] = url + + print(f'\n===== 上传完成: {len(results)}/{len(files)} =====') + for name, url in results.items(): + print(f'{name}: {url}') + + return results + + +if __name__ == '__main__': + main()