Introduction¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. The community-maintained plugin directory has no official affiliation with DeepSeek or High-Flyer. When developing agents with DSH, it can be difficult to quickly verify whether existing behaviors are preserved or broken after modifying the system prompt or switching models. Below is an introduction to a DSH plugin designed for prompt regression testing.
What It Is¶
feely0208/dsh-prompt-regression is a DSH workflow plugin. It replays model outputs against a fixed evaluation set, verifies whether expected inclusion/exclusion key points still pass, and outputs the pass rate along with a drift comparison (newly broken / newly fixed). An exit code of 1 indicates test failure, making it suitable for use as a CI gate.
Core Features¶
- Replay a fixed evaluation set to verify critical behaviors after modifying the system prompt or switching models.
- Supports three types of assertions: inclusion, exclusion, and regex.
- Outputs the pass rate and a drift comparison (newly broken / newly fixed).
- Optional live replay: calls chat/completions with cost estimation, then requires
--confirmto proceed. - Assertions are based on substring/regex heuristics.
- An exit code of 1 indicates test failure, making it suitable for use as a CI gate.
Installation and Activation¶
Install in the DSH environment:
dsh plugin --profile web add @deepwhale-cn/dsh-prompt-regression
You can also install via npm:
npm i @deepwhale-cn/dsh-prompt-regression
Or install directly from this repository:
dsh plugin install ./
Typical Usage¶
- Generate the evaluation set:
npx @deepwhale-cn/dsh-prompt-regression gen --out 评测集.json
- Replay the evaluation set with a specified system prompt (live replay optional, with cost estimation and confirmation):
npx @deepwhale-cn/dsh-prompt-regression run --eval 评测集.json --system system.md --confirm --out ./run1
- Compare against a baseline and generate an HTML report:
npx @deepwhale-cn/dsh-prompt-regression run --eval 评测集.json --baseline ./run1/结果.json --html 报告.html
Use Cases and Notes¶
This plugin is suitable for the following scenarios: verifying whether behavior has regressed after modifying the system prompt; running regression tests after switching models; and generating a pass rate and drift report. Before use, please review the source code and license. The plugin runs with the permissions of the current DSH process.
Conclusion¶
This plugin helps developers quickly detect behavioral drift caused by prompt changes or model switches through a fixed evaluation set replay and assertion mechanism. For more information and source code, please refer to the plugin directory page and the GitHub repository.