AI infrastructure · Engineering notes

How do you test an AI model for your application?

A repeatable test plan for task quality, prompt length, concurrency, latency and the cost of useful results.

Aceman engineering3 min read
In this guide

Choose examples from your own application

Use inputs you are permitted to test and include ordinary, difficult and out-of-scope examples. Agree how a person will judge usefulness and correctness. Keep a held-out set to reduce the risk of tuning only for the examples everyone has already seen. Do not turn one score into a claim about every possible task.

MeasureWhat to record
QualityTask set, judgement criteria and observed errors
LatencyQueue, first-output and complete-request distributions
CapacityContext length, concurrency and resource use
ReliabilityTimeouts, rejected requests and recovery
CostUsage or compute plus operational assumptions

Evaluation protocol. This guide describes how to run a benchmark; it does not report new Aceman benchmark results.

Measure how long people wait

Separate waiting time, time to first output and time to completion. Test context length and concurrent requests that resemble the intended operation. Record timeouts and failures as well as successful requests. Check the slowest responses too. An acceptable average can hide long waits for some users.

Keep enough detail to repeat the test

Record configuration, hardware or provider, model version and usage assumptions. Compare the complete service cost, including operation and surrounding backend work. Re-run relevant checks after a model or deployment change. If you cannot reproduce a result, treat it as an observation rather than a dependable capacity commitment.

Choose the load model deliberately

A test with a fixed number of clients can reduce its own request rate when the server slows down. That may hide the queue growth a real arrival burst would cause. Record whether your test uses fixed concurrency, scheduled arrivals or a replay of observed traffic. Include the input-length and output-length distributions, not just their averages. Repeat cold and warm runs separately. These are test-design choices to document, not evidence that one traffic model describes every product.

Measure useful results per unit of cost

Raw tokens per second can reward a model that writes too much or returns unusable answers. Define a task-level acceptance check, then report the proportion of attempts that pass it alongside latency and operating cost. Include failed requests, retries and human rework where those are part of the service. Keep the original outputs and review decisions under appropriate access controls so a changed model can be compared against the same criteria.

Record enough detail to repeat the run

Keep the model revision, tokenizer, prompt template, serving image, GPU configuration and concurrency limits with the test inputs. vLLM exposes queue, prefill, decode and end-to-end metrics; check the definitions for the version you use before combining them. Compare those server measurements with client-observed time. Repeat runs and report spread or percentiles with the sample count. A single fast response is a useful observation, not a capacity commitment.

References: vLLM production metrics

AT THE DESIGN REVIEW

The minimum test record

Use this as a report structure. The cells describe what to capture, not measured results.

Workload

CheckInput and output lengths; task categories; sample count.

Evidence to keepNormal, difficult and unsupported requests.

Load

CheckArrival pattern, concurrency and warm/cold state.

Evidence to keepQueue growth and behaviour at the capacity limit.

Quality

CheckTask acceptance criteria and reviewer decisions.

Evidence to keepFailure rate and useful completed tasks.

Performance

CheckClient latency plus engine timings and failures.

Evidence to keepPercentiles, sample counts and repeated runs.

Cost

CheckCompute, storage, network and operational inputs.

Evidence to keepCost per accepted task under stated assumptions.

Sources and editions

Checked on 11 November 2026. Links support the technical discussion; the review examples are Aceman’s engineering analysis.

  1. vLLM production metrics Current metric definitions; names vary by version
  2. vLLM optimisation and tuning Current maintainer guidance
Written by Aceman

UK software engineering across embedded systems, AI infrastructure and applications. Meet our founder and see his experience.