How do you regression-test a Genie space or agent when a table or metric view changes underneath it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2026 07:43 AM
I hope this is useful for anyone running Genie spaces or agents past the demo stage. This is a question more than a recommendation, because I have not found a pattern I fully trust yet.
The situation: a Genie space or an agent sits on top of a handful of tables or a Unity Catalog metric view. Someone renames a column, changes a join key, redefines a measure, or backfills a table, and the answers shift without any error. The SQL still runs. The number is just different, or the wrong table gets picked. Nothing in the usual pipeline tests catches that, because the pipeline itself is healthy.
What I am trying to work out:
1) What do you use as the regression set? Genie spaces have benchmark questions with reference SQL, and some teams keep a separate golden set outside the space (30 to 50 questions with a reviewed answer each). Do you keep both, and where does the set live (the space, Git, a table)?
2) What counts as a pass? Exact SQL match is too strict (equivalent queries differ). Result-set equality is better but breaks when data legitimately moves. Do you compare against a pinned snapshot, a tolerance on the numbers, or an LLM judge for the explanation text?
3) What triggers the run? On every deploy of the bundle, on a schedule, or when lineage says an upstream table or metric view of the space has changed? Has anyone wired the system.access lineage tables to decide which spaces to re-test?
4) Cost and speed: how long does your set take to run, and do you run the full set or a sample on each change?
5) Who owns a failing test, the data engineer who changed the table or the person who owns the space?
If you already have this running, even a rough description of the loop would help. And if you decided it was not worth building, I would like to hear why.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2026 07:59 AM
Whenever you got an update on this, I look forward to read it. By now I'm facing the same issues with the same answer (nothing I trust fully yet)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2026 09:05 AM
A practical pattern that works for other customers:
-
Regression set: Keep both. Use the Genie benchmark set for authoring and fast feedback; keep a versioned golden set in Git or a Delta table as the source of truth. Start with 20–50 business-critical questions, including 2–4 phrasings per intent. Genie supports up to 500 benchmarks.
-
Pass criteria: Compare result sets, usually with deterministic ordering removed and numeric tolerance applied. Pin the gold query to a Delta snapshot or explicit “as-of” date when data movement is expected. Use an LLM judge only for Agent-mode narrative quality. Chat benchmarks compare generated results with the SQL Answer; Agent mode uses an LLM judge.
-
Triggers: Run a smoke subset on every agent/config deployment, the affected-domain subset when UC metadata or upstream assets change, and the full suite nightly or before promotion. Lineage is useful for selecting impacted spaces, but I would treat it as an optimization because semantic changes and metric-definition changes may not be obvious from lineage.
-
Cost and speed: Keep the smoke set small—roughly 10–20 high-risk questions—and run the full 30–50-question suite asynchronously. Record latency, query cost, generated SQL, result hashes, and failure category. Genie benchmarks can run all questions or a selected subset.
-
Ownership: Make the space owner accountable for the failing user contract, with the data owner responsible for upstream schema and semantic changes. Route failures by category: wrong metric/join → space owner plus data owner; changed data expectation → data owner; wording or explanation issue → space owner.
The key design choice is to separate semantic regression from data freshness: validate against a pinned snapshot for stable scoring, then run a smaller freshness/invariant suite against current data. Genie’s built-in scoring already tolerates row/column order and small numeric rounding differences, so it is a good baseline rather than rebuilding a comparator immediately.
No need to build a separate harness initially. Start with native benchmarks plus Git-managed metadata for ownership, snapshots, thresholds, and lineage mappings. Add an external runner only when you need CI/CD gating, cross-space reporting, or lineage-based selection. Benchmarks are explicitly intended to be rerun after changes to instructions or metadata.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2026 11:09 PM
Lu's pattern covers the loop well. Two additions aimed at the exact failure you describe, where the SQL still runs and the answer just moves:
1. Assert on the structure of the generated SQL, not only the result. For each golden question, store the tables or metric view and the key columns/filters it must touch (and any it must not). A result-set compare can pass by luck or fail because data moved; "picked orders_v2 instead of orders" or "dropped the region filter" is caught deterministically, independent of freshness. sqlglot is enough to parse the Genie SQL and pull out table and column references.
2. Use a schema/definition fingerprint as a trigger next to lineage. Per space, hash the column names, types and comments of its tables (information_schema.columns) plus the metric view definition, and keep the hash with the golden set. A small scheduled job recomputes it, and any change re-runs that space's subset. That catches renames and measure redefinitions that never show up as a new lineage edge, for one query per space.
The fingerprint also answers your ownership question: if the hash changed, the failing test goes to the data owner with the diff attached; if the hash is unchanged and the test still fails, it belongs to the space owner (instructions, examples or model behavior moved).
Has anyone put the golden set in a Delta table and run it through mlflow.genai.evaluate, so Genie regressions land next to the rest of their agent evals?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2026 12:26 AM
The distinction between semantic regression and data freshness is important. I'd also want to track whether a change in the underlying metric definition actually changes the business answer, even when the generated SQL still runs successfully.
The schema/definition fingerprint idea is interesting because it could help trigger targeted tests instead of rerunning every question after every change.
One thing I'm curious about: how would you handle a metric definition change that is technically valid and intentional, but causes existing benchmark answers to change? Would you update the expected results through an explicit review process before allowing the change into production?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2026 03:27 AM
Treat Genie like any other data product with a contract. Keep a golden set in Git, run it through the Genie Conversation API, compare result sets with tolerances rather than SQL text, and trigger runs from lineage and deploys. A silent shift is only caught if something compares answers over time.