Ask HN:各位正在构建 AI 智能体的开发者,你们是如何提升其运行速度的?
1 分•作者: arkmm•6 个月前
由于需要跨多个系统进行协调以及链式调用大型语言模型(LLM),如今许多智能体的使用体验都可能感觉非常缓慢。我很想知道大家是如何解决这个问题的:
* 你们都是如何识别智能体中的性能瓶颈的?
* 哪些类型的更改为你们带来了最大的速度提升?
就我们而言,我们编写了一个用于分析性能的工具,以便识别缓慢的 LLM 调用 - 有时我们可以为该步骤换用更快的模型,或者我们意识到可以通过消除不必要的上下文来减少输入 token 数量。对于需要外部访问的步骤(浏览器使用、API 调用),我们已经转移到快速启动的外部容器 + 线程池以实现并行化。我们还尝试了一些 UI 更改来掩盖一些延迟。
大家还在使用哪些其他的性能增强技术?
查看原文
Because of the coordination across multiple systems + chaining LLM calls, a lot of agents today can feel really slow. I would love to know how others are tackling this:<p>- How are you all identifying performance bottlenecks in agents?<p>- What types of changes have gotten you the biggest speedups?<p>For us we vibe-coded a profiler to identify slow LLM calls - sometimes we could then switch out a faster model for that step or we'd realize we could shrink the input tokens by eliminating unnecessary context. For steps requiring external access (browser usage, API calls), we've moved to fast start external containers + thread pools for parallelization. We've also experimented some with UI changes to mask some of the latency.<p>What other performance enhancing techniques are people using?