Merge pull request 'Log R4 reminder injection for observable evidence' (#134) from feature/r4-injection-log into main
ci / vet-and-test (push) Successful in 55s
ci / vet-and-test (push) Successful in 55s
This commit was merged in pull request #134.
This commit is contained in:
@@ -3,6 +3,7 @@ package runtime
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -343,9 +344,11 @@ func (st *directRun) escalationReminders() []string {
|
||||
}
|
||||
st.toolMu.Unlock()
|
||||
if fails >= escalationFailureThreshold && !failNoted {
|
||||
out = append(out, fmt.Sprintf("工具最近集中失败(近 %d 次调用中多次报错):停止原样重试。逐条重读最近一次错误信息,改参数、换工具或换路径再试;确认无法绕过时,如实在答复里说明卡点与已尝试的手段,不要编造结果。", fails))
|
||||
log.Printf("[runtime] r4 escalation reminder injected (tool failures %d in last %d outcomes)", fails, escalationWindow)
|
||||
out = append(out, fmt.Sprintf("工具最近集中失败(近 %d 次调用中多次报错):停止原样重试。逐条重读错误信息,改参数、换工具或换路径再试;确认无法绕过时,如实在答复里说明卡点与已尝试的手段,不要编造结果。", fails))
|
||||
}
|
||||
if zero >= escalationZeroHitThreshold && !zeroNoted {
|
||||
log.Printf("[runtime] r4 escalation reminder injected (zero-hit searches %d)", zero)
|
||||
out = append(out, "检索已连续多次无结果:换关键词/换检索维度再试一次;仍无结果就如实写「材料中无此信息」,不要凭印象补数字。")
|
||||
}
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user