DeepSeek Harness Effort Lab Plugin: A/B Testing Inference Costs in a Single Session

Introduction

When building agents or long-chain reasoning with DeepSeek models, you often face two questions: does tweaking the system prompt or adjusting the reasoning tier actually make a difference? Simply comparing the output text of two responses can obscure two critical facts: first, token consumption is invisible, and second, prompt changes break provider caching, making subsequent turns slower. effort lab turns the question of “which prompt or which reasoning tier is more cost-effective” into quantifiable JSONL logs.

What Is This

dsh-effort-lab is a plugin for DeepSeek Harness (DSH) desktop. It runs A/B experiments within a single session: it injects a prompt variant as the final paragraph of the system prompt, supports switching by reasoning tier, records per-turn token consumption, latency, sub-agent calls, compactions, and prunes, and exports everything to a JSONL file.

The plugin is maintained by flyer103, open-sourced on GitHub, has no extra runtime dependencies, is pure ESM, and does not import any @deepseek-ai/* packages.

Core Features

  • Single-session A/B: runs a baseline and a prompt variant concurrently in one session, comparing their differences in reasoning cost and quality.
  • Reasoning tier axis: compares different reasoning intensities via the effort tier parameter. This axis is inherently unaffected by caching.
  • Token-level statistics: records input tokens, output tokens, reasoning tokens, and cache-hit tokens per turn. Uses usageSteps to distinguish between missing reports and zero consumption.
  • Runtime metrics: wall time, sub-agent call count, compaction and prune counts.
  • Manual rating: after each turn, use /effort-lab rate to assign a 1–5 score.
  • JSONL export: all metrics and configuration are written to ~/.dsh/effort-lab/records.jsonl for downstream analysis.

Installation & Activation

The plugin is installed via the DSH plugin command, using the same profile as the runtime:

# npm
dsh plugin --profile desktop add @flyer103/dsh-effort-lab

# GitHub, default branch or a specific tag
dsh plugin --profile desktop add github:flyer103/dsh-effort-lab
dsh plugin --profile desktop add github:flyer103/dsh-effort-lab#v0.1.0

# Local checkout (records dependency links)
cd /path/to/dsh-effort-lab
dsh plugin --profile desktop add "$(pwd)"
node scripts/install.mjs --profile desktop

# tarball (pack with npm pack, then install)
dsh plugin --profile desktop add /absolute/path/flyer103-dsh-effort-lab-0.1.0.tgz

After installation, restart DSH so the profile reloads the plugin bundle. To uninstall, remove the plugin first, then restart:

dsh plugin --profile desktop remove @flyer103/dsh-effort-lab

Typical Usage

Control the experiment workflow via slash commands in a DSH session:

/effort-lab start my-sweep     # Start an A/B experiment in the current session
/effort-lab report             # Summarize all recorded turns
/effort-lab rate 4             # Rate the most recent turn on a 1-5 scale
/effort-lab stop               # Stop the experiment and restore the previous effort tier

For full semantics and field definitions, see the project documentation docs/CONTRACT.md.

Configuration is specified via cordis.patch.yml in the profile. All fields are optional:

- id: dsh-effort-lab
  config:
    blockSize: 3
    file: ~/.dsh/effort-lab/records.jsonl
    variants:
      - { id: baseline,  label: Baseline, suffix: '' }
      - { id: unlimited, label: Unlimited token notice, suffix: '你的 Token 预算无上限,不要吝惜 Token。' }
    # efforts: [high, max]      # Optional second axis, written via model seat

Use Cases & Caveats

effort lab is well-suited for scenarios where you need to control reasoning costs, compare different prompt formulations, or evaluate the impact of reasoning tiers. Because prompt variant comparisons introduce cache-invalidation costs at block boundaries, effort tier comparisons do not suffer from this effect. For wall-time comparisons, prefer the effort axis.

The plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installing. The log file ~/.dsh/effort-lab/records.jsonl persists across restarts, but the session is disarmed upon restart.

Summary

effort lab turns the vague question of “does changing the prompt actually help?” into quantifiable JSONL data. If you are debugging reasoning costs or comparing different system prompt formulations, this plugin lets you record multiple sets of metrics and manual ratings within a single session, making it easy to perform cost-quality trade-off analysis later.

Plugin page: https://www.skillhub.cn/plugins/flyer103/dsh-effort-lab
GitHub: https://github.com/flyer103/dsh-effort-lab

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye