Skip to content

Commit a65d18b

Browse files
committed
docs: cover the judged verification, recall filter and steering actions
- list the two thresholds the judgement points gained (``HARNESS_VERIFIER_SUPPORT_THRESHOLD``, ``MEMORY_RECALL_RELEVANCE_THRESHOLD``) and say that a threshold compares a rating where the point rates instead of asking - document ``HARNESS_VERIFIER_STRATEGY`` next to the other strategies, and the actions the long-run and verification judgements pick - complete the Harness environment table, which was missing the thresholds the previous judgement commit added - document the recall filter in the long-term memory guide Change-Id: I7c94a9c0c458ccc14133fc29e3369960a7a9d119
1 parent e2da8d1 commit a65d18b

10 files changed

Lines changed: 78 additions & 12 deletions

File tree

‎docs/content/docs/framework/memory/long-term/index.en.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ ltm = LongTermMemory(backend="viking", app_name="ltm_demo")
3131
| `index` | `str` | `""` | Index/collection name for storing memories. Falls back to `app_name`, then `default_app`. |
3232
| `app_name` | `str` | `""` | The owning application name; used for data isolation and as the `index` fallback. |
3333
| `user_id` | `str` | `""` | **Deprecated**, kept only for backward compatibility. |
34+
| `recall_strategy` | `str` | `"off"` | Recall judgement: with `decision`, the decision model drops memories unrelated to the request. |
35+
| `recall_relevance_threshold` | `float` | `0.5` | Recall relevance threshold: memories judged below it are not returned. |
3436

3537
<Callout type="info">
3638
Vector backends (`local`, `opensearch`, `redis`) embed memories, which requires `pip install "veadk-python[extensions]"` and an embedding model (env prefix `MODEL_EMBEDDING_`, falling back to `MODEL_AGENT_API_KEY`). `viking`, `mem0`, `openviking`, and `tos_context` are managed services and need no local embedding.
@@ -183,6 +185,7 @@ The default is `MEMORY_SAVE_STRATEGY=threshold`, the two thresholds above. With
183185
| Unavailable | Falls back to `MIN_MESSAGES_THRESHOLD` / `MIN_TIME_THRESHOLD` |
184186

185187
A skipped turn does not advance the save cursor, so the next accepted judgement writes those events together: nothing is lost. See the [environment variable reference](/references/configuration/environment-variables) for the decision model variables.
188+
Recall can be judged the same way: with `MEMORY_RECALL_STRATEGY=decision`, `search_memory` rates every returned memory (irrelevant / related but useless / useful background / required) and drops the ones below `MEMORY_RECALL_RELEVANCE_THRESHOLD` (default `0.5`). One judgement covers at most 20 memories, anything beyond that is returned in backend order, and an unavailable judgement keeps every match.
186189
## Auto-save Memory Policy
187190
Configure `auto_save_memory_policy` on `Agent` to decide which events are persisted by automatic long-term-memory saving. If omitted, it is equivalent to `"default"`.
188191
```python

‎docs/content/docs/framework/memory/long-term/index.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ ltm = LongTermMemory(backend="viking", app_name="ltm_demo")
3131
| `index` | `str` | `""` | 存储记忆所用的索引/集合名。为空时回退到 `app_name`,再为空则用 `default_app`。 |
3232
| `app_name` | `str` | `""` | 拥有该记忆的应用名,常用作数据隔离与 `index` 的回退值。 |
3333
| `user_id` | `str` | `""` | **已废弃**,仅为向后兼容保留。 |
34+
| `recall_strategy` | `str` | `"off"` | 召回判定策略;`decision` 时由判定模型过滤与本次请求无关的记忆。 |
35+
| `recall_relevance_threshold` | `float` | `0.5` | 召回相关度阈值;判定低于该值的记忆不返回。 |
3436

3537
<Callout type="info">
3638
向量类后端(`local`、`opensearch`、`redis`)会对记忆做向量化(embedding),需要安装扩展依赖:`pip install "veadk-python[extensions]"`,并配置 embedding 模型(环境变量前缀 `MODEL_EMBEDDING_`,缺省时复用 `MODEL_AGENT_API_KEY`)。`viking`、`mem0`、`openviking` 与 `tos_context` 是托管服务,无需本地 embedding。
@@ -183,6 +185,7 @@ agent = Agent(
183185
| 判定不可用 | 回落到 `MIN_MESSAGES_THRESHOLD` / `MIN_TIME_THRESHOLD` |
184186

185187
被跳过的轮次不会推进保存游标,后续判定通过时会把这批 event 一起写入,因此不会丢数据。判定模型的环境变量见 [环境变量参考](/references/configuration/environment-variables)。
188+
检索侧同样可以交给判定模型:`MEMORY_RECALL_STRATEGY=decision` 时,`search_memory` 返回前会逐条给召回片段打相关度(不相关 / 同主题但用不上 / 有用背景 / 必须遵守),低于 `MEMORY_RECALL_RELEVANCE_THRESHOLD`(默认 `0.5`)的会被丢弃;一次判定最多覆盖 20 条,超出的按后端顺序原样保留,判定不可用时保留全部结果。
186189
## 自动保存记忆策略
187190
开发者在 `Agent` 上配置 `auto_save_memory_policy` 来控制自动保存长期记忆时哪些 event 会被写入;不配置时等价于 `"default"`。
188191
```python

