Skip to content
All topics

Domain

Performance engineering

Measuring and improving latency, throughput and resource use across the AI request path.

0 of 8 articles published. Topics are listed in reading order: each comes after the topics it builds on.

Understanding AI latency

Where the time goes in an AI request.

  1. Anatomy of an AI request's latencyComing soon

    Network, queueing, prefill, generation, retrieval and tool time, and measuring each separately.

    Fundamentals · Intermediate

  2. Reducing time to first tokenComing soon

    Shorter prompts, prompt caching, nearby regions and starting generation before slow work finishes.

    Performance · Advanced

  3. How prompt and output length affect speedComing soon

    Input tokens cost prefill time and output tokens cost generation time; trimming either speeds responses.

    Performance · Advanced

Speed techniques

Making AI features faster for users.

  1. Perceived latency and progressive outputComing soon

    Streaming, showing progress and rendering partial results so waits feel shorter.

    Implementation · Intermediate

  2. Parallel and concurrent model callsComing soon

    Running independent calls and retrievals concurrently, within rate limits and with clean cancellation.

    Implementation · Advanced

  3. Smaller models for faster stepsComing soon

    Routing simple steps to fast models and measuring whether the quality trade-off holds.

    Comparison · Advanced

Measuring performance

Finding the real bottleneck.

  1. Profiling an AI pipelineComing soon

    Breaking a slow request into timed steps with traces and fixing the largest step first.

    Operations · Advanced

  2. Latency budgets for AI featuresComing soon

    Setting a total budget per feature and dividing it between retrieval, model and tool steps.

    Architecture · Advanced