Study FAQ
How do I trace the cause of a slow generative AI response?
Also asked as 2
- How can I locate the bottleneck in an AI request trace?
- How do I use critical-path timing to diagnose a slow model-powered response?
Answer
Start with the actual request and the user's timing symptom, then examine the permitted trace for operations and waits on its completion path. A slow final response alone does not identify the cause.
Confirm the request/correlation reference, time zone, deployment/configuration and whether the problem concerns first output or final completion. Establish whether timing begins at the client, application entry or a dependency. A model duration excludes work before and after that call.
Follow recorded parent/child relationships, waits, errors and repeated attempts. Do not sum a parent span and its children as sequential work; parallel operations overlap. An off-critical-path dependency may not explain the delay, while an uninstrumented gap may matter even if visible calls are fast.
Compare a permitted similar known-good request, controlling useful context such as task, revision, context size and tool path. Use that comparison to form one hypothesis, then test a narrow correction under comparable conditions. Verify the full response boundary and correctness as well as stage timing. A faster model call is insufficient if the final answer still arrives late.
Foundry uses OpenTelemetry and Application Insights, but visible detail depends on actual instrumentation and captured data. Keep material missing evidence explicit.
Microsoft Learn
Full explanation
AI-300: Tracing Slow or Incorrect Generative AI Responses
Study guide · AI-300
Read the full explanation