[{"data":1,"prerenderedAt":1125},["ShallowReactive",2],{"blog-post-/blogs/agentscope-doc-helper-zero-llm":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"image":11,"alt":12,"ogImage":11,"tags":13,"published":18,"body":19,"_type":1118,"_id":1119,"_source":1120,"_file":1121,"_stem":1122,"_extension":1123,"sitemap":1124},"/blogs/agentscope-doc-helper-zero-llm","blogs",false,"","RAG 不如查字典：我为 AgentScope 2.0 造了一个「零大模型」专家工具","AgentScope 2.0 发布后，我犯了一个典型的 AI 时代工程师通病——想用 RAG+大模型做知识库。一句反问点醒了我：查个 API 签名，值得每次调大模型吗？","2026-05-28","/blogs-img/agentscope-2-production.jpg","AI Agent 生产环境部署手帐插画",[14,15,16,17],"AI Agent","AgentScope","RAG","Python",true,{"type":20,"children":21,"toc":1106},"root",[22,34,38,65,75,85,88,95,100,113,118,138,150,162,165,171,176,188,193,202,212,225,228,234,239,247,254,267,308,427,440,446,451,536,556,562,567,579,582,588,599,604,710,715,826,836,839,845,985,997,1000,1006,1011,1024,1032,1037,1049,1054,1073,1083,1100],{"type":23,"tag":24,"props":25,"children":26},"element","blockquote",{},[27],{"type":23,"tag":28,"props":29,"children":30},"p",{},[31],{"type":32,"value":33},"text","本文是《AgentScope 2.0 正式发布》的实践续篇。当所有人都觉得 \"AI 工具=大模型+RAG\" 时，我用 500 行 Python 证明了另一条路。",{"type":23,"tag":35,"props":36,"children":37},"hr",{},[],{"type":23,"tag":28,"props":39,"children":40},{},[41,48,50,56,58,63],{"type":23,"tag":42,"props":43,"children":45},"a",{"href":44},"/blogs/agentscope-2-production",[46],{"type":32,"value":47},"上篇文章",{"type":32,"value":49},"提到，AgentScope 2.0 从实验性框架蜕变成了真正的生产级平台。七大核心特性中，",{"type":23,"tag":51,"props":52,"children":53},"strong",{},[54],{"type":32,"value":55},"Middleware 机制",{"type":32,"value":57},"和",{"type":23,"tag":51,"props":59,"children":60},{},[61],{"type":32,"value":62},"内置 Service",{"type":32,"value":64}," 的设计让我眼前一亮——这意味着我们可以像搭积木一样扩展 Agent 的能力。",{"type":23,"tag":28,"props":66,"children":67},{},[68,70],{"type":32,"value":69},"但当我真的开始写代码时，一个念头冒出来：",{"type":23,"tag":51,"props":71,"children":72},{},[73],{"type":32,"value":74},"Agent 写 AgentScope 代码时，如果遇到 API 问题怎么办？",{"type":23,"tag":28,"props":76,"children":77},{},[78,80],{"type":32,"value":79},"这促使我动手做一个\"专家工具\"。接下来的故事，印证了 2.0 的设计哲学：",{"type":23,"tag":51,"props":81,"children":82},{},[83],{"type":32,"value":84},"让合适的工具做合适的事。",{"type":23,"tag":35,"props":86,"children":87},{},[],{"type":23,"tag":89,"props":90,"children":92},"h2",{"id":91},"一句反问打破rag-万能的迷思",[93],{"type":32,"value":94},"🤔 一句反问，打破\"RAG 万能\"的迷思",{"type":23,"tag":28,"props":96,"children":97},{},[98],{"type":32,"value":99},"为了辅助 Agent 快速获取 AgentScope 2.0 的 API 文档、方法签名和示例代码，我一开始本能地走了一条\"标准路线\"：",{"type":23,"tag":24,"props":101,"children":102},{},[103,108],{"type":23,"tag":28,"props":104,"children":105},{},[106],{"type":32,"value":107},"LLM 意图分类 → 向量语义检索 → Prompt 组装 → 大模型生成回答",{"type":23,"tag":28,"props":109,"children":110},{},[111],{"type":32,"value":112},"甚至还计划加个运行时验证层",{"type":23,"tag":28,"props":114,"children":115},{},[116],{"type":32,"value":117},"设计图画得很满，但当我把方案同步给协作者时，他只回了一句话：",{"type":23,"tag":24,"props":119,"children":120},{},[121],{"type":23,"tag":28,"props":122,"children":123},{},[124],{"type":23,"tag":51,"props":125,"children":126},{},[127,129,136],{"type":32,"value":128},"\"你的 ",{"type":23,"tag":130,"props":131,"children":133},"code",{"className":132},[],[134],{"type":32,"value":135},"_classify_intent",{"type":32,"value":137}," 没用 LLM，怎么可能理解自然语言？如果用了，查个 API 签名，真的值得每次调大模型吗？\"",{"type":23,"tag":28,"props":139,"children":140},{},[141,143,148],{"type":32,"value":142},"这句话像一盆冷水，瞬间浇醒了我。我犯了一个典型的 ",{"type":23,"tag":51,"props":144,"children":145},{},[146],{"type":32,"value":147},"\"AI 时代工程师通病\"",{"type":32,"value":149},"：手里拿着大模型和 RAG 的锤子，看什么都像钉子。",{"type":23,"tag":28,"props":151,"children":152},{},[153,155,160],{"type":32,"value":154},"回想 2.0 的设计——它的 Middleware 机制鼓励我们用轻量级、可组合的模块扩展 Agent，而不是把所有逻辑塞进 Prompt。既然 API 信息是",{"type":23,"tag":51,"props":156,"children":157},{},[158],{"type":32,"value":159},"结构化的、确定的",{"type":32,"value":161},"，为什么还要用概率性的语言模型去\"猜\"和\"生成\"？",{"type":23,"tag":35,"props":163,"children":164},{},[],{"type":23,"tag":89,"props":166,"children":168},{"id":167},"转身用静态分析重建专家",[169],{"type":32,"value":170},"🔄 转身：用静态分析重建\"专家\"",{"type":23,"tag":28,"props":172,"children":173},{},[174],{"type":32,"value":175},"AgentScope 是一个开源 Python 库。它的 API 契约、方法签名、文档字符串——全部明明白白写在源码里。",{"type":23,"tag":28,"props":177,"children":178},{},[179,181,186],{"type":32,"value":180},"我立刻砍掉了向量库、砍掉了意图分类器、砍掉了复杂的 RAG 管道。回归 Python 最强大的原生能力：",{"type":23,"tag":51,"props":182,"children":183},{},[184],{"type":32,"value":185},"AST（抽象语法树）",{"type":32,"value":187},"。",{"type":23,"tag":28,"props":189,"children":190},{},[191],{"type":32,"value":192},"新的架构极其朴素：",{"type":23,"tag":194,"props":195,"children":197},"pre",{"code":196},"源码 (*.py)\n   ↓  ast.parse 静态扫描\n结构化索引 (JSON)\n   ↓  字典式精确匹配\nAgent 查询接口 (Deterministic Tool Call)\n",[198],{"type":23,"tag":130,"props":199,"children":200},{"__ignoreMap":7},[201],{"type":32,"value":196},{"type":23,"tag":28,"props":203,"children":204},{},[205,210],{"type":23,"tag":51,"props":206,"children":207},{},[208],{"type":32,"value":209},"没有大模型参与检索，没有向量相似度计算，没有网络延迟。",{"type":32,"value":211}," 只有纯本地的、确定性的、毫秒级响应的\"查字典\"服务。",{"type":23,"tag":28,"props":213,"children":214},{},[215,217,223],{"type":32,"value":216},"这恰好与 AgentScope 2.0 的 ",{"type":23,"tag":130,"props":218,"children":220},{"className":219},[],[221],{"type":32,"value":222},"ToolOffloadMiddleware",{"type":32,"value":224}," 设计思路一脉相承：把高频、确定性操作从 Agent 推理循环中卸载到独立的轻量工具。",{"type":23,"tag":35,"props":226,"children":227},{},[],{"type":23,"tag":89,"props":229,"children":231},{"id":230},"️-不到-500-行代码的确定性之美",[232],{"type":32,"value":233},"🛠️ 不到 500 行代码的确定性之美",{"type":23,"tag":28,"props":235,"children":236},{},[237],{"type":32,"value":238},"整个工具只有三个核心文件：",{"type":23,"tag":194,"props":240,"children":242},{"code":241},"as-doc-helper/\n├── indexer.py          # 索引构建器（326 行）\n├── querier.py          # 查询引擎（407 行）\n├── cli.py              # CLI 入口（113 行）\n├── SKILL.md            # Agent 技能描述\n└── knowledge_base/     # 生成的索引文件\n",[243],{"type":23,"tag":130,"props":244,"children":245},{"__ignoreMap":7},[246],{"type":32,"value":241},{"type":23,"tag":248,"props":249,"children":251},"h3",{"id":250},"_1-indexerpy索引构建器",[252],{"type":32,"value":253},"1. indexer.py：索引构建器",{"type":23,"tag":28,"props":255,"children":256},{},[257,259,265],{"type":32,"value":258},"利用 Python 标准库 ",{"type":23,"tag":130,"props":260,"children":262},{"className":261},[],[263],{"type":32,"value":264},"ast",{"type":32,"value":266},"，遍历 AgentScope 源码目录，提取：",{"type":23,"tag":268,"props":269,"children":270},"ul",{},[271,277,298,303],{"type":23,"tag":272,"props":273,"children":274},"li",{},[275],{"type":32,"value":276},"类名、基类、所在模块",{"type":23,"tag":272,"props":278,"children":279},{},[280,282,288,290,296],{"type":32,"value":281},"方法签名（自动区分 ",{"type":23,"tag":130,"props":283,"children":285},{"className":284},[],[286],{"type":32,"value":287},"def",{"type":32,"value":289}," 和 ",{"type":23,"tag":130,"props":291,"children":293},{"className":292},[],[294],{"type":32,"value":295},"async def",{"type":32,"value":297},"）",{"type":23,"tag":272,"props":299,"children":300},{},[301],{"type":32,"value":302},"Docstring 文档字符串",{"type":23,"tag":272,"props":304,"children":305},{},[306],{"type":32,"value":307},"关键词标签（用于快速过滤）",{"type":23,"tag":194,"props":309,"children":313},{"code":310,"language":311,"meta":7,"className":312,"style":7},"# 核心逻辑示意\ntree = ast.parse(source_code)\nfor node in ast.walk(tree):\n    if isinstance(node, ast.ClassDef) and not node.name.startswith(\"_\"):\n        methods = [m.name for m in node.body\n                   if isinstance(m, (ast.FunctionDef, ast.AsyncFunctionDef))]\n        api_index[f\"{module}.{node.name}\"] = {\n            \"type\": \"class\",\n            \"docstring\": ast.get_docstring(node),\n            \"methods\": methods,\n            \"init_signature\": get_init_signature(node)\n        }\n","python","language-python shiki shiki-themes dracula",[314],{"type":23,"tag":130,"props":315,"children":316},{"__ignoreMap":7},[317,328,337,346,355,364,373,382,391,400,409,418],{"type":23,"tag":318,"props":319,"children":322},"span",{"class":320,"line":321},"line",1,[323],{"type":23,"tag":318,"props":324,"children":325},{},[326],{"type":32,"value":327},"# 核心逻辑示意\n",{"type":23,"tag":318,"props":329,"children":331},{"class":320,"line":330},2,[332],{"type":23,"tag":318,"props":333,"children":334},{},[335],{"type":32,"value":336},"tree = ast.parse(source_code)\n",{"type":23,"tag":318,"props":338,"children":340},{"class":320,"line":339},3,[341],{"type":23,"tag":318,"props":342,"children":343},{},[344],{"type":32,"value":345},"for node in ast.walk(tree):\n",{"type":23,"tag":318,"props":347,"children":349},{"class":320,"line":348},4,[350],{"type":23,"tag":318,"props":351,"children":352},{},[353],{"type":32,"value":354},"    if isinstance(node, ast.ClassDef) and not node.name.startswith(\"_\"):\n",{"type":23,"tag":318,"props":356,"children":358},{"class":320,"line":357},5,[359],{"type":23,"tag":318,"props":360,"children":361},{},[362],{"type":32,"value":363},"        methods = [m.name for m in node.body\n",{"type":23,"tag":318,"props":365,"children":367},{"class":320,"line":366},6,[368],{"type":23,"tag":318,"props":369,"children":370},{},[371],{"type":32,"value":372},"                   if isinstance(m, (ast.FunctionDef, ast.AsyncFunctionDef))]\n",{"type":23,"tag":318,"props":374,"children":376},{"class":320,"line":375},7,[377],{"type":23,"tag":318,"props":378,"children":379},{},[380],{"type":32,"value":381},"        api_index[f\"{module}.{node.name}\"] = {\n",{"type":23,"tag":318,"props":383,"children":385},{"class":320,"line":384},8,[386],{"type":23,"tag":318,"props":387,"children":388},{},[389],{"type":32,"value":390},"            \"type\": \"class\",\n",{"type":23,"tag":318,"props":392,"children":394},{"class":320,"line":393},9,[395],{"type":23,"tag":318,"props":396,"children":397},{},[398],{"type":32,"value":399},"            \"docstring\": ast.get_docstring(node),\n",{"type":23,"tag":318,"props":401,"children":403},{"class":320,"line":402},10,[404],{"type":23,"tag":318,"props":405,"children":406},{},[407],{"type":32,"value":408},"            \"methods\": methods,\n",{"type":23,"tag":318,"props":410,"children":412},{"class":320,"line":411},11,[413],{"type":23,"tag":318,"props":414,"children":415},{},[416],{"type":32,"value":417},"            \"init_signature\": get_init_signature(node)\n",{"type":23,"tag":318,"props":419,"children":421},{"class":320,"line":420},12,[422],{"type":23,"tag":318,"props":423,"children":424},{},[425],{"type":32,"value":426},"        }\n",{"type":23,"tag":28,"props":428,"children":429},{},[430,432,438],{"type":32,"value":431},"跑一次只需几秒，生成结构化的 ",{"type":23,"tag":130,"props":433,"children":435},{"className":434},[],[436],{"type":32,"value":437},"api_index.json",{"type":32,"value":439},"，覆盖数百个 API 条目。",{"type":23,"tag":248,"props":441,"children":443},{"id":442},"_2-querierpy查询引擎",[444],{"type":32,"value":445},"2. querier.py：查询引擎",{"type":23,"tag":28,"props":447,"children":448},{},[449],{"type":32,"value":450},"提供直接给 Agent 调用的确定性接口：",{"type":23,"tag":194,"props":452,"children":454},{"code":453,"language":311,"meta":7,"className":312,"style":7},"helper = AgentScopeDocHelper()\n\n# 精确查类文档\ndoc = helper.query_api(\"Agent\")\n\n# 查方法签名\nsig = helper.get_method_signature(\"Toolkit\", \"get_tool_schemas\")\n\n# 搜示例代码\nexamples = helper.search_examples(\"mcp\", max_results=2)\n",[455],{"type":23,"tag":130,"props":456,"children":457},{"__ignoreMap":7},[458,466,474,482,490,497,505,513,520,528],{"type":23,"tag":318,"props":459,"children":460},{"class":320,"line":321},[461],{"type":23,"tag":318,"props":462,"children":463},{},[464],{"type":32,"value":465},"helper = AgentScopeDocHelper()\n",{"type":23,"tag":318,"props":467,"children":468},{"class":320,"line":330},[469],{"type":23,"tag":318,"props":470,"children":471},{"emptyLinePlaceholder":18},[472],{"type":32,"value":473},"\n",{"type":23,"tag":318,"props":475,"children":476},{"class":320,"line":339},[477],{"type":23,"tag":318,"props":478,"children":479},{},[480],{"type":32,"value":481},"# 精确查类文档\n",{"type":23,"tag":318,"props":483,"children":484},{"class":320,"line":348},[485],{"type":23,"tag":318,"props":486,"children":487},{},[488],{"type":32,"value":489},"doc = helper.query_api(\"Agent\")\n",{"type":23,"tag":318,"props":491,"children":492},{"class":320,"line":357},[493],{"type":23,"tag":318,"props":494,"children":495},{"emptyLinePlaceholder":18},[496],{"type":32,"value":473},{"type":23,"tag":318,"props":498,"children":499},{"class":320,"line":366},[500],{"type":23,"tag":318,"props":501,"children":502},{},[503],{"type":32,"value":504},"# 查方法签名\n",{"type":23,"tag":318,"props":506,"children":507},{"class":320,"line":375},[508],{"type":23,"tag":318,"props":509,"children":510},{},[511],{"type":32,"value":512},"sig = helper.get_method_signature(\"Toolkit\", \"get_tool_schemas\")\n",{"type":23,"tag":318,"props":514,"children":515},{"class":320,"line":384},[516],{"type":23,"tag":318,"props":517,"children":518},{"emptyLinePlaceholder":18},[519],{"type":32,"value":473},{"type":23,"tag":318,"props":521,"children":522},{"class":320,"line":393},[523],{"type":23,"tag":318,"props":524,"children":525},{},[526],{"type":32,"value":527},"# 搜示例代码\n",{"type":23,"tag":318,"props":529,"children":530},{"class":320,"line":402},[531],{"type":23,"tag":318,"props":532,"children":533},{},[534],{"type":32,"value":535},"examples = helper.search_examples(\"mcp\", max_results=2)\n",{"type":23,"tag":28,"props":537,"children":538},{},[539,541,546,548,554],{"type":32,"value":540},"返回格式严格对齐 ",{"type":23,"tag":51,"props":542,"children":543},{},[544],{"type":32,"value":545},"AgentScope 2.0 的 Tool Call 规范",{"type":32,"value":547},"，零幻觉、零多余信息。结合 2.0 的 ",{"type":23,"tag":130,"props":549,"children":551},{"className":550},[],[552],{"type":32,"value":553},"Toolkit.register_tool_function()",{"type":32,"value":555},"，一行代码就能注册到 Agent 中。",{"type":23,"tag":248,"props":557,"children":559},{"id":558},"_3-skillmd即插即用",[560],{"type":32,"value":561},"3. SKILL.md：即插即用",{"type":23,"tag":28,"props":563,"children":564},{},[565],{"type":32,"value":566},"这正是 AgentScope 2.0 生态的妙处。任何支持 Skill 协议的 Agent（Cursor、Claude Desktop、AgentScope 自己的 Agent）都能自动识别并调用这个工具。",{"type":23,"tag":28,"props":568,"children":569},{},[570,572,577],{"type":32,"value":571},"配合 2.0 的 ",{"type":23,"tag":51,"props":573,"children":574},{},[575],{"type":32,"value":576},"Workspace 抽象",{"type":32,"value":578},"，无论是在本地开发还是部署到云端沙箱，工具路径不用改一行代码。",{"type":23,"tag":35,"props":580,"children":581},{},[],{"type":23,"tag":89,"props":583,"children":585},{"id":584},"设计哲学与-agentscope-20-一脉相承",[586],{"type":32,"value":587},"💡 设计哲学：与 AgentScope 2.0 一脉相承",{"type":23,"tag":28,"props":589,"children":590},{},[591,593,598],{"type":32,"value":592},"上篇文章我总结了 2.0 的核心升级：",{"type":23,"tag":51,"props":594,"children":595},{},[596],{"type":32,"value":597},"自动重试、实时可见、细粒度权限、结构化上下文、Workspace 抽象、Middleware 机制、内置 Service",{"type":32,"value":187},{"type":23,"tag":28,"props":600,"children":601},{},[602],{"type":32,"value":603},"这次的\"专家工具\"正好是这些理念的践行：",{"type":23,"tag":605,"props":606,"children":607},"table",{},[608,627],{"type":23,"tag":609,"props":610,"children":611},"thead",{},[612],{"type":23,"tag":613,"props":614,"children":615},"tr",{},[616,622],{"type":23,"tag":617,"props":618,"children":619},"th",{},[620],{"type":32,"value":621},"2.0 特性",{"type":23,"tag":617,"props":623,"children":624},{},[625],{"type":32,"value":626},"本工具的体现",{"type":23,"tag":628,"props":629,"children":630},"tbody",{},[631,647,663,678,694],{"type":23,"tag":613,"props":632,"children":633},{},[634,642],{"type":23,"tag":635,"props":636,"children":637},"td",{},[638],{"type":23,"tag":51,"props":639,"children":640},{},[641],{"type":32,"value":55},{"type":23,"tag":635,"props":643,"children":644},{},[645],{"type":32,"value":646},"工具作为独立模块，不侵入 Agent 推理逻辑",{"type":23,"tag":613,"props":648,"children":649},{},[650,658],{"type":23,"tag":635,"props":651,"children":652},{},[653],{"type":23,"tag":51,"props":654,"children":655},{},[656],{"type":32,"value":657},"工具调用卸载",{"type":23,"tag":635,"props":659,"children":660},{},[661],{"type":32,"value":662},"高频 API 查询脱离 LLM，延迟降到毫秒级",{"type":23,"tag":613,"props":664,"children":665},{},[666,673],{"type":23,"tag":635,"props":667,"children":668},{},[669],{"type":23,"tag":51,"props":670,"children":671},{},[672],{"type":32,"value":576},{"type":23,"tag":635,"props":674,"children":675},{},[676],{"type":32,"value":677},"同一份代码，本地/沙箱无缝切换",{"type":23,"tag":613,"props":679,"children":680},{},[681,689],{"type":23,"tag":635,"props":682,"children":683},{},[684],{"type":23,"tag":51,"props":685,"children":686},{},[687],{"type":32,"value":688},"确定性输出",{"type":23,"tag":635,"props":690,"children":691},{},[692],{"type":32,"value":693},"JSON 索引精确映射，100% 准确率",{"type":23,"tag":613,"props":695,"children":696},{},[697,705],{"type":23,"tag":635,"props":698,"children":699},{},[700],{"type":23,"tag":51,"props":701,"children":702},{},[703],{"type":32,"value":704},"轻量集成",{"type":23,"tag":635,"props":706,"children":707},{},[708],{"type":32,"value":709},"标准 Skill 协议，一行注册",{"type":23,"tag":28,"props":711,"children":712},{},[713],{"type":32,"value":714},"这也让我总结出 Agent 开发中工具选型的核心原则：",{"type":23,"tag":605,"props":716,"children":717},{},[718,739],{"type":23,"tag":609,"props":719,"children":720},{},[721],{"type":23,"tag":613,"props":722,"children":723},{},[724,729,734],{"type":23,"tag":617,"props":725,"children":726},{},[727],{"type":32,"value":728},"场景",{"type":23,"tag":617,"props":730,"children":731},{},[732],{"type":32,"value":733},"推荐方案",{"type":23,"tag":617,"props":735,"children":736},{},[737],{"type":32,"value":738},"原因",{"type":23,"tag":628,"props":740,"children":741},{},[742,763,784,805],{"type":23,"tag":613,"props":743,"children":744},{},[745,750,758],{"type":23,"tag":635,"props":746,"children":747},{},[748],{"type":32,"value":749},"查 API 签名/类型定义",{"type":23,"tag":635,"props":751,"children":752},{},[753],{"type":23,"tag":51,"props":754,"children":755},{},[756],{"type":32,"value":757},"AST 静态分析",{"type":23,"tag":635,"props":759,"children":760},{},[761],{"type":32,"value":762},"信息确定，大模型会幻觉",{"type":23,"tag":613,"props":764,"children":765},{},[766,771,779],{"type":23,"tag":635,"props":767,"children":768},{},[769],{"type":32,"value":770},"模糊意图/复杂推理",{"type":23,"tag":635,"props":772,"children":773},{},[774],{"type":23,"tag":51,"props":775,"children":776},{},[777],{"type":32,"value":778},"LLM + RAG",{"type":23,"tag":635,"props":780,"children":781},{},[782],{"type":32,"value":783},"需要语义泛化",{"type":23,"tag":613,"props":785,"children":786},{},[787,792,800],{"type":23,"tag":635,"props":788,"children":789},{},[790],{"type":32,"value":791},"高频 Tool Call",{"type":23,"tag":635,"props":793,"children":794},{},[795],{"type":23,"tag":51,"props":796,"children":797},{},[798],{"type":32,"value":799},"本地轻量工具",{"type":23,"tag":635,"props":801,"children":802},{},[803],{"type":32,"value":804},"延迟必须 \u003C50ms",{"type":23,"tag":613,"props":806,"children":807},{},[808,813,821],{"type":23,"tag":635,"props":809,"children":810},{},[811],{"type":32,"value":812},"低频开放问答",{"type":23,"tag":635,"props":814,"children":815},{},[816],{"type":23,"tag":51,"props":817,"children":818},{},[819],{"type":32,"value":820},"RAG + LLM",{"type":23,"tag":635,"props":822,"children":823},{},[824],{"type":32,"value":825},"可容忍延迟",{"type":23,"tag":28,"props":827,"children":828},{},[829,834],{"type":23,"tag":51,"props":830,"children":831},{},[832],{"type":32,"value":833},"Agent 开发不是\"万物皆可 Prompt\"，而是\"让合适的工具做合适的事\"。",{"type":32,"value":835}," 这和 2.0 把重试、鉴权、上下文管理从 Agent 核心逻辑中解耦出来的思路，完全一致。",{"type":23,"tag":35,"props":837,"children":838},{},[],{"type":23,"tag":89,"props":840,"children":842},{"id":841},"效果对比确定性对概率性的降维打击",[843],{"type":32,"value":844},"📊 效果对比：确定性对概率性的降维打击",{"type":23,"tag":605,"props":846,"children":847},{},[848,869],{"type":23,"tag":609,"props":849,"children":850},{},[851],{"type":23,"tag":613,"props":852,"children":853},{},[854,859,864],{"type":23,"tag":617,"props":855,"children":856},{},[857],{"type":32,"value":858},"指标",{"type":23,"tag":617,"props":860,"children":861},{},[862],{"type":32,"value":863},"传统 RAG 方案",{"type":23,"tag":617,"props":865,"children":866},{},[867],{"type":32,"value":868},"AST + JSON 方案",{"type":23,"tag":628,"props":870,"children":871},{},[872,893,917,943,964],{"type":23,"tag":613,"props":873,"children":874},{},[875,883,888],{"type":23,"tag":635,"props":876,"children":877},{},[878],{"type":23,"tag":51,"props":879,"children":880},{},[881],{"type":32,"value":882},"响应延迟",{"type":23,"tag":635,"props":884,"children":885},{},[886],{"type":32,"value":887},"800ms ~ 3s（网络 + LLM）",{"type":23,"tag":635,"props":889,"children":890},{},[891],{"type":32,"value":892},"\u003C 10ms（本地内存）",{"type":23,"tag":613,"props":894,"children":895},{},[896,904,909],{"type":23,"tag":635,"props":897,"children":898},{},[899],{"type":23,"tag":51,"props":900,"children":901},{},[902],{"type":32,"value":903},"Token 消耗",{"type":23,"tag":635,"props":905,"children":906},{},[907],{"type":32,"value":908},"每次 ~1.5k tokens",{"type":23,"tag":635,"props":910,"children":911},{},[912],{"type":23,"tag":51,"props":913,"children":914},{},[915],{"type":32,"value":916},"0 tokens",{"type":23,"tag":613,"props":918,"children":919},{},[920,928,933],{"type":23,"tag":635,"props":921,"children":922},{},[923],{"type":23,"tag":51,"props":924,"children":925},{},[926],{"type":32,"value":927},"准确率",{"type":23,"tag":635,"props":929,"children":930},{},[931],{"type":32,"value":932},"85% ~ 95%",{"type":23,"tag":635,"props":934,"children":935},{},[936,941],{"type":23,"tag":51,"props":937,"children":938},{},[939],{"type":32,"value":940},"100%",{"type":32,"value":942},"（直接映射源码）",{"type":23,"tag":613,"props":944,"children":945},{},[946,954,959],{"type":23,"tag":635,"props":947,"children":948},{},[949],{"type":23,"tag":51,"props":950,"children":951},{},[952],{"type":32,"value":953},"维护成本",{"type":23,"tag":635,"props":955,"children":956},{},[957],{"type":32,"value":958},"高（向量库、Embedding、Prompt 调优）",{"type":23,"tag":635,"props":960,"children":961},{},[962],{"type":32,"value":963},"极低（跑一次 indexer）",{"type":23,"tag":613,"props":965,"children":966},{},[967,975,980],{"type":23,"tag":635,"props":968,"children":969},{},[970],{"type":23,"tag":51,"props":971,"children":972},{},[973],{"type":32,"value":974},"Agent 集成",{"type":23,"tag":635,"props":976,"children":977},{},[978],{"type":32,"value":979},"中（需处理流式、错误重试）",{"type":23,"tag":635,"props":981,"children":982},{},[983],{"type":32,"value":984},"极低（标准 Tool Call）",{"type":23,"tag":28,"props":986,"children":987},{},[988,990,995],{"type":32,"value":989},"回想 2.0 引入的",{"type":23,"tag":51,"props":991,"children":992},{},[993],{"type":32,"value":994},"事件驱动流式架构",{"type":32,"value":996},"（SSE），Agent 的 ReAct 循环中每个工具调用都直接影响对话流畅度。10ms 和 2s 的差距，直接决定了用户体感是\"丝滑\"还是\"迟钝\"。",{"type":23,"tag":35,"props":998,"children":999},{},[],{"type":23,"tag":89,"props":1001,"children":1003},{"id":1002},"结语把确定性还给代码把智能留给大模型",[1004],{"type":32,"value":1005},"🔚 结语：把确定性还给代码，把智能留给大模型",{"type":23,"tag":28,"props":1007,"children":1008},{},[1009],{"type":32,"value":1010},"最终，这个工具没有用到任何第三方库，没有训练任何模型，没有部署任何服务。它只是一个安静的 Python 脚本 + 一个 JSON 文件，却完美胜任了 Agent 开发中的\"知识外挂\"角色。",{"type":23,"tag":28,"props":1012,"children":1013},{},[1014,1016,1022],{"type":32,"value":1015},"它已经被打包成 ",{"type":23,"tag":130,"props":1017,"children":1019},{"className":1018},[],[1020],{"type":32,"value":1021},"SKILL.md",{"type":32,"value":1023},"，直接接入我的 AgentScope 2.0 工作流。每次写代码时，Agent 自动调用：",{"type":23,"tag":194,"props":1025,"children":1027},{"code":1026},"query_api(\"Agent\")           → 拿到构造函数参数\nsearch_examples(\"mcp\")       → 拿到参考代码\nget_method_signature(...)    → 确认调用方式\n",[1028],{"type":23,"tag":130,"props":1029,"children":1030},{"__ignoreMap":7},[1031],{"type":32,"value":1026},{"type":23,"tag":28,"props":1033,"children":1034},{},[1035],{"type":32,"value":1036},"整个过程没有一次 LLM 调用，却比任何\"智能问答\"都高效。",{"type":23,"tag":28,"props":1038,"children":1039},{},[1040,1042,1047],{"type":32,"value":1041},"这也是 AgentScope 2.0 给我的最大启示：",{"type":23,"tag":51,"props":1043,"children":1044},{},[1045],{"type":32,"value":1046},"好的架构，不是让大模型包办一切，而是让每个组件各司其职。",{"type":32,"value":1048}," 从内置 Service 到 Middleware 机制，再到这个零 LLM 的文档工具——思路一以贯之。",{"type":23,"tag":28,"props":1050,"children":1051},{},[1052],{"type":32,"value":1053},"下次当你准备为一个技术栈设计\"AI 专家\"时，不妨先问自己三个问题：",{"type":23,"tag":1055,"props":1056,"children":1057},"ol",{},[1058,1063,1068],{"type":23,"tag":272,"props":1059,"children":1060},{},[1061],{"type":32,"value":1062},"我要的信息，是确定的还是模糊的？",{"type":23,"tag":272,"props":1064,"children":1065},{},[1066],{"type":32,"value":1067},"它能不能通过静态分析 / 结构化查询直接拿到？",{"type":23,"tag":272,"props":1069,"children":1070},{},[1071],{"type":32,"value":1072},"Agent 调用它的频率，是否高到无法承受 LLM 延迟？",{"type":23,"tag":28,"props":1074,"children":1075},{},[1076,1078],{"type":32,"value":1077},"如果答案偏向\"确定、能查、高频\"——",{"type":23,"tag":51,"props":1079,"children":1080},{},[1081],{"type":32,"value":1082},"把大模型请出去，让代码做它最擅长的事。",{"type":23,"tag":28,"props":1084,"children":1085},{},[1086,1088,1093,1095],{"type":32,"value":1087},"📖 ",{"type":23,"tag":51,"props":1089,"children":1090},{},[1091],{"type":32,"value":1092},"阅读前文",{"type":32,"value":1094},"：",{"type":23,"tag":42,"props":1096,"children":1097},{"href":44},[1098],{"type":32,"value":1099},"AgentScope 2.0 正式发布：让 AI Agent 真正能在生产环境中跑起来",{"type":23,"tag":1101,"props":1102,"children":1103},"style",{},[1104],{"type":32,"value":1105},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":330,"depth":330,"links":1107},[1108,1109,1110,1115,1116,1117],{"id":91,"depth":330,"text":94},{"id":167,"depth":330,"text":170},{"id":230,"depth":330,"text":233,"children":1111},[1112,1113,1114],{"id":250,"depth":339,"text":253},{"id":442,"depth":339,"text":445},{"id":558,"depth":339,"text":561},{"id":584,"depth":330,"text":587},{"id":841,"depth":330,"text":844},{"id":1002,"depth":330,"text":1005},"markdown","content:blogs:agentscope-doc-helper-zero-llm.md","content","blogs/agentscope-doc-helper-zero-llm.md","blogs/agentscope-doc-helper-zero-llm","md",{"loc":4},1779982357452]