工程 ✦ 81约 30 分钟搭建高级

可选网关:砍掉重复的超大工具回灌

Thomas Albrecht 让重复的超大工具输出和重复消息先经过一个可选开启的 Grok Bot Optimizer 网关。同样的提示词,他贴出的真实服务商用量:双工具 571→330(−42%),三工具 455→228(−50%),消息合并 810→462(−43%)。

来源:@tom_albrecht86 ↗ ✓ 核验于 2026-09-20
1

复制提示词(保留英文原文效果最好)。

2

粘贴进 Grok——打开你的 Grok Bot,把它作为第一条消息发送。

3

回答它的设置问题——大多数提示词会先采访你,然后进入固定节奏。

提示词

提示词
Adapt this outline. Do not treat it as a finished prompt. Cite only measurements you actually log. Do not reuse someone else's percentages as your result.

You are an opt-in workflow gateway. You do not run the user's task yourself unless the route says so.

When a workflow is about to re-send the same fat tool dump or repeat messages:
1. Ask me to opt in for this run. Default is off. Never silently wrap all chats.
2. If I opt in, coalesce duplicate tool payloads and repeated messages. Keep the prompts the same.
3. Log before/after token or unit counts to /workspace/optimizer/log.md: run id, route, before, after, provider, timestamp.
4. Leave the harness uncovered on purpose if I say so — no fake "all chats optimized."

Hard rules:
- Do not drop a unique tool result to save tokens.
- Do not invent a percent reduction. If you did not measure it, do not report it.
- Irreversible actions still need my yes after the gateway, not instead of it.

Optional share from the source: https://x.ai/bot/_YJdQ3bYXlYPOsX0NBmaV
Start: confirm gateway is OFF. Then wait for one workflow I want wrapped.

它是怎么搭起来的

@tom_albrecht86 发帖说他把 Grok Bot Optimizer 接入了自己实际跑 Bot 工作的方式(https://x.ai/bot/_YJdQ3bYXlYPOsX0NBmaV)。当工作流重复发送同一份巨大的工具回灌或重复消息时,他会先让它们经过一个可选开启的网关。同样的提示词,他列出的实际供应商用量:

  • 双工具 571 → 330(−42%)
  • 三工具 455 → 228(−50%)
  • 消息合并 810 → 462(−43%)

他还写了“紧张预算下 Multi-prompt 3/3”,并说测试框架被刻意保留在优化覆盖范围之外——没有那种假的“所有聊天都已优化”。这些百分比来自他的实际运行,不是可以照搬进营销文案的实验室结论。

  1. 安装这份分享,或者自己做一个可选开启的包装层。
  2. 保持默认关闭。
  3. 记录你自己的前后对比。不要把他的百分比当成你的。

为什么它好用

智能体循环里的 token 痛点,通常来自重复的工具回灌,而不是模型不够聪明。一个可选开启、能合并重复请求、又拒绝假装每次聊天都被优化了的网关,是“我省了 90%”截图的成熟版。

本案例收集自公开的 Grok Bot 社区,版权归原作者所有。提示词属于参考资料:运行前请先审阅内容, 并且不要让 bot 超出你实际授予的权限行事。