‎docs/content/docs/references/configuration/environment-variables.en.mdx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ Prefix `HARNESS_`, used to attach optional Harness plugins to HarnessApp Runtime
7979
| `HARNESS_COMPACTION_STRATEGY` | Compaction candidate strategy, `builtin` or `decision`; default `builtin`. |
8080
| `HARNESS_LONG_RUN_STRATEGY` | Long-run steering strategy, `counter` or `decision`; default `counter`. |
8181
| `HARNESS_MODE_STRATEGY` | Context mode-block strategy, `keywords` or `decision`; default `keywords`. |
82+
| `HARNESS_VERIFIER_STRATEGY` | Final-answer verification, `deterministic` or `decision`; default `deterministic`. |
83+
| `HARNESS_COMPACTION_KEEP_THRESHOLD` | Compaction candidates: a candidate is kept when the judged probability is at or above this value; default `0.5`. |
84+
| `HARNESS_LONG_RUN_READY_THRESHOLD` | Long-run steering: guidance is injected when the judged probability of being ready is at or above this value; default `0.5`. |
85+
| `HARNESS_MODE_DECISION_THRESHOLD` | Context mode blocks: a block is injected when the judged probability is at or above this value; default `0.5`. |
86+
| `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | Final-answer support: the answer fails when the judged support is below this value; default `0.5`. |
8287

8388
The `harness_enhance` block maps to these environment variables when deploying a HarnessApp Runtime. Prefer `harness.yaml` or `veadk agentkit invoke` flags for normal developer workflows; use environment variables for platform integration and container runtimes.
8489

‎docs/content/docs/references/configuration/environment-variables.mdx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ volcengine:
7979
| `HARNESS_COMPACTION_STRATEGY` | 工具结果压缩候选策略,`builtin` 或 `decision`,默认 `builtin`。 |
8080
| `HARNESS_LONG_RUN_STRATEGY` | 长任务收尾引导策略,`counter` 或 `decision`,默认 `counter`。 |
8181
| `HARNESS_MODE_STRATEGY` | 上下文模式块策略,`keywords` 或 `decision`,默认 `keywords`。 |
82+
| `HARNESS_VERIFIER_STRATEGY` | 最终回答校验策略,`deterministic` 或 `decision`,默认 `deterministic`。 |
83+
| `HARNESS_COMPACTION_KEEP_THRESHOLD` | 压缩候选保留阈值,默认 `0.5`;判定保留概率低于该值即压缩。 |
84+
| `HARNESS_LONG_RUN_READY_THRESHOLD` | 长任务收尾阈值,默认 `0.5`;判定可收尾概率高于该值即注入引导。 |
85+
| `HARNESS_MODE_DECISION_THRESHOLD` | 上下文模式块阈值,默认 `0.5`;判定概率高于该值即注入对应模式块。 |
86+
| `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | 最终回答支撑度阈值,默认 `0.5`;判定支撑度低于该值即判为失败。 |
8287

