The Analytics Agent often skipped required steps such as data-discovery or full source searches, leading to incomplete answers.

This caused inaccurate results and higher risk of misleading metrics.

The team solved it by: 👉 Built paired test suites for required and skip cases per compliance rule. 👉 Ran a loop that drafts, scores, and validates up to four prompt or skill edits per iteration. 👉 Accepted only edits that improved required cases, did not break skip cases, and passed regression checks.

The parts that matter: 1️⃣ Analytics Agent - answers data-related questions by searching tables, dashboards, and metrics 2️⃣ data-discovery skill - helps locate the right tools or sources for a query

Compliance reached 89.3% across tuning and validation cases while preserving existing behavior.

The loop limited changes to a few files and a few dozen lines, shrinking the allowed edit size over time. This prevented large rewrites but required many small iterations, and after the first accepted edit later rounds added no gain.

How do you balance the need for rapid iteration with strict regression guards in your own LLM-driven tools?