Skip to Content
LLM 网格 (Chinese Edition)
book

LLM 网格 (Chinese Edition)

by Kurt Muehmel
January 2026
Beginner to intermediate
150 pages
1h 9m
Chinese
O'Reilly Media, Inc.
Content preview from LLM 网格 (Chinese Edition)

第4章 代理型应用程序的性能测量 与监控

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

既然我们已经了解了各种LLM服务的成本模型,接下来让我们探讨如何衡量LLMs的性能——以及基于它们构建的智能体应用程序的性能。请记住,所有这些工作的目标在于:能够为特定应用程序定义所需的性能水平,然后找到以最低成本实现该性能水平的方法。

但首先,我们所说的性能究竟指什么?实际上存在两种截然不同的概念:

  • 生成的响应质量。换言之,生成的响应与应用程序需求的契合程度。这是本章的核心议题,因为测量LLM响应质量属于新兴领域,而LLM网格能为应用开发者创造显著价值。

  • 服务响应速度,即生成回复的时效性。本章末尾将简要探讨此项监测,因其与DevOps领域监测API服务速度和响应能力的成熟实践相似。LLM网格只需捕获这些指标即可。

在质量与速度两大维度下,还存在若干子维度。图4-1以树状图形式展示了这些维度与子维度。

Tree diagram illustrating the dimensions and subdimensions of agentic application performance, focusing on speed with latency and throughput, and quality with intrinsic and extrinsic elements.
图4-1. 智能代理应用性能评估的维度 与子维度

后续章节将深入探讨这些维度。但首先让我们阐述性能测量如何融入LLM网格架构。

基于LLM网格的评估方法弥补了其他方案的局限性:完全分布式评估与完全集中式监控。尽管每种方法各有优劣,但在LLM网格中实施评估将带来诸多长期效益。表4-1对这些方法进行了对比。

表4-1. 企业级代理应用性能评估的架构范式对比
完全分布式评估 基于应用程序的集中式监控 LLM网格中的评估
描述 为每个代理和应用程序构建评估系统。 集中式应用程序捕获日志以实现集中监控。 评估作为服务提供给所有LLM服务和代理。
优势 易于启动和定制。 符合应用程序性能监控的现有范式。

应用程序、智能体和多智能体系统可动态调用评估功能。

分布式评估随分布式开发扩展。

全公司范围内维持统一评估框架

评估组件的可复用性促进标准制定与效率提升

缺点 中央IT部门缺乏为代理程序应用程序设置诊断和修复流程的能力。 缺乏企业级全球质量标准。 评估结果难以有效推动适应性调整与行为优化。 监控探针针对的是单体应用程序,而非可复用组件。 企业正迎来全新的应用范式。

实施LLM网格时应遵循以下原则:

  • 提供共享服务用于性能测量与监控

  • 允许开发者在应用程序的不同层级灵活调用该服务

首先,将性能测量与监控工具作为共享服务提供至关重要,原因有二:其一是效率——避免应用开发者在不同应用中重复开发相似的基础功能;其二是统一性——确保不同LLMs与智能体应用间的性能可比性。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Azure上のLinux (Chinese Edition)

Azure上のLinux (Chinese Edition)

Ned Bellavance, Chris Hayner

Publisher Resources

ISBN: 0642572316242