You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix eval regression from PR#76: soften State Storage Rule (#83)
## Summary
PR #76 introduced an aggressive **State Storage Rule** in
`skills/databricks-apps/SKILL.md` that caused **16 app regressions** in
the May 19 nightly eval (8 high-impact with >0.3 score drop). Analytics
apps like `property_search_app`, `host_onboarding_checklist`, and
`cb_brickhouse_advanced` were incorrectly pushed toward Lakebase,
dropping to 0.00.
### Root Cause
The State Storage Rule auto-detected Lakebase need for any app
mentioning state-like terms ("preferences", "bookmarks"), with forceful
language ("Do not wait for the user to ask", "This is not optional")
that removed user agency.
### Changes (4 targeted edits in `skills/databricks-apps/SKILL.md`)
1. **Revert description metadata** — remove "Auto-detects need for
Lakebase when app stores state"
2. **Revert scaffolding phase reference** — remove State Storage Rule
mention from Required Reading table
3. **Replace the State Storage Rule** with softer guidance:
- Removed "preferences, bookmarks" from trigger list (too broad for
analytics apps)
- Changed "Do not wait for the user to ask" → "Ask the user" (restores
user agency)
- Removed "This is not optional" (was too forceful)
- Added explicit exclusion for analytics/dashboard apps
- **Still recommends Lakebase** for genuine CRUD/state storage needs
- **Still routes to Decision Gate** for hybrid apps (analytics + state)
4. **Revert Decision Gate skip clause** — restore original simpler
wording
### What's kept from PR#76
- All `databricks-lakebase/SKILL.md` improvements (new references, JSON
path table, pgvector)
- All `lakebase.md` reference updates (Chat Persistence Pattern,
onPluginsReady, naming conventions)
- All `model-serving.md` changes (Model Serving apps actually improved)
- Post-Deploy Verification section
## Test plan
- [x] `python3 scripts/skills.py validate` passes
- [ ] May 20 nightly eval confirms regression is fixed
Fixes: LKB-12991
This pull request and its description were written by Isaac.
Copy file name to clipboardExpand all lines: skills/databricks-apps/SKILL.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: databricks-apps
3
-
description: "Build apps on Databricks Apps platform. Use when asked to create dashboards, data apps, analytics tools, or visualizations. Auto-detects need for Lakebase when app stores state; evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation."
3
+
description: "Build apps on Databricks Apps platform. Use when asked to create dashboards, data apps, analytics tools, or visualizations. Evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation."
@@ -17,7 +17,7 @@ Build apps that deploy to Databricks Apps platform.
17
17
18
18
| Phase | READ BEFORE proceeding |
19
19
|-------|------------------------|
20
-
| Scaffolding |**⚠️ STOP — evaluate the State Storage Rule and Data Access Decision Gate below before scaffolding.** Parent `databricks-core` skill (auth, warehouse discovery); then run `databricks apps manifest` + `databricks apps init` with `--features` and `--set` (see AppKit section below) |
20
+
| Scaffolding |**⚠️ STOP — review the State Storage Guidance and complete the Data Access Decision Gate below before scaffolding.** Parent `databricks-core` skill (auth, warehouse discovery); then run `databricks apps manifest` + `databricks apps init` with `--features` and `--set` (see AppKit section below) |
| Using `useAnalyticsQuery`|[AppKit SDK](references/appkit/appkit-sdk.md)|
@@ -61,15 +61,16 @@ Build apps that deploy to Databricks Apps platform.
61
61
62
62
Before writing any SQL, use the parent `databricks-core` skill for data exploration — search `information_schema` by keyword, then batch `discover-schema` for the tables you need. Do NOT skip this step.
63
63
64
-
**State Storage Rule (evaluate BEFORE the Decision Gate):**
64
+
**State Storage Guidance (evaluate BEFORE the Decision Gate):**
65
65
66
-
If the user's app description implies storing or persisting data — forms, CRUD operations, user input, preferences, bookmarks, orders, todos, comments, votes, or any user-generated content — the app needs a Lakebase database. Do not wait for the user to ask for one.
66
+
If the user's app description involves storing or persisting data — forms, CRUD operations, user submissions, orders, todos, or other user-generated content — the app likely needs a Lakebase database.
67
67
68
-
1. Use the **`databricks-lakebase`** skill to create a Lakebase project (if one doesn't already exist) and obtain the branch and database resource names.
69
-
2. Scaffold with `--features lakebase` and pass `--set lakebase.postgres.branch=<BRANCH_NAME> --set lakebase.postgres.database=<DATABASE_NAME>`.
70
-
3. If the app **also** reads from Unity Catalog tables, proceed to the Data Access Decision Gate below to determine whether to add `--features analytics` or use Lakebase synced tables.
68
+
1.**Ask the user** whether the app needs persistent storage (Lakebase) before scaffolding. Do not silently add Lakebase.
69
+
2. If confirmed, use the **`databricks-lakebase`** skill to create a Lakebase project and obtain the branch and database resource names.
70
+
3. Scaffold with `--features lakebase` and pass `--set lakebase.postgres.branch=<BRANCH_NAME> --set lakebase.postgres.database=<DATABASE_NAME>`.
71
+
4. If the app **also** reads from Unity Catalog tables, proceed to the Data Access Decision Gate below to determine whether to add `--features analytics` or use Lakebase synced tables.
71
72
72
-
This rule governs **state storage** only. For how the app reads existing lakehouse data, proceed to the Decision Gate below. This is not optional — any app that writes user-generated data needs Lakebase.
73
+
Do NOT add Lakebase to analytics, dashboard, or visualization apps unless the user explicitly requests persistent write-back storage. Read-only data display, filters, and preferences do not require a database.
73
74
74
75
## Development Workflow (FOLLOW THIS ORDER)
75
76
@@ -80,16 +81,16 @@ If the app reads from Unity Catalog / lakehouse tables, you MUST show the compar
| Speed | Sub-second responses | Takes a few seconds |
83
-
| Best for |Search, lookups, catalogs, real-time data, operational apps | Dashboards, charts, aggregations, KPIs |
84
+
| Best for |Full-text search, typeahead, autocomplete, real-time lookups, operational apps | Dashboards, charts, aggregations, KPIs, filtered queries, browsing|
84
85
| How it works | Data synced from Delta into Lakebase Postgres | Queries run on SQL warehouse at read time |
85
86
86
-
After showing the table, add a brief recommendation. Default to recommending Lakebase synced tables (A) unless the use case is clearly about aggregations, charts, or dashboards where seconds of latency is acceptable. For lookups, searches, serving data to users, or any interactive use case, recommend Lakebase synced tables. Always let the user make the final call.
87
+
After showing the table, add a brief recommendation. Default to recommending Analytics (B) for most read-only apps — dashboards, charts, filtered queries, browsing, and aggregations. Recommend Lakebase synced tables (A) only when the app needs sub-second latency for full-text search, typeahead/autocomplete, real-time lookups by ID, or operational data serving. Note: "search" or "filter" in a prompt usually means SQL WHERE clauses (Analytics), not full-text search (Lakebase). Always let the user make the final call.
87
88
88
89
After the user chooses:
89
90
- (A) Lakebase synced tables → scaffold with `--features lakebase`. See [Lakebase Guide](references/appkit/lakebase.md) for full workflow.
90
91
- (B) Analytics → scaffold with `--features analytics`.
91
92
- Both → scaffold with `--features analytics,lakebase` if the app needs both patterns.
92
-
- If the app does NOT read UC data (pure CRUD, Genie, Model Serving), skip this gate. For pure CRUD/state apps, the State Storage Rule above already applies — scaffold with `--features lakebase`. For Genie or Model Serving, scaffold with the corresponding`--features` flag.
93
+
- If the app does NOT read Unity Catalog data (pure CRUD, Genie, Model Serving), skip this gate and scaffold with the appropriate`--features` flag.
0 commit comments