Spotter 3 Shared Memory Migration: Why YAML Replacement Can Erase Production Business Rules
This article details how ThoughtSpot Spotter 3's conversational learning saves business corrections as shared memory rules, but its YAML import API uses a full-replacement mechanism that can silently delete existing production rules unless teams merge dev and prod rule sets before deployment and validate historical queries afterward.
ThoughtSpot's retail demo exposes a common ambiguity: a user asks for "best-selling items" and Spotter returns a leaderboard sorted by sales (revenue), but the business team expects units sold ( quantity purchased ). Both fields exist in the model; the query executes and returns complete results, yet the metric is wrong for the intended use case.
Figure 1: Spotter aggregates "Total sales by item type" using the sales field, shown in the filter bar.
A high-priced coat may top the revenue list while a low-margin shirt leads in volume. The same phrase "best-selling" supports two valid interpretations. Even with correct table names and executable SQL, picking the wrong metric deviates from business needs.
Figure 2: Asked for sales share, Spotter returns a date column filtered to this year.
Data teams can document field names, descriptions, and synonyms to tell the agent what sales and quantity purchased represent. But this example needs a concrete business convention: in the current retail model, "best-selling" defaults to sorting by units sold; only when the user explicitly says "by revenue" does Spotter switch to the specified metric. This convention resolves query ambiguity while letting the same model serve both replenishment and business-review scenarios.
02 Spotter 3 Writes Conversational Corrections into Shared Memory
In Spotter 3 with conversational learning enabled, users who have shared memory write permission can correct the agent directly in chat. For explicit business corrections, Spotter saves the convention as a shared rule attached to the current data model. Thereafter, other users querying the same model inherit the rule. ThoughtSpot's data model organizes fields, metrics, and queries; shared memory scope follows the model.
Shared memory stores more than "sort best-selling by units" conventions. ThoughtSpot also supports query recipes . For example, a validated weekly dashboard defines which fields, granularity, and filters to use; Spotter can generate a recipe from that Liveboard and reuse it for similar questions. Business rules help the agent map a term to a metric; recipes provide a ready-made query pattern for a class of problems.
Figure 3: Memory sources page lists memories by Liveboards, Reference questions, Business terms, with a Status column showing generation state.
As teams continuously use the model, shared memory accumulates conventions across stores, products, finance, etc. An easily overlooked detail: ThoughtSpot documentation states that even if the data model later renames columns or redefines metrics, old memories remain on the model . Previously correct recipes may reference deprecated fields. Teams must care not only whether a rule is saved, but whether it still applies to the current model.
These corrections happen in daily chat. At cross-environment release time, the workflow changes: export the dev model's shared memory to YAML, then import into the production model. ThoughtSpot introduced this Beta migration API in version 26.8.0.cl . On November 16, industry outlet nl2sql.ai further covered the official wrong-column example and migration flow.
Conversational learning lets authorized users add rules to the current model; the migration API moves a set of already-saved rules. Both operations change the agent's available shared memory, but migration also involves the target model's existing content.
03 YAML Import Uses Replacement — Old Rules May Be Wiped
Walk through a simplified release using the retail scenario.
Assume the production retail model already holds two shared rules: one defines "net sales" as gross minus refunded amount; another defines "this week" as starting Monday. The dev team recently fixed the best-selling ambiguity, adding a rule "best-selling defaults to units sold." Testing confirms the new leaderboard returns the correct metric. However, the dev-exported YAML contains only this new rule, not the two existing production conventions .
ThoughtSpot's shared memory import API locates the target data model via datamodel_sources in the YAML. On actual import, the interface replaces the target model's existing shared memory with the file's content . In this rehearsal, the two old production rules are removed and the new rule is written. The replacement scope is the shared memory entries on the data model referenced by the file.
This design has clear use cases: initializing a new model with curated rules, or migrating an entire model's shared memory to another environment. The difference is that an existing model may hold more content. For a live production model, the release file must contain the complete shared memory that should remain after deployment.
Dev and prod rules are not guaranteed to stay in sync. Finance may correct the refund definition in prod while dev fixes the sales sort. Both sides accumulate rules via conversational learning, and divergence grows. Exporting only dev's latest file misses what prod added; keeping prod as-is loses the tested fix. Rules from both sides must be merged before release .
Worse, the new rule working does not prove the whole release is correct.
The business user who reported the issue re-asks "recent best-selling items"; if Spotter returns a units-sorted list, they consider the fix successful. But another person asks "this week's net sales" tomorrow — the original refund and week-start rules may be gone. What date range the agent uses and whether it deducts refunds now depend on whatever other definitions exist in the model. Whether old rules were removed is determinable from the release content and import behavior; which queries are affected still requires hands-on verification .
04 Pre-Release Diff Check, Post-Release Historical Query Validation
To push the sales-sort rule to prod, first know what prod already has.
One approach: baseline on prod's current shared memory, export it, then fold in dev-validated new rules. In the retail case, the final YAML should retain three conventions : net sales deducts refunds, week starts Monday, best-selling defaults to units sold. Review compares before/after; the only business change is the new sales rule, while refund and date conventions stay.
Cross-environment also requires verifying data model identifiers and referenced columns. Dev and prod may each have a model named "Retail Sales," but model IDs and field configurations may differ. Which model the file references and which fields it uses must be confirmed before import.
ThoughtSpot's migration API provides dry_run to preview import impact. The response shows how many shared memory entries the target model currently has, how many will be deleted, and how many will be written. In the simplified rehearsal, submitting only the new sales rule shows two old rules replaced while the file contains one. Putting all three rules in the file still triggers a replace operation, but the original two conventions are re-written via the file.
Deletion count reflects replacement scale; whether rules truly persist requires checking written content.
Automated deployment cannot rely on HTTP status codes alone . ThoughtSpot docs note VALIDATION_FAILED can accompany HTTP 200, meaning the request was received but the import file failed validation. Release scripts must read the response body's status to confirm outcome.
Even if dry_run passes, business correctness is not guaranteed. Dry-run mainly validates file structure and model ID resolution; whether referenced fields exist in prod and whether calculation logic still holds needs separate verification. For instance, dev may identify "refunded" via a flag column, while prod requires deriving refunds from order status. The YAML imports successfully, yet the refund definition may still be wrong .
Finally, accept with real queries. After release, start a fresh conversation, re-ask "best-selling items" using a sample where revenue rank differs from volume rank , confirming Spotter uses the units-sold column. Then ask "this week's net sales" with cross-week data containing refunded orders, checking week-start and refund deduction. Where possible, also inspect the actual fields, filters, and results the agent uses.
Test data must expose metric differences. If revenue and volume rankings happen to match, or the test week has no refunds, wrong rules can still produce seemingly correct results . Questions already answered correctly in dev must be re-validated in prod; previously working queries cannot be skipped just because they weren't modified this release.
This release only aimed to make "best-selling" sort by units. But under the full shared-memory replacement API, the release file decides which rules the target model ultimately keeps. When adding a new correction, legacy conventions like refund definition and week start must also be included in the release payload .
The sales leaderboard is fixed; the next day finance queries "this week's net sales" and should still get results matching the original business definition. Both questions must pass to confirm the change didn't carry away old rules.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
