Tracing Agent Latency Before Changing Models
A 掘金 article argues that slow Agent responses often originate in tools, retrieval, sandboxing, or orchestration rather than the model itself. Its 30-second example attributes three seconds to model reasoning and 25 seconds to a search tool waiting on repeated website retries, making tracing the central diagnostic step. The article then surveys tool interfaces, process-aware evaluation, retrieval metrics, browser automation, sandboxing, prompt-injection defenses, RAG versus fine-tuning, graph-based workflows, and criteria for avoiding unnecessary Agent architectures.
The article provides a practical diagnostic checklist for Agent engineers, emphasizing measurement before model swaps or architectural changes.
一次响应花了 30 秒。
接到反馈的第一反应是模型太慢,换个更快的。
挂了 Trace 才看清这 30 秒花在哪。模型思考 3 秒,剩下 25 秒卡在一个搜索工具上。那个工具在等一个网站的重试,一次一次地等。
换模型能把 3 秒压到 2 秒。然后继续等那 25 秒。
Agent 的问题,很多看着像模型的问题,其实不是。
这类问题常见的有二十几个,散在检索、工具、沙箱、编排各个层面。怎么做反而是次要的。难的是判断哪里出了问题。
#GraphRAG#LangGraph#OpenManus#Playwright#vLLM#Anthropic#Daytona#E2B