Name every guide topic when the AI guesses a wrong one, and record the exam
Gemini 3.8 Flash on the isolated test ComfyUI after read_guide: a how-to question (7 calls, 0 failed), a picks panel built from the guide's fields (14, 1: a guessed topic name), standard question 3 on scenery (18, 2). 39 calls, 8% failed, no detours (1.63's standard exam: 16%). A wrong topic now lists the topics, so no second call is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6586c3766e
commit
0f43385493
+1
-1
@@ -137,7 +137,7 @@ def read_guide(topic="", lang="en", part=1):
|
||||
"note": "read_guide(topic=...) gives one. With lang='zh' the README's parts are in Chinese, with the "
|
||||
"words the Chinese window shows: use them when you guide a user who writes Chinese."}
|
||||
if topic not in found:
|
||||
raise ToolError(f"No topic {topic!r}; read_guide() lists them.")
|
||||
raise ToolError(f"No topic {topic!r}. The topics: {', '.join(found)}.")
|
||||
parts = _parts(found[topic])
|
||||
try:
|
||||
part = min(max(int(part), 1), len(parts))
|
||||
|
||||
@@ -140,3 +140,15 @@ AMB 给 AI 软件的工具,以轻量模型(Gemini Flash)能顺畅用为准
|
||||
第一次考第 3 题乱的原因:测试用的浏览器里开着两个 ComfyUI 页面,AI 的动作被两个页面各抢一半,一个页面开了任务的标签页,另一个去跑时找不到。连做“卡片出图 → 用这张图重跑”,两个页面开着时 8 次失败 5 次,修好后 6 次全过(一个页面时也全过)。修法:任务的动作先交给上次干活的页面(`api/mcp_bridge.py`),它不在了 3 秒后别的页面接手。顺带:图里的工作流带着生成它的那个标签页的编号,打开时换一个新编号;标签页的标记在加载之前写进工作流。
|
||||
|
||||
看到但没改:Gemini 还是会空着参数先试一次工具、发带着“方案1/方案2”占位选项的 `test` 问题(现在也拦下了,不放到用户面前);第 2 题它在换模型之前先跑了一张原图。
|
||||
|
||||
## 2026-11-09 1.64 第一步:说明书按需查(read_guide)之后(Antigravity 命令行开的对话,Gemini 3.8 Flash,隔离测试环境,风景题)
|
||||
|
||||
改了什么:新工具 `read_guide`,按主题给 AMB 自己的说明书(README 里 `<!-- guide:名字 -->` 标出来的各节,中英两种;模型检查的完整规则;展示面板每种块的写法)。展示面板的工具说明只列块的名字,写法挪进说明书;`download_status` 并进了 `run_status(downloads=true)`。工具清单从 43,957 字减到 42,574 字,还是 53 个工具。
|
||||
|
||||
| 题 | 调用 | 失败 | 结果 |
|
||||
|---|---|---|---|
|
||||
| 新题:“我是新手,AMB 里的「画布存档」是怎么用的?一步一步教我,用界面上的字” | 7 | 0 | 先查目录,再查“存档”一节(中文),照界面上的字讲了存、锁种跑、点 1/2/3 回去、存档页、收藏为工作流 |
|
||||
| 新题:“在图库里找三张山湖风景图,做一个面板让我挑一张,告诉我那张的种子” | 14 | 1 | 查了 `panel` 一节,第一次就做出合格的挑图面板;种子答对。唯一的失败是猜了一个不存在的主题名 `answers` |
|
||||
| 3 问你再改(风景版:图库里最新那张山湖图) | 18 | 2 | 想了两个改法用 `ask_user` 问,照选的(第二个)改提示词出图。失败:先在空画布上跑(提示后改用 `open_workflow` 打开那张图),一次 `set_values` 漏了参数 |
|
||||
|
||||
合计 39 次调用,失败 8%,绕路 0(1.63 标准考试是 16%)。看到后改了:主题名猜错时,回答里直接列出全部主题名,不用再查一次目录。
|
||||
|
||||
@@ -53,8 +53,8 @@ class GuideTests(unittest.TestCase):
|
||||
self.assertIn("重置悬浮入口位置", mcp_guide.read_guide("install", "zh")["text"], "the words the Chinese window shows")
|
||||
self.assertEqual(mcp_guide.read_guide("saves", "zh-CN")["topic"], "saves")
|
||||
self.assertEqual(mcp_guide.read_guide("model_check_rules", part=99)["part"], mcp_guide.read_guide("model_check_rules")["parts"])
|
||||
with self.assertRaisesRegex(ToolError, "read_guide\\(\\) lists them"):
|
||||
mcp_guide.read_guide("nothing")
|
||||
with self.assertRaisesRegex(ToolError, "The topics: idea, .*, panel\\."): # no second call to find the name
|
||||
mcp_guide.read_guide("answers")
|
||||
|
||||
def test_show_panel_names_the_blocks_and_the_guide_gives_their_fields(self):
|
||||
tools = {tool["name"]: tool for tool in mcp_server._tool_list(True)["tools"]}
|
||||
|
||||
Reference in New Issue
Block a user