[{"data":1,"prerenderedAt":413},["ShallowReactive",2],{"insight-agent-7-pitfalls":3,"insight-related-agent-7-pitfalls":167},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"slug":9,"date":10,"duration":11,"category":12,"author":13,"cover":14,"tags":15,"featured":20,"body":21,"_type":161,"_id":162,"_source":163,"_file":164,"_stem":165,"_extension":166},"\u002Finsights\u002F01-agent-pitfalls","insights",false,"","把 Agent 接进真实业务系统时，我们踩过的 7 个坑","agent-7-pitfalls","2026-04-18",14,"AI 工程","浩途技术团队","\u002Fimages\u002Finsights\u002Fagent-pitfalls-cover.png",[16,17,18,19],"Agent","LLM","RAG","业务系统",true,{"type":22,"children":23,"toc":153},"root",[24,32,38,42,48,57,62,80,83,89,94,97,103,133,136,141],{"type":25,"tag":26,"props":27,"children":29},"element","h2",{"id":28},"引子",[30],{"type":31,"value":28},"text",{"type":25,"tag":33,"props":34,"children":35},"p",{},[36],{"type":31,"value":37},"2024 年起，浩途陆续把 LLM Agent 嵌入到客户的真实业务系统里——审批流、知识问答、\n工单分发、报表分析等。一年下来，复盘了 7 类反复踩过的坑，写下来给同行做避雷参考。",{"type":25,"tag":39,"props":40,"children":41},"hr",{},[],{"type":25,"tag":26,"props":43,"children":45},{"id":44},"坑-1权限边界没想清楚就让-agent-全能",[46],{"type":31,"value":47},"坑 1：权限边界没想清楚就让 Agent \"全能\"",{"type":25,"tag":49,"props":50,"children":51},"blockquote",{},[52],{"type":25,"tag":33,"props":53,"children":54},{},[55],{"type":31,"value":56},"现象：Agent 调用 API 时，能看到不属于本用户的数据。",{"type":25,"tag":33,"props":58,"children":59},{},[60],{"type":31,"value":61},"业务系统的权限模型通常是基于\"会话用户\"的，但 Agent 工作时是另一个身份。\n我们最早的做法是给 Agent 一个\"超级账号\"——很快就出问题：审批流里，Agent 帮 A 用户\n看了 B 用户的工单详情。",{"type":25,"tag":33,"props":63,"children":64},{},[65,71,73,78],{"type":25,"tag":66,"props":67,"children":68},"strong",{},[69],{"type":31,"value":70},"Plan B",{"type":31,"value":72},"：让 Agent ",{"type":25,"tag":66,"props":74,"children":75},{},[76],{"type":31,"value":77},"以调用者身份",{"type":31,"value":79},"访问业务 API，所有权限控制由原系统继承。",{"type":25,"tag":39,"props":81,"children":82},{},[],{"type":25,"tag":26,"props":84,"children":86},{"id":85},"坑-2上下文窗口一旦满了行为就开始抖",[87],{"type":31,"value":88},"坑 2：上下文窗口一旦满了，行为就开始抖",{"type":25,"tag":33,"props":90,"children":91},{},[92],{"type":31,"value":93},"（… 因篇幅省略，正文未来由内容运营补齐 …）",{"type":25,"tag":39,"props":95,"children":96},{},[],{"type":25,"tag":26,"props":98,"children":100},{"id":99},"坑-37占位",[101],{"type":31,"value":102},"坑 3—7：（占位）",{"type":25,"tag":104,"props":105,"children":106},"ul",{},[107,113,118,123,128],{"type":25,"tag":108,"props":109,"children":110},"li",{},[111],{"type":31,"value":112},"幻觉与业务规则的协调",{"type":25,"tag":108,"props":114,"children":115},{},[116],{"type":31,"value":117},"工具调用的失败重试",{"type":25,"tag":108,"props":119,"children":120},{},[121],{"type":31,"value":122},"多轮对话状态管理",{"type":25,"tag":108,"props":124,"children":125},{},[126],{"type":31,"value":127},"成本失控与模型路由",{"type":25,"tag":108,"props":129,"children":130},{},[131],{"type":31,"value":132},"灰度上线与可回滚",{"type":25,"tag":39,"props":134,"children":135},{},[],{"type":25,"tag":26,"props":137,"children":139},{"id":138},"写在最后",[140],{"type":31,"value":138},{"type":25,"tag":33,"props":142,"children":143},{},[144,146,151],{"type":31,"value":145},"把 LLM 接进业务系统，难的不是模型，而是 ",{"type":25,"tag":66,"props":147,"children":148},{},[149],{"type":31,"value":150},"业务约束如何被表达成 Agent 能理解的规则",{"type":31,"value":152},"。\n浩途下一篇会写\"如何把审批流的 50 条规则，结构化喂给 Agent 而不超 token\"。",{"title":7,"searchDepth":154,"depth":154,"links":155},2,[156,157,158,159,160],{"id":28,"depth":154,"text":28},{"id":44,"depth":154,"text":47},{"id":85,"depth":154,"text":88},{"id":99,"depth":154,"text":102},{"id":138,"depth":154,"text":138},"markdown","content:insights:01-agent-pitfalls.md","content","insights\u002F01-agent-pitfalls.md","insights\u002F01-agent-pitfalls","md",[168,288],{"_path":169,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":170,"description":7,"slug":171,"date":172,"duration":173,"category":12,"author":13,"tags":174,"body":176,"_type":161,"_id":285,"_source":163,"_file":286,"_stem":287,"_extension":166},"\u002Finsights\u002F04-rag-knowledge-gap","RAG 在企业内的\"知识断层\"——为什么准确率上不去","rag-knowledge-gap","2026-03-22",11,[18,175,17],"企业知识库",{"type":22,"children":177,"toc":279},[178,182,194,197,203,215,225,228,234,252,260,263,267],{"type":25,"tag":26,"props":179,"children":180},{"id":28},[181],{"type":31,"value":28},{"type":25,"tag":33,"props":183,"children":184},{},[185,187,192],{"type":31,"value":186},"把 PDF 制度、Wiki、邮件归档全部 embedding 进 RAG 系统后，业务部门用了一周回来反馈：\n\"答案看起来对，细节都不对\"。我们复盘了 4 个项目的 RAG 准确率数据，得出的结论是\n——问题不在 embedding 模型，而在",{"type":25,"tag":66,"props":188,"children":189},{},[190],{"type":31,"value":191},"企业知识本身的断层",{"type":31,"value":193},"。",{"type":25,"tag":39,"props":195,"children":196},{},[],{"type":25,"tag":26,"props":198,"children":200},{"id":199},"断层-1切片粒度不匹配业务粒度",[201],{"type":31,"value":202},"断层 1：切片粒度不匹配业务粒度",{"type":25,"tag":33,"props":204,"children":205},{},[206,208,213],{"type":31,"value":207},"文档切片用 token 长度分块，业务问题却以\"任务\"为单位。一个\"如何提报年终预算\"\n跨 3 份文档：制度、流程图、表格模板。RAG 召回的 3 个 chunk 来自 3 份文档，但\n",{"type":25,"tag":66,"props":209,"children":210},{},[211],{"type":31,"value":212},"chunk 之间没有上下文链接",{"type":31,"value":214},"——LLM 无法重组成完整答案。",{"type":25,"tag":33,"props":216,"children":217},{},[218,223],{"type":25,"tag":66,"props":219,"children":220},{},[221],{"type":31,"value":222},"做法",{"type":31,"value":224},"：按业务任务建知识图谱，chunk 之上加\"任务-文档\"映射。",{"type":25,"tag":39,"props":226,"children":227},{},[],{"type":25,"tag":26,"props":229,"children":231},{"id":230},"断层-234占位",[232],{"type":31,"value":233},"断层 2、3、4（占位）",{"type":25,"tag":104,"props":235,"children":236},{},[237,242,247],{"type":25,"tag":108,"props":238,"children":239},{},[240],{"type":31,"value":241},"部门术语演化：同一个词在 IT 和业务部分别意指不同",{"type":25,"tag":108,"props":243,"children":244},{},[245],{"type":31,"value":246},"时间维度断层：旧规章和新规章并存，RAG 不知道哪个生效",{"type":25,"tag":108,"props":248,"children":249},{},[250],{"type":31,"value":251},"隐性知识缺失：流程之外的\"惯例\"从来没写进文档",{"type":25,"tag":49,"props":253,"children":254},{},[255],{"type":25,"tag":33,"props":256,"children":257},{},[258],{"type":31,"value":259},"（详细案例与方法论由后续内容运营展开）",{"type":25,"tag":39,"props":261,"children":262},{},[],{"type":25,"tag":26,"props":264,"children":265},{"id":138},[266],{"type":31,"value":138},{"type":25,"tag":33,"props":268,"children":269},{},[270,272,277],{"type":31,"value":271},"RAG 不是把文档塞进向量库就行。",{"type":25,"tag":66,"props":273,"children":274},{},[275],{"type":31,"value":276},"先治理知识，再做 RAG",{"type":31,"value":278},"——这才是企业落地 LLM 的正确顺序。",{"title":7,"searchDepth":154,"depth":154,"links":280},[281,282,283,284],{"id":28,"depth":154,"text":28},{"id":199,"depth":154,"text":202},{"id":230,"depth":154,"text":233},{"id":138,"depth":154,"text":138},"content:insights:04-rag-knowledge-gap.md","insights\u002F04-rag-knowledge-gap.md","insights\u002F04-rag-knowledge-gap",{"_path":289,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":290,"description":7,"slug":291,"date":292,"duration":293,"category":12,"author":13,"tags":294,"body":298,"_type":161,"_id":410,"_source":163,"_file":411,"_stem":412,"_extension":166},"\u002Finsights\u002F05-llm-domain-ontology","让 LLM 读懂业务术语：从 Prompt 工程到企业本体","llm-domain-ontology","2026-02-15",9,[17,295,296,297],"Prompt","企业本体","ontology",{"type":22,"children":299,"toc":404},[300,304,316,319,324,358,363,366,372,377,385,388,392],{"type":25,"tag":26,"props":301,"children":302},{"id":28},[303],{"type":31,"value":28},{"type":25,"tag":33,"props":305,"children":306},{},[307,309,314],{"type":31,"value":308},"为某银行做信贷智能助手时，反复调试 Prompt 让 LLM 理解\"客户经理\"和\"产品经理\"\n的区别——失败。意识到：",{"type":25,"tag":66,"props":310,"children":311},{},[312],{"type":31,"value":313},"业务术语的歧义不是 Prompt 能解决的",{"type":31,"value":315},"，需要从源头注入\n企业本体（ontology）。",{"type":25,"tag":39,"props":317,"children":318},{},[],{"type":25,"tag":26,"props":320,"children":322},{"id":321},"业务术语的三种歧义",[323],{"type":31,"value":321},{"type":25,"tag":325,"props":326,"children":327},"ol",{},[328,338,348],{"type":25,"tag":108,"props":329,"children":330},{},[331,336],{"type":25,"tag":66,"props":332,"children":333},{},[334],{"type":31,"value":335},"同名异义",{"type":31,"value":337},"：客户经理（银行）vs 客户经理（地产）",{"type":25,"tag":108,"props":339,"children":340},{},[341,346],{"type":25,"tag":66,"props":342,"children":343},{},[344],{"type":31,"value":345},"异名同义",{"type":31,"value":347},"：业务员 \u002F 客户经理 \u002F 销售代表 在同一企业并存",{"type":25,"tag":108,"props":349,"children":350},{},[351,356],{"type":25,"tag":66,"props":352,"children":353},{},[354],{"type":31,"value":355},"关系隐含",{"type":31,"value":357},"：A 部门的\"主管\"对 B 部门的人是否有审批权？",{"type":25,"tag":33,"props":359,"children":360},{},[361],{"type":31,"value":362},"LLM 默认按通用语料解读，95% 场景能蒙对，关键 5% 决策上会翻车。",{"type":25,"tag":39,"props":364,"children":365},{},[],{"type":25,"tag":26,"props":367,"children":369},{"id":368},"解法业务本体显式建模-检索增强",[370],{"type":31,"value":371},"解法：业务本体显式建模 + 检索增强",{"type":25,"tag":33,"props":373,"children":374},{},[375],{"type":31,"value":376},"把企业的角色 \u002F 实体 \u002F 关系 \u002F 流程做成结构化本体，作为系统级 Prompt 的固定上下文，\n或在 RAG 时优先召回相关本体片段。",{"type":25,"tag":49,"props":378,"children":379},{},[380],{"type":25,"tag":33,"props":381,"children":382},{},[383],{"type":31,"value":384},"（具体本体格式、注入策略、性能取舍待后续）",{"type":25,"tag":39,"props":386,"children":387},{},[],{"type":25,"tag":26,"props":389,"children":390},{"id":138},[391],{"type":31,"value":138},{"type":25,"tag":33,"props":393,"children":394},{},[395,397,402],{"type":31,"value":396},"Prompt 是表达力工具，本体是知识基础设施。",{"type":25,"tag":66,"props":398,"children":399},{},[400],{"type":31,"value":401},"两件事不能互相替代",{"type":31,"value":403},"——这是把 LLM 接进\n企业的核心方法论。",{"title":7,"searchDepth":154,"depth":154,"links":405},[406,407,408,409],{"id":28,"depth":154,"text":28},{"id":321,"depth":154,"text":321},{"id":368,"depth":154,"text":371},{"id":138,"depth":154,"text":138},"content:insights:05-llm-domain-ontology.md","insights\u002F05-llm-domain-ontology.md","insights\u002F05-llm-domain-ontology",1780542367292]