Introduction

During development with DeepSeek Harness (DSH), models are prone to making incorrect assumptions or guesses when they receive vague instructions (such as “help me write it”). The dsh-ambiguity-handling plugin injects structured ambiguity-handling rules into the system prompt, forcing the model to clarify the user’s intent before executing a task.

Plugin Purpose

  • Name: dsh-ambiguity-handling
  • Maintainer: changlianxiya-139
  • Category: Model Inference
  • License: MIT
  • Core Function: Appends ambiguity-handling rules to DSH’s system prompt as an independent section, guiding the model to clarify before executing.

Features

  1. Independent Section Injection
    The plugin does not override the existing system prompt content; instead, it appends an independent section to the end.

  2. Section Configuration

    • Name: ambiguity-handling
    • Order: order: 50
  3. Processing Logic
    The rules require the model to perform the following steps:

    • Explicitly identify ambiguity in the request and do not guess.
    • List 2-4 most likely Chinese interpretations.
    • Provide an additional “Other” option for the user to add details.
    • Ask the user to select or confirm an option before continuing.

    The injected rule text is as follows:

    # 歧义处理规则

    当用户请求存在歧义、范围不清或可能有多重理解时,你必须:

    1. 明确指出请求存在歧义,不要臆测、不要假设。
    2. 列出 2-4 种最可能的中文理解。
    3. 额外提供一个"其他"选项,让用户自行补充。
    4. 请用户选择其中一项或补充说明。

    输出格式示例:

    "您的请求存在多种理解,请选择最符合您意图的一项:
    A. ...
    B. ...
    C. ...
    D. 其他(请补充说明)"

Installation and Enablement

Use the official installation command to add the plugin:

dsh plugin --profile web add github:changlianxiya-139/dsh-ambiguity-handling

If you need to use it in a headless profile, replace web with headless.

Typical Usage

After installing and restarting DSH, send an ambiguous request (for example, “help me write it”) and observe whether the model lists A/B/C/D options and asks for clarification according to the rules above.

Configuration and Debugging

After modifying the patch configuration or plugin code, you must restart DSH (web or headless profile) to reload the plugin.

Verify that the plugin is active:

dsh --profile web --dump-config | grep -A1 'id: dsh-ambiguity-handling'

Modifying Rules

The rule source code is located in the ambiguityRule template string in index.ts. After modifying the source code, you must also update the prebuilt entry index.js (by re-transpiling it or synchronizing it manually); otherwise, the published package will still use the old rules.

Disabling the Plugin

  • Plugin package installation: dsh plugin --profile <name> remove dsh-ambiguity-handling
  • Local deployment: Remove the entry from the corresponding profile’s cordis.patch.yml and restart DSH.

Resource Links

  • Directory page: https://www.skillhub.cn/plugins/changlianxiya-139/dsh-ambiguity-handling
  • GitHub repository: https://github.com/changlianxiya-139/dsh-ambiguity-handling