LEAP
LEAP builds skills through two pipelines: Branch A distills a skill from raw data, while Branch B combines multiple skills into one. It is called by the main…
Split a multi-call LM workflow by cognitive load, not by accuracy: let one strong model make the few reasoning decisions and a cheap model do the many mechanical executions (Aider architect+editor, DSPy optimizer-LM vs task-LM, vLLM speculative draft+target, LangGraph
$ npx -y skills add agentsope/SkillAlchemy --skill agentsop-cost-tiered-models --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/agentsop-cost-tiered-modelsContext preview
The summary Claude sees to decide when to auto-load this skill.
Split a multi-call LM workflow by cognitive load, not by accuracy: let one strong model make the few reasoning decisions and a cheap model do the many mechanical executions (Aider architect+editor, DSPy optimizer-LM vs task-LM, vLLM speculative draft+target, LangGraph
name: agentsop-cost-tiered-models version: 0.1.0 description: >- Split a multi-call LM workflow by cognitive load, not by accuracy: let one strong model make the few reasoning decisions and a cheap model do the many mechanical executions (Aider architect+editor, DSPy optimizer-LM vs task-LM, vLLM speculative draft+target, LangGraph supervisor+worker are the same shape). Use when designing or cost-optimizing a pipeline that calls an LM many times, when deciding which steps need a strong reasoner vs a cheap executor, or when adding an escalation valve for when the cheap tier degrades. Search keywords: reduce LLM cost, cheaper model, lower token cost, model cascade, route to cheap model, strong model plus cheap model, LLM cost optimization. domain: cost-aware model/role splitting in multi-call LM workflows dated: 2026-05 audience: coder-agents and engineers designing multi-call LM pipelines sources: - https://aider.chat/2024/09/26/architect.html - https://github.com/stanfordnlp/dspy/issues/1596 - https://docs.vllm.ai/en/latest/features/speculative_decoding/ - https://langchain-ai.github.io/langgraph/concepts/multi_agent/
> 一句话:一条多次调用 LM 的工作流里,**少数调用需要推理,多数调用是机械执行**。让一个强模型做决策,让一个便宜模型干活——按认知负荷拆分,不是按"哪个更准"拆分。
> **统一声明**:Phase B 发现这个模式在 4 个 SOP 里以 4 个名字反复出现——DSPy 的 optimizer-LM vs task-LM、Aider 的 architect+editor、vLLM 的 speculative draft+target、LangGraph 的 supervisor+worker。它们是**同一个形状**。本技能把这个形状抽出来,命名为 cost-tiered models。详见 §7 跨框架对照。
---
任一情形成立时激活本技能:
**不应激活**(见 §6):
---
**按认知负荷拆分:一个强模型做决策,一个便宜模型执行——而且绝大多数调用是执行。**
绝大多数团队的默认是"全程一个模型"。这把两种本质不同的工作混在了一个价位上:
| 层 | 工作性质 | 调用频率 | 模型要求 | 选谁 | |---|---|---|---|---| | **Tier-S(决策层)** | 规划、推理、路由、判断、提案 | **少**(每任务 1–N 次) | 推理强;执行干不干净不重要 | 最强 reasoner | | **Tier-E(执行层)** | 改写、抽取、格式化、应用决定、生成草稿 | **多**(占总调用 80%+) | 听话、格式干净、便宜、快 | 便宜/快模型 |
关键洞察:**成本由调用次数主导,调用次数由执行层主导**。所以把执行层降级到便宜模型,省下大部分成本,却几乎不碰决策质量——因为决策层调用次数少,仍然用最强模型。
推理能力和指令依从(产出干净的 diff/JSON/格式)是两种不同的能力,不总同向。Aider 的 Polyglot 数据是最干净的证据:o1-preview **单独**跑 79.7%,但它当 architect 配一个便宜 editor 后,整体到 82.7%–85%——**两次便宜的专门调用胜过一次又贵又全能的调用** [aider.chat/2024/09/26/architect.html]。强模型负责"想",便宜模型负责"把想法落成格式正确的编辑"。
三者都是"强决策 + 廉价执行"的拆分,只是优化目标不同。
拆分不是单向的。便宜执行者会在某些输入上**失败或退化**(格式错、跑题、质量塌)。正确的设计带一个**回退-升级阀门**:检测到执行层失败 → 把这一步升级到强模型重试。便宜执行者覆盖 80–95% 的常规输入,强模型兜底长尾。这把"省钱"和"不掉质量"同时拿到。
---
[Step 0] 列出工作流里所有 LM 调用
└─ 对每次调用记:它在"想"还是在"做"?预期调用频率?
[Step 1] 给每次调用打认知负荷标签
├─ 高推理(规划/路由/判断/提案/纠错) → 候选 Tier-S
└─ 机械执行(改写/抽取/格式化/应用决定/草稿) → 候选 Tier-E
规则:把"需要全局判断 / 一旦错代价高 / 频率低"的归 Tier-S,
其余尽量下沉到 Tier-E。
[Step 2] 分配模型层
├─ Tier-S → 你能负担的最强 reasoner(少量调用,单价高无所谓)
├─ Tier-E → 便宜/快模型(大量调用,单价主导总成本)
└─ 给 Tier-E 选最适配它的输出格式(弱模型用 whole/简单 schema,
不要逼它产 token 高效但易错的 diff)。
[Step 3] 度量质量 delta(必须做,否则是赌博)
├─ baseline:全程强模型的质量分 + 成本
├─ split:S+E 拆分后的质量分 + 成本
├─ 看 (质量 delta, 成本 delta) 这一对,不要只看其一
└─ 在你自己的真实任务上量,不要信别人 benchmark 的绝对数
[Step 4] 装升级阀门
├─ 定义"执行层失败"的可检测信号(格式不合法 / 测试不过 /
│ schema 校验失败 / 自评分低)
├─ 失败 → 升级到 Tier-S 重试这一步(或换执行格式重试)
└─ 记录升级率:若 >30%,说明这步本就属于 Tier-S,重新归类
[Step 5] 调拆分点(tune the split)
├─ 升级率高 / 质量掉太多 → 把更多步上移到 Tier-S
├─ 升级率近 0 / 质量持平 → 把更多步下沉到 Tier-E,再省一截
└─ 拆分点是个滑块,不是开关;按 Step 3 的数往返调---
-
Turn people, methods, and experience into installable, reusable agent skills. SkillAlchemy is an open-world agent skill creation system that turns underspecified skill briefs and open-world sources into installable, reusable agent skills.
Repo: agentsope/SkillAlchemy
LEAP builds skills through two pipelines: Branch A distills a skill from raw data, while Branch B combines multiple skills into one. It is called by the main…
Lens — Add a cognitive lens to any problem. It accepts a task description and produces an enhanced description that surfaces hidden dimensions, prerequisites,…
Cross-framework enhancement overlay for choosing a multi-agent topology BEFORE writing any agent. A binary-question rubric — is single-agent + tools enough? do…
SOP for terminal-based, git-native AI pair programming with Aider (git work-tree + tree-sitter repo-map + edit-format + human-in-loop REPL). Use when editing…
Screens biomedical / life-science papers for signs of data fabrication, image manipulation, and statistical anomalies, using the detection techniques distilled…
Universal discipline for any LM-driven loop — agent retries, plan-act-observe, multi-agent handoffs, optimiser passes, test-fix cycles. Encodes the one rule…