dsh-plain-talk 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.en.md +227 -0
- package/README.md +276 -3
- package/cordis.patch.yml +5 -0
- package/dsh/check.js +250 -0
- package/dsh/index.js +473 -0
- package/dsh/rules.js +44 -0
- package/dsh/vocab.js +215 -0
- package/icon.svg +6 -0
- package/lib/client.js +155 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +54 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 0.1.0
|
|
2
|
+
|
|
3
|
+
- 输入框「说人话」开关:按会话记录,状态写入 `$DSH_HOME/plain-talk.json`,重启后保留。
|
|
4
|
+
- 系统提示词区段:结论先行、默认 ≤12 行 / 300 字、禁回指、引用必须贴原文、代号首现解释、语言跟随用户。
|
|
5
|
+
- `plain_talk_check`:发送前自检,报回指、内部信息、只给指针的引用、未解释代号、长度与列表问题。
|
|
6
|
+
- `plain_talk_vocab`:读取与维护用户词汇清单,分常识 / 专业 / 项目 / 内部代号 / 待归类五类。
|
|
7
|
+
- 「调研 X」两阶段学习:第一次回复把 X 当作未知,回合结束后才写入词汇清单。
|
|
8
|
+
- `PLAIN_TALK_DEFAULT=off` 可让新会话默认关闭,用于基准测试或按需开启的用法。
|
|
9
|
+
- 不写 session 事件;只写两个 sidecar JSON 文件。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lizilong1993
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# dsh-plain-talk
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/icon.svg" alt="dsh-plain-talk" width="72" height="72">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>English</strong> · <a href="README.md">中文</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-263146?style=flat-square"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/dsh-plain-talk"><img alt="npm" src="https://img.shields.io/npm/v/dsh-plain-talk?style=flat-square"></a>
|
|
14
|
+
<img alt="dsh-plugin" src="https://img.shields.io/badge/dsh--plugin-ready-478CBF?style=flat-square&logo=deepseek&logoColor=white">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
A reply-shaping plugin for DeepSeek Harness: one composer switch. When it is on, replies lead with the conclusion, stay under 12 lines by default, paste the text they cite, gloss an opaque code the first time it appears, and stop re-explaining words you already use.
|
|
18
|
+
|
|
19
|
+
> It shapes replies only. It does not plan work, does not set acceptance criteria, and writes no session events.
|
|
20
|
+
|
|
21
|
+
## What it does
|
|
22
|
+
|
|
23
|
+
- **Conclusion first.** The first line is the answer or the verdict. No restating the question, no "let me take a look".
|
|
24
|
+
- **Short by default.** ≤12 lines / 300 characters unless you ask for depth.
|
|
25
|
+
- **Standalone.** No "as mentioned above" / "the previous step"; codes such as `M11`, `dev-1200`, `c590` get a one-line gloss at first use.
|
|
26
|
+
- **Citations you can read.** A `file:line` reference is always accompanied by the quoted lines.
|
|
27
|
+
- **User vocabulary.** Words you have used, project names and common terms count as known. "Research X" is the exception: X stays unknown for the first reply, then joins the vocabulary.
|
|
28
|
+
|
|
29
|
+
## Results
|
|
30
|
+
|
|
31
|
+
Environment: DeepSeek Harness `desktop` profile running headless, model `cmc/deepseek/deepseek-v4.1-flash` (high), 2026-11-04. Same prompt, same workspace, only the switch changes; the vocabulary is reset before each arm.
|
|
32
|
+
|
|
33
|
+
| Scenario | Metric | Off | On | Change |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
| A. Completion task (4 files + verification) | final reply chars | 144 | 189 | +45 (adds a verdict and a self-check step) |
|
|
36
|
+
| | output tokens | 2,333 | 1,344 | **−42%** |
|
|
37
|
+
| | tool calls | 12 | 11 | −1 |
|
|
38
|
+
| | elapsed | 131 s | 107 s | −24 s |
|
|
39
|
+
| C. Explanation | final reply chars | 410 | 350 | **−15%** |
|
|
40
|
+
| | output tokens | 732 | 326 | **−55%** |
|
|
41
|
+
| | cross-turn references | 2 | 0 | **−2** |
|
|
42
|
+
| D. Report rewrite (turn a draft into a user-facing report) | final reply chars | 558 | 496 | **−11%** |
|
|
43
|
+
| | output tokens | 2,781 | 3,066 | +10% (one extra self-check round) |
|
|
44
|
+
| | unexplained codes | 6 | 0 | **−6** |
|
|
45
|
+
| | pointer-only citations | 1 | 0 | **−1** |
|
|
46
|
+
|
|
47
|
+
Total input tokens (system prompt + tool schemas + every step): A 1,832,985 → 1,572,409; C 260,351 → 260,940; D 1,570,662 → 1,573,950. That number tracks the number of steps and tools, not the rules section.
|
|
48
|
+
|
|
49
|
+
The rules section costs about **+589 tokens per step** (measured on the single-step C run). Mode on is not free, and this README says so.
|
|
50
|
+
|
|
51
|
+
### D: the same draft, two rewrites
|
|
52
|
+
|
|
53
|
+
The draft deliberately contains `M11`, `dev-1200`, `c590`, `G18/G19`, "上述", "上一轮", and a `reports/m11/summary.md:42` pointer with no quoted content.
|
|
54
|
+
|
|
55
|
+
**Off**
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
结论:M11(新加的实例校验模块)这次不合并。加了它的 G19 定位精度 61.2% → 63.8%,涨 2.6 个百分点,没到 3 个点的门槛。这是跑完实测后的决定,不是"无法评估"。
|
|
59
|
+
|
|
60
|
+
但对外的版本里有两个数字打架,得先查。
|
|
61
|
+
|
|
62
|
+
一是开头写"没有带来定位精度提升",和后面的 +2.6pp 冲突,应改成"有提升,但不够门槛"。
|
|
63
|
+
|
|
64
|
+
二是 1198/1200 条预测逐字节相同。只剩 2 条不同,最多撬动 0.17 个百分点,凑不出 2.6pp。这两个数至少错一个,而 2.6pp 又刚好卡在门槛下面,不解决这个矛盾,结论就站不住。
|
|
65
|
+
|
|
66
|
+
另外缺三样:AUROC(排序质量指标)只写了见 reports/m11/summary.md:42,没给数值,文件也不在当前目录;分片合并的结果本身不是 claim-eligible EvalRun(可引用评测记录),要注明是方向性对照;没有置信区间,n=1200 时 2.6pp 约等于 31 条样本的差异,是否显著未知。
|
|
67
|
+
|
|
68
|
+
你现在就能做的:跑一次全量逐条 diff,确认到底是"1198/1200 相同"还是"+2.6pp"准确,顺带查为什么 B1/B2 两个 bug 修完预测只变了 2 条;把 AUROC 数值补进报告。如果精度确实只有 2.6pp,round10 先别跑。
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**On**
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
结论:M11(给推理流程加“实例验证”一步的实验)没达到合并门槛,不合并。
|
|
75
|
+
|
|
76
|
+
- dev-1200(1200 条开发集)上定位精度 61.2% → 63.8%,+2.6 个百分点,合并线 3 个百分点。
|
|
77
|
+
- 对照批次是 c590:G18(基线,配置名 G18_region_gate_v3)对 G19(G18 加 m11_instance_verify 这一步,保留更早两轮的 m9/m10)。同 manifest(SHA-256 26e3406e…)、seed 42、代码 71e6489,4×V100 分 4 片各 300 条合并成 1200。
|
|
78
|
+
- 这是实测对照,不是跑不出来:1200 条里 1198 条预测逐字节相同;B1/B2 两个 bug 已修复。
|
|
79
|
+
- 口径瑕疵:分片合并的结果不算可入库的 EvalRun,只能说明分母、manifest、seed 一致。
|
|
80
|
+
- AUROC 没有可核对的数值:草稿指向的 reports/m11/summary.md 不在仓库里,这条不引。
|
|
81
|
+
|
|
82
|
+
下一步:补出 summary.md,或开 round10(下一轮实验)用单个全量 run 复核 G19。
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The switch glosses `M11`, `dev-1200`, `c590`, `G18`, `G19` and `round10` in place, replaces "上述设置" with the actual setting, drops the pointer-only citation, and closes with exactly one next step. The off arm keeps `AUROC`, `pp` and `round10` unexplained.
|
|
86
|
+
|
|
87
|
+
### C: explanation
|
|
88
|
+
|
|
89
|
+
Off: 410 chars, 2 cross-turn references, 732 output tokens. On: 350 chars, 0 cross-turn references, 326 output tokens. The on version also replaces "lost in the middle" jargon with a one-line explanation of what it means.
|
|
90
|
+
|
|
91
|
+
### A: completion task
|
|
92
|
+
|
|
93
|
+
Off: 144 chars. On: 189 chars, but the first line is a verdict ("已达标") and it adds a step the reader can run; output tokens drop from 2,333 to 1,344.
|
|
94
|
+
|
|
95
|
+
### Reading the numbers honestly
|
|
96
|
+
|
|
97
|
+
- Output tokens fell in two scenarios (−42%, −55%) and rose in one (+10%, one extra self-check round). **The plugin does not guarantee fewer tokens in every case.**
|
|
98
|
+
- The rules section adds a fixed ~590 input tokens per step; the more turns, the more it costs.
|
|
99
|
+
- A fourth scenario (survey) produced an invalid off arm: it stopped after 24 tool calls and returned 87 characters. It is excluded rather than spun.
|
|
100
|
+
- Reproduce by running the same model, prompt and workspace twice, switching the composer toggle between the runs; the vocabulary is cleared before each arm.
|
|
101
|
+
|
|
102
|
+
## Install
|
|
103
|
+
|
|
104
|
+
Requires a DeepSeek Harness version with the `conversation.input.left` slot (0.2.x line).
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
dsh plugin --profile desktop add dsh-plain-talk
|
|
108
|
+
dsh plugin --profile desktop add github:lizilong1993/dsh-plain-talk
|
|
109
|
+
dsh plugin --profile desktop add ./dsh-plain-talk
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Restart DSH afterwards. `bundles` decides whether it loads; `cordis.patch.yml` is only the config layer.
|
|
113
|
+
|
|
114
|
+
## Use
|
|
115
|
+
|
|
116
|
+
1. Open any session: a speech-bubble icon appears in the composer tool row, after the permission selector.
|
|
117
|
+
2. It starts on (blue). Click it to turn it off (grey) for that session only.
|
|
118
|
+
3. State lives in `$DSH_HOME/plain-talk.json`, keyed by session id, and survives restarts.
|
|
119
|
+
4. Want new sessions to start off? Set `PLAIN_TALK_DEFAULT=off` in the environment that launches DSH.
|
|
120
|
+
|
|
121
|
+
A failed write rolls the button back, so the UI never claims a state the model did not receive.
|
|
122
|
+
|
|
123
|
+
## Vocabulary
|
|
124
|
+
|
|
125
|
+
`$DSH_HOME/plain-talk-vocab.json`, shared across sessions:
|
|
126
|
+
|
|
127
|
+
| Category | Meaning | Examples |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| common | built in, never explained | arXiv, DOI, API, GPU |
|
|
130
|
+
| domain | field terms you have used | diffusion model, AUROC |
|
|
131
|
+
| project | repositories, products, workspace names | MechDW, GeoEvidence_V2 |
|
|
132
|
+
| internal | experiment/task/commit codes | M11, dev-1200, c590 |
|
|
133
|
+
| unclassified | recorded, not classified yet | other detected codes |
|
|
134
|
+
|
|
135
|
+
"Research X" is two-phase: X is marked pending for that session, the first reply still explains it, and the turn end moves it into the vocabulary. Common terms are exempt.
|
|
136
|
+
|
|
137
|
+
Maintain it with `plain_talk_vocab` (`list` / `add` / `remove` / `classify`) or by editing the JSON.
|
|
138
|
+
|
|
139
|
+
## Self-check tool
|
|
140
|
+
|
|
141
|
+
`plain_talk_check` takes a draft and reports:
|
|
142
|
+
|
|
143
|
+
- errors: cross-turn wording, session/subagent/tool names, pointer-only citations;
|
|
144
|
+
- warnings: unexplained codes, over 12 lines / 300 characters, lists over 5, preamble, closing offer, English-only reply to a Chinese user.
|
|
145
|
+
|
|
146
|
+
The section asks the model to run it for completion reports and replies over 12 lines. It advises; it never blocks.
|
|
147
|
+
|
|
148
|
+
## How it works
|
|
149
|
+
|
|
150
|
+
- Host (`dsh/index.js`) registers one `systemPrompt` section (`plain-talk`, order 55) whose text function returns the rules only while that session's switch is on.
|
|
151
|
+
- Browser half (`lib/client.js`) registers into `conversation.input.left` and renders a 24×24 button.
|
|
152
|
+
- Loopback route `/plain-talk/state` (GET/POST, 127.0.0.1/::1 only, 8 KB body limit).
|
|
153
|
+
- Two atomic sidecar files; 256 sessions and 2,000 vocabulary terms are bounded.
|
|
154
|
+
- No session events are written.
|
|
155
|
+
|
|
156
|
+
## Permissions and data
|
|
157
|
+
|
|
158
|
+
It writes only those two JSON files. No network, no upload, no credential access. A corrupt state file reads as "no choice recorded".
|
|
159
|
+
|
|
160
|
+
## Configuration
|
|
161
|
+
|
|
162
|
+
No profile config; only `PLAIN_TALK_DEFAULT=on|off`.
|
|
163
|
+
|
|
164
|
+
## Known limits
|
|
165
|
+
|
|
166
|
+
- The button position depends on `conversation.input.left`; a host redesign may move it, without breaking the feature.
|
|
167
|
+
- Rules are prompt constraints, not enforcement. `plain_talk_check` warns; it cannot stop a send.
|
|
168
|
+
- Vocabulary is per user, not per project.
|
|
169
|
+
- Code detection is heuristic: `M11`, `dev-1200`, `c590` are flagged; plain English project names and Chinese terms are not forced into glosses.
|
|
170
|
+
- Mode on adds roughly 590 input tokens per step.
|
|
171
|
+
|
|
172
|
+
## Repository contents
|
|
173
|
+
|
|
174
|
+
The repository keeps runtime and documentation only: `dsh/` (host), `lib/` (browser), `cordis.patch.yml`, `locale/`, `icon.svg`, both READMEs, `CHANGELOG.md`, `LICENSE`, `package.json`. Test scripts, benchmark data, screenshots and local debugging files are not committed and never enter the npm tarball.
|
|
175
|
+
|
|
176
|
+
## Publishing to npm
|
|
177
|
+
|
|
178
|
+
1. Keep `files` to runtime needs only: `dsh/`, `lib/`, `cordis.patch.yml`, `locale/`, `icon.svg`, `README*.md`, `CHANGELOG.md`, `LICENSE`. Test scripts, screenshots and benchmark data stay out.
|
|
179
|
+
2. Use raw absolute URLs for README images (`https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/...`); a relative path does not render on npm.
|
|
180
|
+
3. Ship the prebuilt client; users never run the build.
|
|
181
|
+
4. Check the tarball before publishing:
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
npm pack --dry-run
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The current tarball is **14 files / 31.0 kB** (`npm pack --dry-run`, 2026-11-04); re-check after any change so screenshots or test data do not slip in.
|
|
188
|
+
|
|
189
|
+
5. With 2FA enabled, a classic token is rejected with 403. Use an Automation token or a Granular token with "Bypass 2FA":
|
|
190
|
+
|
|
191
|
+
```sh
|
|
192
|
+
npm config set //registry.npmjs.org/:_authToken=<token>
|
|
193
|
+
npm publish
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Listing on awesome-dsh-plugin
|
|
197
|
+
|
|
198
|
+
One file is the whole submission: `data/plugins/<owner>__<repo>.yml`.
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
# data/plugins/lizilong1993__dsh-plain-talk.yml
|
|
202
|
+
url: https://github.com/lizilong1993/dsh-plain-talk
|
|
203
|
+
name: lizilong1993/dsh-plain-talk
|
|
204
|
+
category: ui
|
|
205
|
+
description:
|
|
206
|
+
en: 'Composer toggle that shapes replies: conclusion first, inline quotes, no cross-turn references.'
|
|
207
|
+
zh: '输入框「说人话」开关:结论先行、引用原文、去掉需要翻前文的表述。'
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Requirements:
|
|
211
|
+
|
|
212
|
+
- `package.json` declares `dsh.bundle.patch` and the repo has `cordis.patch.yml` (`dsh.client` alone is not installable).
|
|
213
|
+
- The repository is at least one day old and carries the `dsh-plugin` topic.
|
|
214
|
+
- Real, working code; accurate description, no marketing; quote a description that contains `: `.
|
|
215
|
+
- One PR adds only that file; never edit the generated READMEs or another entry.
|
|
216
|
+
|
|
217
|
+
Local pre-check (run inside the upstream `awesome-dsh-plugin` repository; needs `GITHUB_TOKEN`):
|
|
218
|
+
|
|
219
|
+
```sh
|
|
220
|
+
git clone https://github.com/awesome-dsh-plugin/awesome-dsh-plugin
|
|
221
|
+
cd awesome-dsh-plugin
|
|
222
|
+
node scripts/check-submission.mjs --base origin/main
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## License
|
|
226
|
+
|
|
227
|
+
MIT — see [LICENSE](./LICENSE).
|
package/README.md
CHANGED
|
@@ -1,3 +1,276 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# dsh-plain-talk(说人话)
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/icon.svg" alt="dsh-plain-talk" width="72" height="72">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="README.en.md">English</a> · <strong>中文</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-263146?style=flat-square"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/dsh-plain-talk"><img alt="npm" src="https://img.shields.io/npm/v/dsh-plain-talk?style=flat-square"></a>
|
|
14
|
+
<img alt="dsh-plugin" src="https://img.shields.io/badge/dsh--plugin-ready-478CBF?style=flat-square&logo=deepseek&logoColor=white">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
DeepSeek Harness 的回复优化插件:输入框里一个「说人话」开关。打开后,模型回复先给结论、默认不超过 12 行、引用直接贴原文、代号第一次出现时用一句人话解释,并且记住你已经认识的词。
|
|
18
|
+
|
|
19
|
+
> 它只优化回复内容,不制定计划、不设定验收标准,也不写任何 session 事件。
|
|
20
|
+
|
|
21
|
+
## 它做什么
|
|
22
|
+
|
|
23
|
+
- **结论先行**:第一行就是答案或判定,不复述问题、不写"我来看看"。
|
|
24
|
+
- **默认短**:≤12 行 / 300 字;能一句说清就一句。你要求展开时才放开深度。
|
|
25
|
+
- **自包含**:禁止"上述 / 前面 / 上一轮";代号(M11、dev-1200、c590)第一次出现写成 `M11(一句话说明)`。
|
|
26
|
+
- **引用可读**:给 `文件:行号` 的同时把那几行原文贴出来,不让读者自己翻。
|
|
27
|
+
- **用户词汇清单**:你说过的词、项目名、常见术语默认已知,不再反复解释;"调研 X"的第一轮回复例外——X 仍按未知处理,回复交付后才进入清单。
|
|
28
|
+
|
|
29
|
+
## 实验结果
|
|
30
|
+
|
|
31
|
+
测试环境:DeepSeek Harness `desktop` profile、headless 运行、模型 `cmc/deepseek/deepseek-v4.1-flash`(high)、2026-11-04。同一提示词、同一工作区,只切换「说人话」开关;每轮开始前清空词汇清单,保证两侧起点一致。
|
|
32
|
+
|
|
33
|
+
### 汇总
|
|
34
|
+
|
|
35
|
+
| 场景 | 指标 | 关闭 | 开启 | 变化 |
|
|
36
|
+
|---|---|---|---|---|
|
|
37
|
+
| A 完成类任务(建 4 个文件并验证) | 最终回复字数 | 144 | 189 | +45(多了"达标"和"你自己确认") |
|
|
38
|
+
| | 输出 token | 2,333 | 1,344 | **−42%** |
|
|
39
|
+
| | 工具调用 | 12 | 11 | −1 |
|
|
40
|
+
| | 耗时 | 131 s | 107 s | −24 s |
|
|
41
|
+
| C 解释类(为什么模型会忘事) | 最终回复字数 | 410 | 350 | **−15%** |
|
|
42
|
+
| | 输出 token | 732 | 326 | **−55%** |
|
|
43
|
+
| | 回指次数 | 2 | 0 | **−2** |
|
|
44
|
+
| D 报告整理(把草稿改成给用户的汇报) | 最终回复字数 | 558 | 496 | **−11%** |
|
|
45
|
+
| | 输出 token | 2,781 | 3,066 | +10%(多了一次自检回合) |
|
|
46
|
+
| | 未解释代号 | 6 | 0(草稿里的 M11/dev-1200/c590 都补了解释) | **−6** |
|
|
47
|
+
| | 只给指针的引用 | 1 | 0 | **−1** |
|
|
48
|
+
|
|
49
|
+
输入 token 总量(含系统提示词、工具 schema、每一步的上下文):A 1,832,985 → 1,572,409,C 260,351 → 260,940,D 1,570,662 → 1,573,950。这个数字主要随回合数和工具数量变化,不能当成规则段的成本。
|
|
50
|
+
|
|
51
|
+
规则段本身的开销可以直接量:C 是单步、零工具运行,输入从 260,351 涨到 260,940,即**每步约 +589 token**。开着插件不是免费的,这部分成本如实列出。
|
|
52
|
+
|
|
53
|
+
### 输出对比 D:同一份草稿,两侧整理结果
|
|
54
|
+
|
|
55
|
+
草稿里刻意放了 `M11`、`dev-1200`、`c590`、`G18/G19`、`上述`、`上一轮`、只给 `reports/m11/summary.md:42` 的引用。
|
|
56
|
+
|
|
57
|
+
**关闭**
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
结论:M11(新加的实例校验模块)这次不合并。加了它的 G19 定位精度 61.2% → 63.8%,涨 2.6 个百分点,没到 3 个点的门槛。这是跑完实测后的决定,不是"无法评估"。
|
|
61
|
+
|
|
62
|
+
但对外的版本里有两个数字打架,得先查。
|
|
63
|
+
|
|
64
|
+
一是开头写"没有带来定位精度提升",和后面的 +2.6pp 冲突,应改成"有提升,但不够门槛"。
|
|
65
|
+
|
|
66
|
+
二是 1198/1200 条预测逐字节相同。只剩 2 条不同,最多撬动 0.17 个百分点,凑不出 2.6pp。这两个数至少错一个,而 2.6pp 又刚好卡在门槛下面,不解决这个矛盾,结论就站不住。
|
|
67
|
+
|
|
68
|
+
另外缺三样:AUROC(排序质量指标)只写了见 reports/m11/summary.md:42,没给数值,文件也不在当前目录;分片合并的结果本身不是 claim-eligible EvalRun(可引用评测记录),要注明是方向性对照;没有置信区间,n=1200 时 2.6pp 约等于 31 条样本的差异,是否显著未知。
|
|
69
|
+
|
|
70
|
+
你现在就能做的:跑一次全量逐条 diff,确认到底是"1198/1200 相同"还是"+2.6pp"准确,顺带查为什么 B1/B2 两个 bug 修完预测只变了 2 条;把 AUROC 数值补进报告。如果精度确实只有 2.6pp,round10 先别跑。
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**开启**
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
结论:M11(给推理流程加“实例验证”一步的实验)没达到合并门槛,不合并。
|
|
77
|
+
|
|
78
|
+
- dev-1200(1200 条开发集)上定位精度 61.2% → 63.8%,+2.6 个百分点,合并线 3 个百分点。
|
|
79
|
+
- 对照批次是 c590:G18(基线,配置名 G18_region_gate_v3)对 G19(G18 加 m11_instance_verify 这一步,保留更早两轮的 m9/m10)。同 manifest(SHA-256 26e3406e…)、seed 42、代码 71e6489,4×V100 分 4 片各 300 条合并成 1200。
|
|
80
|
+
- 这是实测对照,不是跑不出来:1200 条里 1198 条预测逐字节相同;B1/B2 两个 bug 已修复。
|
|
81
|
+
- 口径瑕疵:分片合并的结果不算可入库的 EvalRun,只能说明分母、manifest、seed 一致。
|
|
82
|
+
- AUROC 没有可核对的数值:草稿指向的 reports/m11/summary.md 不在仓库里,这条不引。
|
|
83
|
+
|
|
84
|
+
下一步:补出 summary.md,或开 round10(下一轮实验)用单个全量 run 复核 G19。
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
差异:开启侧把 `M11`、`dev-1200`、`c590`、`G18`、`G19`、`round10` 全部就地解释;"上述设置"被改成直陈;`reports/m11/summary.md:42` 这种只给指针的引用被替换成"文件不在仓库里,这条不引";结尾只留一个下一步。关闭侧虽然也解释了 M11,但 `AUROC`、`pp`、`round10` 仍然裸奔,且没有给出下一步选项。
|
|
88
|
+
|
|
89
|
+
### 输出对比 C:解释类
|
|
90
|
+
|
|
91
|
+
**关闭**(410 字,回指 2 次)
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
多数人以为这只是“上下文窗口不够长”,其实窗口够长也会忘。一是截断与压缩:超过窗口的早期轮次会被滑窗丢弃,或者被系统摘要掉,原本的细节就没了。二是注意力是软检索,没有索引保证——候选内容越多,权重越被摊薄,而且位置偏差很明显(“lost in the middle”:开头和结尾记得住,中间段最容易被忽略)。三是位置编码在超长距离上外推能力下降,早期 token 与当前 token 的关联信号本来就更弱。
|
|
95
|
+
|
|
96
|
+
再往深一层,是训练目标没给“长期记忆”发工资。预训练是逐 token 预测,几乎不惩罚“忘了前面说过什么”,模型因此没学出显式的记忆读写机制;早期信息只能靠每层残差流反复重编码往后传,而这条通道带宽有限,误差逐层累积。加上实际产品还会做 KV cache 压缩、历史摘要、检索式拼接,早期内容往往以有损形式才活到当下。所以真正管用的办法不是“让它记住”,而是把关键事实外置:检索、写进系统提示、或在需要时重述。
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**开启**(350 字,回指 0 次)
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
简单说,模型没有“记忆”,它每次回答只能看到当前上下文窗口里的全部 token;窗口塞满后,早先的对话要么被截断、要么被压缩成摘要,原文就没了。窗口再大也不是无限,而塞得越满,注意力被稀释得越厉害:远处的信息权重低、容易被中间位置淹没(常说的 lost-in-the-middle),于是“看得见但用不上”。
|
|
103
|
+
|
|
104
|
+
另一层原因是训练时的分布。模型主要在短文本上学习长距离依赖,真到几万 token 的跨度,它把“第 3 轮的约束”和“第 80 轮的问题”关联起来的能力,本来就弱于人类的理解记忆;加上系统端为了省算力会做 KV 缓存淘汰、滑动窗口保留最近若干轮,早期内容被结构性丢弃。所以这不是“忘了”,而是从没被持续保留——需要跨长对话保持的信息,得靠外部记录(写入文件、检索、每轮重述关键约束)来补。
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 输出对比 A:完成类任务
|
|
108
|
+
|
|
109
|
+
**关闭**(144 字)
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
任务完成,产物都在 `bench-demo/` 目录:
|
|
113
|
+
|
|
114
|
+
- `a.txt`、`b.txt`、`c.txt`,内容分别是 A、B、C
|
|
115
|
+
- `check.mjs`:按 a→b→c 顺序读取三个文件,去掉换行后拼接输出
|
|
116
|
+
|
|
117
|
+
运行 `node check.mjs`,输出 `ABC`,退出码 0。
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**开启**(189 字)
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
已达标:`bench-demo` 下四个文件已就位,运行脚本输出 `ABC`。
|
|
124
|
+
|
|
125
|
+
- `a.txt`、`b.txt`、`c.txt` 各只有一行 `A`、`B`、`C`
|
|
126
|
+
- `check.mjs` 按 a → b → c 顺序读取、拼接并打印,实测输出:`ABC`
|
|
127
|
+
|
|
128
|
+
你自己确认:在 `bench-demo` 目录执行 `node check.mjs`,应看到一行 `ABC`。
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
这一组开启侧多了 45 字,但第一行从"任务完成"变成"已达标 + 结论",并补了一条读者能照做的确认步骤;输出 token 反而少了 42%。
|
|
132
|
+
|
|
133
|
+
### 怎么读这些数字
|
|
134
|
+
|
|
135
|
+
- 三个场景里,输出 token 两组下降(−42%、−55%),一组上升(+10%,因为多跑了一次自检回合)。**插件不保证每个场景都更省 token。**
|
|
136
|
+
- 输入侧固定多出规则段(约 +590 token/步),回合越多总成本越高;短问答里这笔开销占比明显。
|
|
137
|
+
- 另有一个调查类场景 B:关闭侧在 24 次工具调用后提前结束、只回了 87 字,属于无效对照,已从表格剔除;开启侧正常输出 867 字。样本量小,不做结论。
|
|
138
|
+
- 复现方式:同一模型、同一提示词、同一工作区,只在输入框切换开关各跑一次;词汇清单在两侧开始前清空。
|
|
139
|
+
|
|
140
|
+
## 安装
|
|
141
|
+
|
|
142
|
+
需要 DeepSeek Harness 带 `conversation.input.left` 插槽的版本(0.2.x 线)。
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
# npm(推荐,预构建,免安装期构建)
|
|
146
|
+
dsh plugin --profile desktop add dsh-plain-talk
|
|
147
|
+
|
|
148
|
+
# GitHub
|
|
149
|
+
dsh plugin --profile desktop add github:lizilong1993/dsh-plain-talk
|
|
150
|
+
|
|
151
|
+
# 本地目录
|
|
152
|
+
dsh plugin --profile desktop add ./dsh-plain-talk
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
装完重启 DSH。`bundles` 决定是否加载;`cordis.patch.yml` 只是配置层。
|
|
156
|
+
|
|
157
|
+
## 使用
|
|
158
|
+
|
|
159
|
+
1. 打开任意会话,输入框左下角、权限选择器右侧会多一个气泡图标。
|
|
160
|
+
2. 默认开启(蓝色);点一下变灰,立即关闭,只影响当前会话。
|
|
161
|
+
3. 状态写在 `$DSH_HOME/plain-talk.json`,按会话 id 记录,重启后保持;A 会话关掉不影响 B 会话。
|
|
162
|
+
4. 想让新会话默认关闭:在启动 DSH 的环境里设 `PLAIN_TALK_DEFAULT=off`,之后每个会话单独点开。
|
|
163
|
+
|
|
164
|
+
按钮失败时会回滚显示,不会出现"界面显示开着、模型其实没收到规则"的状态。
|
|
165
|
+
|
|
166
|
+
## 词汇清单
|
|
167
|
+
|
|
168
|
+
插件维护一份用户级词表 `$DSH_HOME/plain-talk-vocab.json`,跨会话共享。
|
|
169
|
+
|
|
170
|
+
| 类别 | 含义 | 例子 |
|
|
171
|
+
|---|---|---|
|
|
172
|
+
| 常识词汇 | 内置,不需要解释 | arXiv、DOI、API、GPU |
|
|
173
|
+
| 专业词汇 | 你用过的领域词 | 扩散模型、AUROC |
|
|
174
|
+
| 项目 / 产品名 | 仓库、产品、工作区名 | MechDW、GeoEvidence_V2 |
|
|
175
|
+
| 内部代号 | 实验号、任务号、提交号 | M11、dev-1200、c590 |
|
|
176
|
+
| 待归类 | 记录但还没分类 | 其他被识别到的代号 |
|
|
177
|
+
|
|
178
|
+
**"调研 X"的两阶段规则**:你说"调研 / 研究 / 查一下 X"时,X 被标记为本会话的待确认词,**第一次回复仍按未知处理并解释**;这条回复交付后,X 才写入词表,之后不再解释。这条规则只对非常识词生效("调研 arXiv"不会要求解释 arXiv)。
|
|
179
|
+
|
|
180
|
+
维护方式:模型可以调用 `plain_talk_vocab`(`list` / `add` / `remove` / `classify`),你也可以直接改 JSON。
|
|
181
|
+
|
|
182
|
+
## 自检工具
|
|
183
|
+
|
|
184
|
+
`plain_talk_check` 接收一条草稿,返回问题清单:
|
|
185
|
+
|
|
186
|
+
- 必须改:回指词、会话号 / 子代理 / 工具名、只给 `文件:行号` 没有原文。
|
|
187
|
+
- 建议改:未解释的内部代号、超过 12 行 / 300 字、列表超过 5 条、开头寒暄、结尾征询、中文用户却整段英文。
|
|
188
|
+
|
|
189
|
+
规则区段要求模型在"完成类回复或超过 12 行的回复"发送前调用它;它只是建议工具,不会拦截发送。
|
|
190
|
+
|
|
191
|
+
## 工作原理
|
|
192
|
+
|
|
193
|
+
- **Host**(`dsh/index.js`)注册一个系统提示词段落(`plain-talk`,order 55):文本是函数,只有当前会话开关打开时返回规则正文,否则返回空串。
|
|
194
|
+
- **浏览器端**(`lib/client.js`)注册进 `conversation.input.left`,渲染 24×24 气泡按钮;开=强调蓝,关=中性灰。
|
|
195
|
+
- **通信**:loopback 路由 `/plain-talk/state`,`GET ?sessionId=` 读、`POST {sessionId, enabled}` 写;只接受 127.0.0.1 / ::1,body ≤8 KB。
|
|
196
|
+
- **状态**:`$DSH_HOME/plain-talk.json`(会话开关)与 `$DSH_HOME/plain-talk-vocab.json`(词汇清单),均为原子写;开关最多记 256 个会话,词表最多 2000 条。
|
|
197
|
+
- **不写 session 事件**:fork、replay、旧版本读取都不受影响。
|
|
198
|
+
|
|
199
|
+
## 权限与数据
|
|
200
|
+
|
|
201
|
+
- 只写上面两个 JSON 文件;不联网、不上传、不读凭据。
|
|
202
|
+
- 词表内容来自你自己的消息与手动维护,不上报。
|
|
203
|
+
- 状态文件损坏时按"无记录"处理(默认值生效),不会把模式锁死。
|
|
204
|
+
|
|
205
|
+
## 配置
|
|
206
|
+
|
|
207
|
+
没有 profile 配置项;只有环境变量 `PLAIN_TALK_DEFAULT`(`on` / `off`,默认 `on`)。
|
|
208
|
+
|
|
209
|
+
## 已知限制
|
|
210
|
+
|
|
211
|
+
- 按钮位置依赖 `conversation.input.left` 的渲染方式;宿主改版后可能退到其它左侧控件旁边,功能不受影响。
|
|
212
|
+
- 规则是提示词约束,不是硬拦截;模型仍可能违反。`plain_talk_check` 只能提醒,不能阻止发送。
|
|
213
|
+
- 词表按"用户"而不是按项目隔离:在 A 项目学到的词,B 项目也视为已知。
|
|
214
|
+
- 代号识别是启发式:`M11`、`dev-1200`、`c590` 会被标记;纯英文项目名、中文术语不会被硬性要求解释。
|
|
215
|
+
- 默认开启会给每个请求多带约 590 token。
|
|
216
|
+
|
|
217
|
+
## 仓库内容
|
|
218
|
+
|
|
219
|
+
仓库只保留运行与文档文件:`dsh/`(宿主端)、`lib/`(浏览器端)、`cordis.patch.yml`、`locale/`、`icon.svg`、两份 README、`CHANGELOG.md`、`LICENSE`、`package.json`。测试脚本、基准数据、截图与本地调试文件不提交,也不进 npm 包。
|
|
220
|
+
|
|
221
|
+
## 发布到 npm
|
|
222
|
+
|
|
223
|
+
README 会直接显示在 npm 包页面,所以发布前检查这几件事:
|
|
224
|
+
|
|
225
|
+
1. `package.json` 的 `files` 只放运行必需:`dsh/`、`lib/`、`cordis.patch.yml`、`locale/`、`icon.svg`、`README*.md`、`CHANGELOG.md`、`LICENSE`。测试脚本、截图与基准数据不进包。
|
|
226
|
+
2. 图片用 raw 绝对链接(`https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/...`),否则 npm 页面不显示;不要把大图塞进 `files`。
|
|
227
|
+
3. 预构建产物随包提交(本项目的 `lib/client.js` 是手写文件),用户端不跑构建脚本。
|
|
228
|
+
4. 发布前核对包装内容与体积:
|
|
229
|
+
|
|
230
|
+
```sh
|
|
231
|
+
npm pack --dry-run
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
5. 账号开了 2FA 时,普通 token 会被 403 拒绝;需要 **Automation token** 或勾选 **Bypass 2FA** 的 Granular token:
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
npm config set //registry.npmjs.org/:_authToken=<token>
|
|
238
|
+
npm publish
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
`files` 当前打出来是 **14 个文件 / 31.0 kB**(`npm pack --dry-run`,2026-11-04);改动后重新核对,别让截图或测试数据混进去。
|
|
242
|
+
|
|
243
|
+
## 收录到 awesome-dsh-plugin
|
|
244
|
+
|
|
245
|
+
条目是一个文件:`data/plugins/<owner>__<repo>.yml`。本插件对应:
|
|
246
|
+
|
|
247
|
+
```yaml
|
|
248
|
+
# data/plugins/lizilong1993__dsh-plain-talk.yml
|
|
249
|
+
url: https://github.com/lizilong1993/dsh-plain-talk
|
|
250
|
+
name: lizilong1993/dsh-plain-talk
|
|
251
|
+
category: ui
|
|
252
|
+
description:
|
|
253
|
+
en: 'Composer toggle that shapes replies: conclusion first, inline quotes, no cross-turn references.'
|
|
254
|
+
zh: '输入框「说人话」开关:结论先行、引用原文、去掉需要翻前文的表述。'
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
前置条件(CI 与人工都会看):
|
|
258
|
+
|
|
259
|
+
- `package.json` 声明 `dsh.bundle.patch`,仓库根有 `cordis.patch.yml`(只有 `dsh.client` 不可安装)。
|
|
260
|
+
- 仓库创建满 1 天,且加了 `dsh-plugin` topic。
|
|
261
|
+
- 有真实可用代码,不是占位或纯 README。
|
|
262
|
+
- 描述只说功能、不夸大;写到的命令 / API 必须真实存在;描述含 `: ` 时整行加引号。
|
|
263
|
+
- 一个 PR 只加自己这一个文件,不手工编辑生成出来的 README,不改别人的条目。
|
|
264
|
+
- 可选:`icon`(GitHub 托管的位图,作为市场卡片)与 `tarball`(预构建包)。
|
|
265
|
+
|
|
266
|
+
本地预检(在上游 `awesome-dsh-plugin` 仓库里执行,需要 `GITHUB_TOKEN`):
|
|
267
|
+
|
|
268
|
+
```sh
|
|
269
|
+
git clone https://github.com/awesome-dsh-plugin/awesome-dsh-plugin
|
|
270
|
+
cd awesome-dsh-plugin
|
|
271
|
+
node scripts/check-submission.mjs --base origin/main
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## 许可
|
|
275
|
+
|
|
276
|
+
MIT —— 见 [LICENSE](./LICENSE)。
|