Slow Query Investigation: How an Agent Routes the Work

Most slow queries belong to two or three patterns. The agent that classifies, then routes to specialised remediation paths, and the eval suite for each path.

Classify the slow query

Slow queries split into four patterns that need four different responses. Classifying first is what makes the rest of the agent’s reasoning tractable.

Route to specialised remediation

Each pattern routes to a different remediation. Mixing them produces overconfident proposals on the wrong axis.

Eval suite per path

Each pattern needs its own test cases. A single pass-rate metric across all four hides regressions where the agent gets one pattern right and a sibling wrong.

Audit the routing

Routing accuracy is the metric that decides whether the rest of the agent works. Track it per pattern, not in aggregate.

Trust path

Trust is earned per pattern, not for the whole agent. Auto-applying every pattern at once is a recipe for an outage.