What problem does it solve?
This Skill formalizes a failure-pattern driven workflow to improve Text2SQL system prompts and reduce recurring SQL generation errors and regressions while avoiding one-off, benchmark-specific fixes.
Core Features & Use Cases
- Failure-driven iteration: Scope failing ranges, capture representative failures, cluster by behavior, and validate prompt-policy changes with reruns and regression checks.
- Policy-first prompt edits: Produce concise, durable fragment-based rules that enforce schema grounding, minimality, predicate precision, and aggregation correctness without embedding dataset literals.
- Safe guardrails: Follow explicit non-negotiables such as not changing the model-under-test, avoiding dataset-specific examples, and preferring fragment primitives over persona edits.
- Use Case: When SQL generation quality regresses across tests, use this Skill to update packages/text2sql/src/lib/agents/sql.agent.ts and packages/context/src/lib/fragments with general rules that address clustered failure classes.
Quick Start
Use this skill to refine fragment-based prompt policies for a scoped failing range and rerun only the failed records until the failure categories stabilize.