Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture, enabling developers to combine plugins to build complex applications. When building mathematical reasoning skills, the core challenge is ensuring rigor in the reasoning process and avoiding the model from fabricating answers when uncertain. dsh-math-olympiad is a skill package for competition scenarios such as IMO, Putnam, USAMO, and AIME. It addresses these challenges through pure reasoning, adversarial verification, and calibrated confidence output.
Core Features¶
The plugin provides a rigorous mathematical problem-solving workflow, primarily including the following capabilities:
- Pure-reasoning solving: Uses heuristic methods such as Pólya’s six heuristics.
- Adversarial verification: Uses a subagent’s fresh context to aggressively attack and verify the proof, detecting loopholes (e.g., “Can this prove RH?”).
- Calibrated confidence output: Returns a combined result of “solution + verification verdict + confidence.” Confidence levels include high, medium, or an honest “no confident solution.”
- LaTeX compilation: Supports compiling the proof text into PDF.
- Chain-of-thought isolation: The verifier does not share the reasoning trace and receives only the
.prooffield, preventing chain-of-thought leakage.
Installation and Activation¶
Ensure prerequisites are ready before installation.
Prerequisites¶
In development mode, this plugin uses a link: dependency to point to a sibling DeepSeek Harness source checkout (dsh-src). After cloning this repository, first check out the official deepseek-ai/deepseek-harness into the sibling dsh-src/ directory and run its build.
Installation Commands¶
The skill is installed as a profile bundle:
cd dsh-math-olympiad 的父目录
dsh plugin --profile <name> add ./dsh-math-olympiad
dsh --profile <name>
Notes¶
When installing directly from source, pnpm >= 10 refuses by default to run prepare scripts for git dependencies, which can cause the first add to fail. Add the following to the profile’s pnpm-workspace.yaml:
allowBuilds:
dsh-math-olympiad: true
If you do not want to handle this issue, you can directly install the .tgz artifact generated by pnpm pack.
Typical Usage¶
At runtime, the skill follows a fixed workflow:
- Solve: Use pure reasoning methods (e.g., Pólya’s six heuristics).
- Strip the chain of thought: Keep only the proof text and remove intermediate reasoning steps.
- Adversarial verification: Start a subagent with fresh context. The verifier attempts to attack specific loopholes in the proof (see
verifier_patterns.md). - Retry or abstain: If a fatal gap is found, return to Step 1 and retry (up to 2 rounds). If it still fails, honestly output
no confident solutionwith the blockers. - Output: The final result includes the solution, verification verdict, confidence level, and an optional PDF file.
Permissions and Limitations¶
Permissions¶
The following permissions are required at runtime:
* Read scope: Read access.
* Command scope: Execute bash scripts (e.g., check_latex.sh, compile_pdf.sh).
* Write scope: Write to the LaTeX output directory.
The plugin makes no network requests and does not depend on external services.
Limitations¶
- No correctness guarantee: The verification mechanism improves rigor but cannot eliminate the possibility of errors.
- Reliance on isolation: Verifier quality depends on the subagent model and context isolation discipline. Once the chain of thought leaks into the proof text, the mechanism becomes ineffective.
- Abstention mechanism: Honest abstention is a feature. Outputting
no confident solutionis a normal flow, not a failure.
Summary¶
dsh-math-olympiad provides DSH with a rigorous mathematical problem-solving and verification framework, especially suitable for scenarios that require high-confidence reasoning output. See the GitHub repository for the installation path: https://github.com/988hj7tczd-oss/dsh-math-olympiad.