副标题:一份可复制的数学奥赛级 LLM 调优说明书
1. 为什么这篇论文值得所有 prompt 工程师细读?
Google DeepMind 在 2025-07-22 上传的 arXiv:2507.15855v2 做了一个大胆宣言:Gemini 2.5 Pro 仅凭 5 道 IMO 2025 题就达到了金牌水平。 真正引人注目的是:
论文把“大模型如何解世界级难题”拆成了一部可复现的说明书。下面,我们把这部说明书翻译成 prompt 工程师的日常语言。
2. 全局架构:一条“自我对抗”的解证流水线
官方流程图只有 6 步,但精髓可以浓缩成 “生成 → 反思 → 验证 → 再生成” 的螺旋。 每一步的 prompt 设计都极其克制,却直击痛点:
3. Prompt 显微镜:两个文本块如何撑起整套系统?
3.1 Step 1 Prompt——“先别急着给答案”
###Core Instructions###
**Rigor is Paramount:** …
**Honesty About Completeness:** If you cannot find a complete proof,
请只提交“**可被独立验证的重大中间结论**”……
**Use TeX for All Mathematics:** …
技巧拆解:
3.2 Verification Prompt——“像阅卷人一样挑刺”
You are … an IMO grader.
Your sole task is to find and report all issues …
Do NOT attempt to correct …
技巧拆解:
- 角色扮演 + 单一职责:一句 “You are an IMO grader” 把模型从“解题者”切换到“阅卷人”,大幅减少越俎代庖。
- 错误分级体系:
- Critical Error(逻辑链断裂、计算错误) - Justification Gap(缺理由但结论可能对) 把“致命伤”和“可补洞”区分开,后续循环就知道该重写还是该补细节。
- 引用原文 + 位置锚点:
``
Location: "By interchanging the limit and the integral …"
Issue: Justification Gap – uniform convergence unverified.
``
方便 Reviser 阶段用“行号”精准打补丁,避免全文重算。
4. 资源管理:32k token 不够怎么办?
IMO 题往往需要上万 token 的链式推导。作者用“步进式预算”解决:
Prompt 小技巧:在每次续写前,把上一轮 verifier 的“bug 列表”塞进 system message,让模型把注意力集中在“待修补区域”。
5. 温度、采样与“策略引导”
- temperature=0.1:低温度减少随机脑洞,保证逻辑链收敛。
- 显式提示策略(只在 Problem 1 & 2 使用):
- Problem 1 追加 “Let us try induction.” - Problem 2 追加 “Let us try analytic geometry.”
作者特意在论文第 4 章讨论:这不是“泄题”,而是模拟多智能体搜索里的“策略分配”。在真实生产环境,可以换成
Hint Pool = ["induction", "pigeonhole", "analytic_geo", "invariant"]
```
每次采样随机附一条,等价于给不同 agent 分配不同搜索方向。
---
## 6. 可迁移的 Prompt 模板
把论文方法抽象成“可插拔”的三件套:
### 6.1 Solver Prompt(可复用骨架)
You are a mathematician. Goal: Produce a checkpoint that can be independently verified. Rules:
### 6.2 Verifier Prompt(零样本即可用)
You are a grader. List all Critical Errors and Justification Gaps in bullet form. Quote the exact sentence that is wrong. Do not fix.
### 6.3 Reviser Prompt(精准补洞)
Below is a previous attempt and a bug report. Address each bug in the exact order listed. Quote the bug ID when you fix it.
---
## 7. 为什么这套方法不止于数学?
这套 pipeline 的通用性在于:
- **任何需要“严谨+长链推理”的场景**(法律合同审查、形式化验证、科研推导)都可以照搬。
- **Verifier 的“错误分级”思想**可以迁移到代码审计、论文同行评议。
- **步进式预算 + bug 重试**是资源受限环境下的通用长链推理范式。
---
## 8. 一键复制脚本(伪代码)
solverprompt = open("solver.txt").read() verifierprompt = open("verifier.txt").read() reviser_prompt = open("reviser.txt").read()
def prove(problemtex): draft = gemini(solverprompt + problemtex, temp=0.1) for in range(10): # 最多 10 轮改进 bugs = gemini(verifierprompt + draft, temp=0) if "Critical Error" not in bugs: return draft draft = gemini(reviserprompt + bugs + draft, temp=0.1) return None
---
## 9. 写在最后
从 2023 年“LLM 能做小学应用题”到 2025 年“LLM 拿 IMO 金牌”,差距并不在模型大小,而在于**如何榨干现有模型的推理上限**。这篇论文把“榨干”过程拆成了 2 个 prompt + 1 个循环,用最朴素的工程手段完成了最顶级的智力任务。
下次当你抱怨“模型不够聪明”时,不妨先问问自己:
**“我的 prompt 真的配得上 IMO 金牌吗?”**