Skip to content
Agentmart
Submit a tool

math-solution-verifier

数学解答验证器v2——Python代码执行+LLM推理双重验证。借鉴PromptCoT+代码验证最佳实践。

Skill by dingxiaodongtech

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dingxiaodongtech-math-solution-verifier

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

数学解答验证器v2——Python代码执行+LLM推理双重验证。借鉴PromptCoT+代码验证最佳实践。

Use cases: ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/math-solution-verifier

What's inside

Skill name
math-solution-verifier
Description
数学解答验证器v2——Python代码执行+LLM推理双重验证。借鉴PromptCoT+代码验证最佳实践。
License
MIT
Instructions
96 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# 数学解答验证器 v2

> 借鉴:Chan et al.(2025) CoT+Python代码验证最优、Anthropic Skills 用代码做确定性计算、PromptCoT 逐步骤验证

## 核心策略

**不批量验全库。出卷时选中哪道验哪道。**

- MATH/MathFish:来源已验证,跳过
- 其他题:Python SymPy代码优先,不行再用LLM

## Prompt 模板

### 代数题 — Python SymPy 验证

```
你是一位数学验证工程师。请用Python代码验证以下数学题的答案是否正确。

## 题目
{question_text}

## 数据集中给出的答案
{answer_text}

## 任务
编写Python sympy代码,独立求解此题,然后与给定答案对比。

```python
import sympy as sp

# 1. 从题目提取方程/表达式
# 2. 用sympy求解
# 3. 与给定答案对比
# 4. 输出: {"match": true/false, "computed": "...", "given": "...", "method": "sympy"}
```

**要求**:
- 只输出代码块和最终的JSON结果
- 如果sympy无法求解,输出 {"match": null, "reason": "sympy_cannot_solve"}
- 不要解释,不要推理过程
```

### 几何/证明题 — LLM推理验证

```
你是一位数学教师。请独立解答以下题目,判断数据集中给出的答案是否正确。

## 题目
{question_text}

## 数据集中给出的答案
{answer_text}

## 任务
1. 独立解题(不参考给定答案)
2. 得到你自己的答案
3. 对比你的答案和给定答案
4. 只输出: {"match": true/false, "your_answer": "...", "given_answer": "...", "confidence": 0.0-1.0}

**要求**:
- 如果给定答案正确:{"match": true, ...}
- 如果给定答案错误:{"match": false, "your_answer": "正确答案", ...}
- 如果你不确定:{"match": null, "reason": "需要人工判断"}
```

## Few-shot 示例

**输入**:
```
题目:解方程 2x² - 5x + 2 = 0
给定答案:x = 2 或 x = 1/2
```

**输出**:
```python
import sympy as sp
x = sp.Symbol('x')
eq = 2*x**2 - 5*x + 2
solutions = sp.solve(eq, x)
given = {2, sp.Rational(1, 2)}
match = set(solutions) == given
print({"match": True, "computed": str(solutions), "given": str(given), "method": "sympy"})
```

```
{"match": true, "computed": "[1/2, 2]", "given": "{2, 1/2}", "method": "sympy"}
```

## 验证失败处理

```
验证失败 → 标记 ⚠️ → 不影响出卷 → 在审校报告里标出 → 教师自行判断
不因为一道题验证失败就阻断整个出卷流程。
```

From dingxiaodongtech/math-exam-platform, MIT.

Signals

Stars
1
Forks
1
Open issues
0
Last commit (this folder)
Sep 4, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from dingxiaodongtech

Cite this page

math-solution-verifier skill. Agent Mart. https://agentmart.dev/skills/dingxiaodongtech-math-solution-verifier (last updated 2026-10-24)