feat(search): append raw entity fields after view_node summary
view_node 按题两轮摘要(summarize_node)会吞掉 entities/visible_text 字段信号,Agent 站在证据节点上仍漏读实体(benchmark 错题 M1,案例 786-2、872-3、750-1)。dispatcher 侧在摘要后确定性追加 [实体]/[画面 文字] 原文区块,LLM 无法吞掉。 - TreeEnvironment.node_entity_fields:按层级取 card 实体字段原文, 去空白、去重、分号拼接;空字段省键;未知节点抛 KeyError - _handle_view_node Phase 2.5:摘要后、子节点概览前追加实体区块 - 附带 ruff format 修正 test_tree_environment.py 两处既有格式 算法 #11(树环境语义搜索)数据访问层扩展,不改搜索算法本身。
This commit is contained in:
@@ -201,6 +201,10 @@ class SearchToolDispatcher:
|
||||
summary,
|
||||
]
|
||||
|
||||
# Phase 2.5: 确定性追加实体/画面文字原文(防按题摘要吞噬,Spec-1 B)
|
||||
for label, text in self._env.node_entity_fields(node_id).items():
|
||||
parts.append(f"[{label}] {text}")
|
||||
|
||||
# Phase 3: 子节点概览
|
||||
children_info = self._env.get_children_info(node_id)
|
||||
if children_info:
|
||||
|
||||
Reference in New Issue
Block a user