aryswisnu/dsh-eval-regression

项目介绍Project Overview

dsh-eval-regression 是 DeepSeek Harness 的确定性回归评测插件,注册 evaluate_golden_output 工具,按必需与禁用片段比对候选输出,并提供 CLI 读取 JSON 套件、输出逐例报告与 0..1 分数。适合发布冒烟测试、回放记录和 CI 阈值。注意:它不调用模型、不持久化数据,也不判断语义或事实正确性,只是一道可复现的片段匹配门禁。

dsh-eval-regression is a deterministic regression-evaluation plugin for DeepSeek Harness. It registers evaluate_golden_output, which compares candidate output against required and forbidden fragments, and includes a CLI for JSON suites with per-case reports and a 0..1 score. Use it for release smoke tests, transcript replay, and CI pass/fail gates. It does not call models, persist data, or verify semantic, factual, or tool-execution correctness.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:aryswisnu/dsh-eval-regression

aryswisnu/dsh-eval-regression 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-eval-regression

A small, deterministic regression-evaluation plugin for DeepSeek Harness.

It registers evaluate_golden_output, a model-callable tool that compares supplied candidate output against required and forbidden fragments. It does not call a model, persist data, or claim semantic correctness. Its job is repeatable pass/fail evidence, not vibes-based architecture in a trench coat.

Why

Agent changes routinely regress answers that appear superficially acceptable. A stable corpus of expected fragments gives a cheap, transparent signal for release smoke tests and replayed transcripts:

  • required fragments catch omissions
  • forbidden fragments catch known bad claims or unsafe fallbacks
  • per-case reports make failures reviewable
  • deterministic scoring is suitable for CI thresholds

Install as a DSH plugin

dsh plugin --profile <profile> add github:aryswisnu/dsh-eval-regression

The package is a DSH bundle. Its cordis.patch.yml registers the tool automatically after the profile's base tool runtime.

For local development:

git clone https://github.com/aryswisnu/dsh-eval-regression.git
cd dsh-eval-regression
npm install
npm run build
dsh plugin --profile <profile> add .

Run a version-controlled suite in CI

The plugin also ships a small CLI. It reads a JSON suite, prints an evaluation report to stdout, exits 0 when every case passes, exits 1 when any case fails, and exits 2 for invalid input or usage errors.

{
  "suite": "release-smoke",
  "cases": [
    {
      "id": "grounded-answer",
      "actual": "The result is 42. Source: benchmark.csv",
      "includes": ["42", "Source:"],
      "excludes": ["I cannot verify"]
    }
  ]
}
npx dsh-eval-regression suites/release-smoke.json
# or, from this repository:
npm run evaluate -- suites/release-smoke.json

The report includes total passed and failed cases, a 0..1 score, and case-level missing or forbidden fragments. This makes the evaluation corpus ordinary, reviewable source code and makes a failed expectation fail the CI job.

Tool example

{
  "suite": "release-smoke",
  "cases": [
    {
      "id": "grounded-answer",
      "actual": "The result is 42. Source: benchmark.csv",
      "includes": ["42", "Source:"],
      "excludes": ["I cannot verify"]
    }
  ]
}

The canonical result includes total passed and failed cases, a 0..1 score, and each case's missing or forbidden fragments.

Boundaries

This is intentionally a narrow deterministic evaluator. It does not replace model-quality review, factual grounding, tool execution checks, or snapshot replay. Use it as one gate in an evaluation harness, then add stronger signals where the product needs them.

Development

npm install
npm test
npm run typecheck
npm run build

MIT License.

上一个 Prev dsh-image-theme 下一个 Next dsh-explorer