agent_bad_case_signal_mapper¶
Attach structured bad-case signals and a conservative tier to each sample.
Design goal: precision over recall for the high_precision tier.
Upstream coverage (when present in the pipeline):
meta:tool_*,usagetokens,primary_tool_type,dominant_tool_types,dialog_intent_labels,dialog_topic_labels,dialog_sentiment_labels,agent_turn_count, lineage keys.stats:llm_analysis_*,llm_quality_*,llm_difficulty_*,text_len,num_words,perplexity,lang_score.meta: optionaldialog_*/agent_trace_coherence/agent_tool_relevancerecords (1–5 scores from lightweight LLM mappers).
Each signal group can be toggled via constructor flags. high weight feeds
high_precision tier (with config); medium feeds watchlist only.
Tool-heavy agent runs: use min_tool_fail_count_for_signal to avoid
treating a single exploratory tool error (common before recovery) as strong
bad-case evidence.
P-percentile calibration (optional): set auto_calibrate_thresholds and
calibration_json_path to a JSON file produced by
demos/agent/scripts/compute_percentile_thresholds.py --write-calibration.
Per-sample thresholds merge default with by_request_model using
meta.agent_request_model. When calibration_manual_overrides_auto is
true (default), explicit max_total_tokens / max_latency_ms / perplexity
settings in YAML override the file; set it false to prefer calibration.
为每个样本附加结构化的 bad-case 信号 和保守的 层级。
设计目标:对于 high_precision 层级,精确率优先于召回率。
上游覆盖范围(当存在于 pipeline 中时):
meta:tool_*、usagetoken、primary_tool_type、dominant_tool_types、dialog_intent_labels、dialog_topic_labels、dialog_sentiment_labels、agent_turn_count、lineage keys。stats:llm_analysis_*、llm_quality_*、llm_difficulty_*、text_len、num_words、perplexity、lang_score。meta:可选的dialog_*/agent_trace_coherence/agent_tool_relevance记录(来自轻量级 LLM mapper 的 1-5 分评分)。
每个信号组均可通过构造函数 flag 进行切换。high 权重馈入
high_precision 层级(通过 config 配置);medium 仅馈入 watchlist。
工具密集型 agent 运行: 使用 min_tool_fail_count_for_signal 以避免
将单次探索性工具错误(在恢复前很常见)视为强烈的
bad-case 证据。
P 百分位数校准(可选):将 auto_calibrate_thresholds 和
calibration_json_path 设置为由
demos/agent/scripts/compute_percentile_thresholds.py --write-calibration 生成的 JSON 文件。
逐样本阈值使用 meta.agent_request_model 将 default 与 by_request_model 合并。
当 calibration_manual_overrides_auto 为 true(默认值)时,YAML 中显式的 max_total_tokens / max_latency_ms / perplexity
设置将覆盖该文件;将其设为 false 则优先使用校准值。
Type 算子类型: mapper
Tags 标签: cpu
🔧 Parameter Configuration 参数配置¶
name 参数名 |
type 类型 |
default 默认值 |
desc 说明 |
|---|---|---|---|
|
str |
|
|
|
str |
|
|
|
bool |
|
|
|
int |
|
|
|
bool |
|
|
|
float |
|
|
|
int |
|
|
|
bool |
|
|
|
int |
|
|
|
int |
|
|
|
Optional[int] |
|
|
|
Optional[int] |
|
|
|
Optional[str] |
|
|
|
bool |
|
|
|
bool |
|
|
|
bool |
|
|
|
bool |
|
|
|
float |
|
|
|
bool |
|
|
|
float |
|
|
|
bool |
|
|
|
float |
|
|
|
bool |
|
|
|
float |
|
|
|
bool |
|
|
|
Optional[List[str]] |
|
|
|
bool |
|
|
|
float |
|
|
|
bool |
|
|
|
float |
|
|
|
float |
|
|
|
bool |
|
|
|
int |
|
|
|
bool |
|
|
|
float |
|
|
|
int |
|
|
|
`` |