Overview

4 Engineering system performance evaluations

The chapter explains that evaluating AI systems requires looking beyond model quality and examining the engineering stack that actually delivers predictions to users. A model can perform well offline yet still fail in production if it is too slow, too costly, fragile under load, or dependent on unreliable services. Because user experience and business outcomes are strongly affected by responsiveness, the chapter argues that latency, load time, reliability, and cost should be treated as first-class evaluation concerns rather than implementation details.

It then lays out the main performance metrics and how to interpret them across different parts of the system. Frontend metrics such as Time to First Byte, First Contentful Paint, Largest Contentful Paint, and fully loaded time capture how quickly content appears and becomes usable, while backend latency and model inference metrics reveal where time is spent in request handling, retrieval, generation, and rendering. For LLM and agent systems, additional measures like time to first token, tokens per second, prompt processing time, retrieval latency, tool-call success, loop rate, and cost per request are needed because the user experience is shaped by multi-step orchestration, not just one model call. The chapter emphasizes measuring these metrics together with resource utilization and percentiles so teams can locate bottlenecks and understand tail risks.

To test systems realistically before exposing users, the chapter introduces shadow traffic and latency degradation experiments. Shadow traffic duplicates real requests into a candidate system without changing what users see, making it useful for checking whether a new model or architecture can handle production conditions, though it cannot measure user behavior impact. Latency degradation experiments intentionally add controlled delay to measure how sensitive users are to slower experiences, helping teams identify guardrails for acceptable performance. Across both methods, the chapter stresses careful capacity planning, realistic test environments, and balancing trade-offs between speed, quality, reliability, and cost so that AI features are not only accurate, but deployable and valuable in practice.

Illustrates how shadow traffic works where the current system design is invoked (black dotted box) and the new ranking backend service that invokes a v2 version of the model that is up evaluation being tested in the shadow system (blue dotted box).
illustrates how shadow traffic adds additional load to the supporting infrastructure such as feature database layer, metadata services, caches and user context lookups. This is one of the primary risks of shadow traffic that's worth over communicating so that the machine learning or platform infrastructure teams aren’t surprised by an increase in requests as a result of the shadow traffic evaluation.
illustrates evaluating the impact of latency on a website rendered on a computer. The front end client code makes a request to the backend system, where the first backend service in that architecture includes a delay that represents latency. The delay will increase latency on the product, enabling evaluations to determine what degree of latency influences user engagement and product metrics. By adding varying degrees of latency, you can have multiple test variants evaluating whether 10ms or 20ms (for example) influence user engagement and key product metrics.
illustrates the system architecture for the movie recommendations use case in a streaming app. In this scenario, latency is injected at the backend service closest to the front-end client—the personalization backend service. This service sends a request to the 'For You' ranking backend service, which handles the steps required to fetch features, perform request-time inference or micro-batched inference, and serve the model to generate the 'Trending Movies,' 'Romantic Comedy Movies,' and 'Movies Just for You' rows on the product.
shows how user interaction flows through the frontend, backend, model inference service, and data layers, each contributing to overall system latency and user experience metrics. Metrics from every layer are collected and visualized in a unified dashboard, helping teams identify bottlenecks and evaluate the real-world performance of AI models. The diagram includes example tools like Lighthouse, Datadog, and TensorFlow Serving illustrate what technologies might be used at each stage.

Summary

  • Engineering system performance evaluations help determine whether an AI-powered feature can be served reliably, quickly, and cost-effectively in production.
  • A model can perform well in offline evaluations and still fail in production if the surrounding system is too slow, too expensive, too fragile, or unable to scale.
  • Latency and load time matter because they shape the user experience. However, model inference latency is not always the same as user-visible page latency, so you should measure where the delay occurs and whether users can actually perceive it.
  • Important system performance metrics include response time, model inference time, application load time, throughput, error rates, timeout rates, fallback rates, and resource utilization.
  • For LLM systems, you should also track time to first token, time to final token, tokens per second, retrieval latency, context size, cost per request, retry rate, and fallback rate.
  • For agent systems, you should track the number of model calls, number of tool calls, tool latency, tool failure rate, step count, loop rate, and total task completion time.
  • Shadow traffic lets you evaluate a candidate model or system using production traffic without exposing users to the candidate output. It is useful for technical readiness, but it cannot measure whether users prefer the new experience.
  • Latency degradation experiments help quantify how sensitive product and business metrics are to slower performance. Because these experiments intentionally degrade the user experience for some users, they should be run with limited exposure, guardrails, and predefined stop conditions.
  • Engineering performance evaluations should be used alongside offline model evaluations, diagnostic evaluations, and A/B tests. Together, they help teams decide not only whether a model is good, but whether it is ready for production.

FAQ

What is an engineering system performance evaluation in AI?An engineering system performance evaluation checks whether the full AI-powered system can serve predictions quickly, reliably, and cost-effectively in production. It focuses on the surrounding infrastructure, not just model quality.
Why are latency and load time so important for AI products?Latency and load time directly affect user experience, engagement, and business outcomes. Even if a model is accurate, users may leave or interact less if the system feels slow.
What is the difference between model accuracy and system performance?Model accuracy measures prediction quality, while system performance measures how well the entire product experience is delivered. A highly accurate model can still fail in production if it is too slow, fragile, or expensive.
What load time metrics should be tracked for AI-powered applications?Common load time metrics include Time to First Byte (TTFB), First Contentful Paint (FCP), Largest Contentful Paint (LCP), Interaction to Next Paint (INP), Cumulative Layout Shift (CLS), and Fully Loaded Time.
What latency metrics are most useful for AI system evaluation?Important latency metrics include end-to-end latency, model inference latency, time to first token (TTFT) for LLMs, prompt processing time, retrieval latency, tokens per second, and time to final token.
What is shadow traffic and why is it used?Shadow traffic duplicates real production requests and sends them to a candidate system without exposing users to its output. It is used to evaluate technical readiness, latency, errors, throughput, and resource usage under realistic conditions.
How is shadow traffic different from an A/B test?Shadow traffic measures system readiness without affecting users, while an A/B test exposes users to different variants to measure impact on user, product, and business metrics. Shadow traffic answers whether the system works technically; A/B testing answers whether users benefit.
What is a latency degradation experiment?A latency degradation experiment intentionally adds controlled delay to the user experience to measure how sensitive users and business metrics are to slower performance. It helps teams identify latency thresholds where engagement starts to drop.
Which system metrics should be included in online performance evaluations?Key metrics include response time, model inference time, application load time, resource utilization, error rates, timeout rates, fallback rates, and for LLM/agent systems, metrics like tool-call latency and number of model calls per task.
What are the main limitations of engineering performance evaluations?Engineering evaluations can show whether a system is fast, scalable, and reliable, but they cannot tell you whether users will prefer it or whether it improves business outcomes. For that, you still need online evaluation methods like A/B tests.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • AI Model Evaluation ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • AI Model Evaluation ebook for free