Resetting when AI optimizations regress
You ask an AI to optimize a C++ hot loop that processes 10M particles per frame. First pass it 'optimizes' by replacing your `std::vector` with `std::list` ('faster insertion'); frame time gets worse. You say slower; it adds `#pragma omp parallel for` over a loop with a shared accumulator — now it's a data race and the output flickers. It's confidently making it worse each turn. How do you recognize the model lacks the real bottleneck and reset?
rank_profile_hotspots(regions: list[str], self_time_pct: list[float], budget_pct: float) → list[str][["gravity_pairwise","integrate","render"],[80,12,8],75]out["gravity_pairwise"][["gravity_pairwise","integrate","render"],[80,12,8],90]out["gravity_pairwise","integrate"][["gravity_pairwise","integrate","render"],[80,12,8],0]out[]Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.