8388
`harness_enhance` 配置块会在 HarnessApp Runtime 部署时映射为这些环境变量。推荐开发者优先通过 `harness.yaml` 或 `veadk agentkit invoke` 参数启用,环境变量适合平台集成和镜像运行时。
8489

‎docs/extensions/harness/README.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ veadk agentkit invoke \
211211
| `HARNESS_MAX_CONTEXT_CHARS` | `24000` | Context compaction threshold. |
212212
| `HARNESS_MAX_TOOL_RESULT_CHARS` | `4000` | Tool-result compaction threshold. |
213213
| `HARNESS_VERIFIER_MODE` | `observe` | Verification behavior: `observe` or `block`. |
214+
| `HARNESS_VERIFIER_STRATEGY` | `deterministic` | Final-answer verification: `deterministic` or `decision`. |
215+
| `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | `0.5` | Support rating below which the answer fails. |
214216
| `HARNESS_STORE_PATH` | unset | Uses a JSONL event store when set. |
215217
| `HARNESS_COMPACTION_STRATEGY` | `builtin` | Compaction candidates: `builtin` or `decision`. |
216218
| `HARNESS_LONG_RUN_STRATEGY` | `counter` | Long-run steering: `counter` or `decision`. |
@@ -221,7 +223,7 @@ veadk agentkit invoke \
221223

222224
## Decision Model Strategies
223225

224-
The three `*_STRATEGY=decision` settings replace a rule with a judgement from
226+
The four `*_STRATEGY=decision` settings replace a rule with a judgement from
225227
the configured decision model. They need `DECISION_MODEL_ENABLED=true` and an
226228
API key; without one, each strategy keeps its rule and logs a warning.
227229

@@ -230,6 +232,7 @@ API key; without one, each strategy keeps its rule and logs a warning.
230232
| `HARNESS_COMPACTION_STRATEGY` | Role and size based compaction candidates | Builtin rules |
231233
| `HARNESS_LONG_RUN_STRATEGY` | Model-call counter | Counter, forced after the unconditional count |
232234
| `HARNESS_MODE_STRATEGY` | Precision and artifact keyword markers | Keyword markers |
235+
| `HARNESS_VERIFIER_STRATEGY` | Completion markers plus a successful-receipt check | Builtin rules |
233236

234237
### Judgement Thresholds
235238

@@ -244,6 +247,13 @@ back to `0.5` for an unusable one.
244247
| `HARNESS_COMPACTION_KEEP_THRESHOLD` | `0.5` | Keeps more tool output verbatim |
245248
| `HARNESS_LONG_RUN_READY_THRESHOLD` | `0.5` | Steers a run toward its answer sooner |
246249
| `HARNESS_MODE_DECISION_THRESHOLD` | `0.5` | Injects the mode block more often |
250+
| `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | `0.5` | Requires more evidence before the answer passes |
251+
252+
A judgement also picks an action: long-run steering chooses `narrow_scope` /
253+
`nudge_to_finish` / `force_finish` to shape the injected guidance, and
254+
verification chooses `retry_tool_call` / `soften_claim` / `drop_claim` /
255+
`ask_user` to shape the repair instruction. An unusable action keeps the
256+
default wording while the rating still applies.
247257

248258
## Compaction Providers
249259

