推理搜索因为key error而停止
还没有人认领这个 Issue。
评估
调研方向
通过 agent/graph.py 中的图执行路径重现该示例,尤其检查第 220 行附近的 node(),并检查 agent/streaming.py 中的调用方。比较 add_node 创建的名称与传递给 node() 的名称;明确大小写或拼写不匹配时的预期行为,然后在该行为达成一致后添加回归测试。
由索引模型根据 Issue 内容生成。
描述
这是mindsearch的思考:为了构建关于Gay-Lussac的搜索图,我们需要首先添加一个根节点来表示这个问题。然后,我们可以添加子节点来探索Gay-Lussac的生平、成就以及他在科学领域的具体贡献。
from ilagent.agents.python_web import WebSearchGraph
graph = WebSearchGraph()
graph.add_root_node(node_content="gay lussac", node_name="root")
# 添加关于Gay-Lussac生平的节点
graph.add_node(
node_name="gay_lussac_biography",
node_content="Gay-Lussac的生平是什么?")
graph.add_edge(start_node="root", end_node="gay_lussac_biography")
# 添加关于Gay-Lussac科学成就的节点
graph.add_node(
node_name="gay_lussac_achievements",
node_content="Gay-Lussac有哪些科学成就?")
graph.add_edge(start_node="root", end_node="gay_lussac_achievements")
# 添加关于Gay-Lussach在气体定律方面的贡献的节点
graph.add_node(
node_name="gay_lussacs_gas_law_contributions",
node_content="G Cay Lusssacs对气体定律有哪些贡献?")
graph.add_edge(start_node="root", end_node='g Cay Lusssacs对气体定律有哪些贡献')
# 获取这些节点的信息以进行进一步查询
biography_info = graph.node("gAY_LUSSAC_BIOGRAPHY")
achievements_info = graph.node("GAy_LUSSAC_ACHIEVEMENTS")
gaslaw_contributions_info = graph.node('GAy_LUSSSAC對氣體定律有什麼貢獻')
biography_info, achievements_info, gaslaw_contributions_info
这是后端返回的错误:INFO: 127.0.0.1:40602 - "POST /solve HTTP/1.1" 200 OK
ERROR:root:Exception in sync_generator_wrapper: 'gAY_LUSSAC_BIOGRAPHY'
Traceback (most recent call last):
File "/www/wwwroot/xxx/search/mindsearch/app.py", line 90, in sync_generator_wrapper
for response in agent(inputs, session_id=session_id):
File "/www/wwwroot/xxx/search/mindsearch/agent/streaming.py", line 19, in call
for response_message in self.forward(*message, session_id=session_id, **kwargs):
File "/www/wwwroot/xxx/search/mindsearch/agent/mindsearch_agent.py", line 105, in forward
for graph_exec in gen:
File "/home/user/.local/lib/python3.12/site-packages/lagent/utils/util.py", line 138, in iter
self.ret = yield from self.generator
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/www/wwwroot/xxx/search/mindsearch/agent/graph.py", line 263, in run
exec(command, global_dict, local_dict)
File "", line 25, in
File "/www/wwwroot/xxx/search/mindsearch/agent/graph.py", line 220, in node
return self.nodes[node_name].copy()
~~~~~~~~~~^^^^^^^^^^^
KeyError: 'gAY_LUSSAC_BIOGRAPHY' 这看起来是internlm 2.5 7b 能力不行 在选择节点时出现文字大小写不一的问题 有时甚至单词都换了 导致key error
- 主要语言
- JavaScript
- 星标
- 7k
- 派生
- 684
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
InternLM/MindSearch 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 55/100
InternLM/MindSearch#326 ·
-
难度 5/5 一周以上 新手友好度 25/100
InternLM/MindSearch#315 ·
-
难度 4/5 3-5 天 新手友好度 25/100
InternLM/MindSearch#312 ·
-
难度 4/5 3-5 天 新手友好度 25/100
InternLM/MindSearch#311 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
InternLM/MindSearch#310 ·
查看 InternLM/MindSearch 的全部 Issue
相似的 Issue
-
area/frontend good first issue topic/intents
难度 2/5 1-3 小时 新手友好度 84/100
aws-samples/sample-collaborative-ai-dlc#1049 ·
维护者通常 1 天内回复
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:oci/devguard-documen...ch=amd64&tag=main-amd64 risk:low state:open
难度 2/5 1-3 小时 新手友好度 69/100
l3montree-dev/devguard-documentation#396 · 1 条评论 ·
-
enhancement status/needs-triage
难度 2/5 1-3 小时 新手友好度 66/100
WhiteBr1ck/agy-powertools#361 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
avniproject/avni-webapp#1861 ·
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
avniproject/avni-client#2268 ·