‎docs/extensions/harness/README.zh.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ veadk agentkit invoke \
203203
| `HARNESS_MAX_CONTEXT_CHARS` | `24000` | 上下文压缩阈值。 |
204204
| `HARNESS_MAX_TOOL_RESULT_CHARS` | `4000` | 工具结果压缩阈值。 |
205205
| `HARNESS_VERIFIER_MODE` | `observe` | 校验行为,支持 `observe` 或 `block`。 |
206+
| `HARNESS_VERIFIER_STRATEGY` | `deterministic` | 最终回答校验策略:`deterministic` 或 `decision`。 |
207+
| `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | `0.5` | 最终回答支撑度阈值;判定低于该值即判为失败。 |
206208
| `HARNESS_STORE_PATH` | 未设置 | 设置后使用 JSONL event store。 |
207209
| `HARNESS_COMPACTION_STRATEGY` | `builtin` | 压缩候选策略:`builtin` 或 `decision`。 |
208210
| `HARNESS_LONG_RUN_STRATEGY` | `counter` | 长任务引导策略:`counter` 或 `decision`。 |
@@ -213,13 +215,14 @@ veadk agentkit invoke \
213215

214216
## 判定模型策略
215217

216-
三个 `*_STRATEGY=decision` 开关把一条规则换成判定模型的判定结果,需要 `DECISION_MODEL_ENABLED=true` 与 API Key;没有配置时各自保留原规则并打印告警。
218+
四个 `*_STRATEGY=decision` 开关把一条规则换成判定模型的判定结果,需要 `DECISION_MODEL_ENABLED=true` 与 API Key;没有配置时各自保留原规则并打印告警。
217219

218220
| 策略 | 被替代的规则 | 判定不可用时 |
219221
| --- | --- | --- |
220222
| `HARNESS_COMPACTION_STRATEGY` | 按角色和长度挑选压缩候选 | 内置规则 |
221223
| `HARNESS_LONG_RUN_STRATEGY` | 仅按模型调用次数计数 | 计数规则,超过强制次数后必定生效 |
222224
| `HARNESS_MODE_STRATEGY` | 精度/产物关键词匹配 | 关键词匹配 |
225+
| `HARNESS_VERIFIER_STRATEGY` | 完成类关键词加「有无成功回执」 | 内置规则 |
223226

224227
### 判定阈值
225228

@@ -230,6 +233,9 @@ veadk agentkit invoke \
230233
| `HARNESS_COMPACTION_KEEP_THRESHOLD` | `0.5` | 更多工具结果原样保留 |
231234
| `HARNESS_LONG_RUN_READY_THRESHOLD` | `0.5` | 更早把运行推向收尾 |
232235
| `HARNESS_MODE_DECISION_THRESHOLD` | `0.5` | 更频繁注入模式块 |
236+
| `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | `0.5` | 要求更充分的证据才放行回答 |
237+
238+
判定还会选动作:长任务引导可选 `narrow_scope` / `nudge_to_finish` / `force_finish` 决定注入的引导文案,最终回答校验可选 `retry_tool_call` / `soften_claim` / `drop_claim` / `ask_user` 决定修复指引;动作不可用时保留默认文案,评级仍然生效。
233239

234240
## 压缩 Provider
235241

‎veadk/extensions/decisions/README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,18 @@ The judged state and the API key are never logged.
138138

139139
## Judgement Thresholds
140140

141-
Every decision point keeps its own threshold, compared against the probability
142-
of "yes" in `[0, 1]`:
141+
Every decision point keeps its own threshold, compared against the answer of
142+
its own judgement on `[0, 1]` — the probability of "yes" for a yes/no question,
143+
the rated position for a rating:
143144

144145
| Decision point | Setting | Default |
145146
| --- | --- | --- |
146147
| Compaction candidates | `HARNESS_COMPACTION_KEEP_THRESHOLD` | 0.5 |
147148
| Long-run steering | `HARNESS_LONG_RUN_READY_THRESHOLD` | 0.5 |
148149
| Context mode blocks | `HARNESS_MODE_DECISION_THRESHOLD` | 0.5 |
149150
| Long-term memory saves | `MEMORY_SAVE_WORTH_THRESHOLD` | 0.5 |
151+
| Final-answer support | `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | 0.5 |
152+
| Long-term memory recall | `MEMORY_RECALL_RELEVANCE_THRESHOLD` | 0.5 |
150153

151154
Parsing goes through `probability_threshold()`, which **clamps** an
152155
out-of-range value instead of falling back (`1.5 → 1.0`, `-1 → 0.0`, keeping

‎veadk/extensions/decisions/README.zh.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,17 @@ agent = Agent(name="router", tools=[decision_evaluate])
127127

128128
## 判定阈值
129129

130-
每个判定点各自持有阈值,比较的都是「是」的概率在 `[0, 1]` 上的取值:
130+
每个判定点各自持有阈值,比较的都是各自判定结果在 `[0, 1]` 上的取值(是否类问题是
131+
「是」的概率,评分类问题是加权位置):
131132

132133
| 判定点 | 阈值 | 默认 |
133134
| --- | --- | --- |
134135
| 压缩候选 | `HARNESS_COMPACTION_KEEP_THRESHOLD` | 0.5 |
135136
| 长任务引导 | `HARNESS_LONG_RUN_READY_THRESHOLD` | 0.5 |
136137
| 上下文模式块 | `HARNESS_MODE_DECISION_THRESHOLD` | 0.5 |
137138
| 记忆落库 | `MEMORY_SAVE_WORTH_THRESHOLD` | 0.5 |
139+
| 最终回答支撑度 | `HARNESS_VERIFIER_SUPPORT_THRESHOLD` | 0.5 |
140+
| 长期记忆召回 | `MEMORY_RECALL_RELEVANCE_THRESHOLD` | 0.5 |
138141

139142
解析统一走 `probability_threshold()`:越界的值**夹紧**而不是回落(`1.5 → 1.0`、
140143
`-1 → 0.0`,保留「永不生效 / 总是生效」的原意,回落会把行为整个翻转);`NaN`

‎veadk/extensions/harness/README.md‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,32 @@ each one keeps its rule and logs a warning.
104104
| Compaction candidates | `HARNESS_COMPACTION_STRATEGY=decision` | Role and size based candidate selection | Builtin rules |
105105
| Long-run steering | `HARNESS_LONG_RUN_STRATEGY=decision` | Model-call counter | Counter, and always after `unconditional_after_model_calls` |
106106
| Context mode blocks | `HARNESS_MODE_STRATEGY=decision` | Precision and artifact keyword markers | Keyword markers |
107+
| Final-answer support | `HARNESS_VERIFIER_STRATEGY=decision` | Completion markers plus a successful-receipt check | Builtin rules |
107108

108109
Every judgement asks for the probability of "yes" in `[0, 1]`, and each point
109110
keeps its own threshold: raising one point's bar does not raise the others',
110-
because the same probability costs each point a different thing. Each setting
111-
accepts a `HARNESS_ENHANCE_`-prefixed alias, clamps out-of-range values, and
112-
falls back to `0.5` for an unusable one.
111+
because the same answer costs each point a different thing. Two points rate
112+
instead of asking yes/no, and their thresholds compare that rating. Each
113+
setting accepts a `HARNESS_ENHANCE_`-prefixed alias, clamps out-of-range
114+
values, and falls back to `0.5` for an unusable one.
113115

114116
| Threshold | Setting | What a high value means |
115117
| --- | --- | --- |
116118
| Compaction candidates | `HARNESS_COMPACTION_KEEP_THRESHOLD=0.5` | Keeps more tool output verbatim |
117119
| Long-run steering | `HARNESS_LONG_RUN_READY_THRESHOLD=0.5` | Steers a run toward its answer sooner |
118120
| Context mode blocks | `HARNESS_MODE_DECISION_THRESHOLD=0.5` | Injects the mode block more often |
121+
| Final-answer support | `HARNESS_VERIFIER_SUPPORT_THRESHOLD=0.5` | Requires more evidence before the answer passes |
122+
123+
Two strategies also choose an action instead of only crossing a threshold, and
124+
the action shapes what the plugin injects:
125+
126+
| Strategy | Action it picks | Effect |
127+
| --- | --- | --- |
128+
| Long-run steering | `narrow_scope` / `nudge_to_finish` / `force_finish` | Replaces the injected guidance with the one that fits the trajectory |
129+
| Final-answer support | `retry_tool_call` / `soften_claim` / `drop_claim` / `ask_user` | Fills the repair instruction the caller hands back to the model |
130+
131+
An action that names no known option keeps the default wording; the rating it
132+
came with is still used.
119133

120134
They need a configured decision model; see
121135
[decisions](../decisions/README.md) for the `DECISION_MODEL_*` variables. A
@@ -125,7 +139,8 @@ Assembling plugins in code selects the same strategies as arguments instead of
125139
environment variables: `compaction_config=ToolResultCompactorConfig(strategy="decision")`,
126140
`context_config=HarnessInvocationContextConfig(mode_strategy="decision")`, and
127141
`long_run_strategy="decision"` / `long_run_ready_threshold=0.5` on
128-
`HarnessExtension`. Passing an `env` mapping instead makes the environment
142+
`HarnessExtension`, plus `verifier_config=FinalResponseVerifierConfig(strategy="decision", support_threshold=0.5)`.
143+
Passing an `env` mapping instead makes the environment
129144
variables the only source, as `HarnessExtension.from_env()` does.
130145

131146
## Direct Module Usage

‎veadk/extensions/harness/README.zh.md‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,36 @@ harness_enhance:
9999
| 压缩候选 | `HARNESS_COMPACTION_STRATEGY=decision` | 按角色和长度挑选压缩候选 | 内置规则 |
100100
| 长任务引导 | `HARNESS_LONG_RUN_STRATEGY=decision` | 仅按模型调用次数计数 | 计数规则,并在 `unconditional_after_model_calls` 后强制生效 |
101101
| 上下文模式块 | `HARNESS_MODE_STRATEGY=decision` | 精度/产物关键词匹配 | 关键词匹配 |
102+
| 最终回答校验 | `HARNESS_VERIFIER_STRATEGY=decision` | 完成类关键词加「有无成功回执」 | 内置规则 |
102103

103104
判定返回的是「是」在 `[0, 1]` 上的概率,每个点各自持有阈值:同一个概率落在不同点上
104-
代价不同,所以调高一个点的门槛不会抬高其它点。三个设置都接受 `HARNESS_ENHANCE_`
105-
前缀的别名,越界的值会被夹紧,不可用的值回落到 `0.5`。
105+
代价不同,所以调高一个点的门槛不会抬高其它点。两个点返回的是评级而不是是否,阈值
106+
比较的就是该评级。每个设置都接受 `HARNESS_ENHANCE_` 前缀的别名,越界的值会被夹紧,
107+
不可用的值回落到 `0.5`。
106108

107109
| 阈值 | 开关 | 值调高意味着 |
108110
| --- | --- | --- |
109111
| 压缩候选 | `HARNESS_COMPACTION_KEEP_THRESHOLD=0.5` | 更多工具结果原样保留 |
110112
| 长任务引导 | `HARNESS_LONG_RUN_READY_THRESHOLD=0.5` | 更早把运行推向收尾 |
111113
| 上下文模式块 | `HARNESS_MODE_DECISION_THRESHOLD=0.5` | 更频繁注入模式块 |
114+
| 最终回答校验 | `HARNESS_VERIFIER_SUPPORT_THRESHOLD=0.5` | 要求更充分的证据才放行回答 |
115+
116+
两个策略除了过阈值还会选动作,动作决定注入内容:
117+
118+
| 策略 | 可选动作 | 影响 |
119+
| --- | --- | --- |
120+
| 长任务引导 | `narrow_scope` / `nudge_to_finish` / `force_finish` | 用贴合当前轨迹的引导替换固定文案 |
121+
| 最终回答校验 | `retry_tool_call` / `soften_claim` / `drop_claim` / `ask_user` | 组装交回主模型的修复指引 |
122+
123+
判定返回未知动作时保留默认文案,同一次判定里的评级仍然生效。
112124

113125
策略依赖已配置的判定模型,环境变量见 [decisions](../decisions/README.zh.md)。判定失败会回落到上表规则,不会让运行失败。
114126

115127
用代码装配插件时,同样的选择通过参数传入,而不是环境变量:
116128
`compaction_config=ToolResultCompactorConfig(strategy="decision")`、
117129
`context_config=HarnessInvocationContextConfig(mode_strategy="decision")`、
118-
`HarnessExtension(long_run_strategy="decision", long_run_ready_threshold=0.5)`。
130+
`HarnessExtension(long_run_strategy="decision", long_run_ready_threshold=0.5)`、
131+
`verifier_config=FinalResponseVerifierConfig(strategy="decision", support_threshold=0.5)`。
119132
一旦传入 `env` 映射,就以环境变量为唯一来源(`HarnessExtension.from_env()` 即这种形态)。
120133

121134
## 直接使用模块

0 commit comments

Comments
 (0)