Model AI
Model AI is the assistant panel beside a semantic model in DataPrism, in the model editor or beside a report. Ask it to read the model, check it for problems, and change it: measures, columns, BI tables, relationships, field parameters and tests. This page covers how it behaves while it works, so you know which changes happen on their own, what it checks before saving, and the limits it works within. Opening the panel, picking a mode and deciding its cards are covered on Model AI.
Two things shape everything else. First, Model AI works on one model: the one its panel sits beside. It reads that model's objects afresh as it works, and it does not reach into other models or around the model into the database. Second, its changes are live: there is no draft copy waiting for a save, so a change takes effect at once, and every change can be undone afterwards. The conversation belongs to the model and is shared by everyone who can edit it.
Choose how changes are accepted
The acceptance mode decides how much Model AI does on its own. Three modes exist: Manual, Auto-accept (the default) and Unrestricted.
- Manual holds every change for your approval.
- Auto-accept lets everyday changes go through and holds the riskier ones, such as changes to measures that charts use.
- Unrestricted runs changes without asking, with the exceptions below.
Two rules cut across every mode:
- A destructive change waits unless the mode is Unrestricted.
- Removing a BI table waits in every mode, Unrestricted included: it is permanent and cannot be undone.
While a change waits, three things hold:
- The answer stops at the card. Model AI does not carry on with other work, and the change is not made while it waits: the message reads "Awaiting human approval. This change has NOT been made." One card covers one message, even when several changes wait.
- You decide the card: approve the change to let it run, or reject it; you can also stop a held call from its card. A rejected or stopped change was not made, and Model AI never retries it unchanged. Say why you rejected it, and it can propose something different next time.
- While a session views DataMind OS as another user, Model AI is read-only: it changes nothing, and a held call is refused.
The same mode system serves DataMind OS's other AI editors; which modes each editor offers and which of its actions always wait differ per editor.
Versions and unsaved edits
- A write to an existing object carries the version Model AI last read of it. If someone else changed the object since, the write is refused instead of overwriting the newer state, and Model AI continues from the fresh version.
- Unsaved edits are protected. If you are editing a measure with unsaved changes, Model AI asks before it changes or deletes it.
Finish a measure task
When you ask for a measure, Model AI works through the same steps, and "done" has a fixed meaning.
- It reads first: the objects involved, their columns, the existing measures, and samples of the data where the numbers depend on them. It asks you only for calls that are yours: which date defines a period, whether cancelled orders count, gross or net, which currency. When the data contradicts the request, it says so instead of building something wrong.
- It tests the measure before saving it, and cross-checks the numbers a second way. A difference is explained before the work goes on, never quietly kept.
- Saving runs the tests first. When a measure changes, the tests of every measure whose SQL changed, and of the measures that depend on them, run against the new SQL. A test that fails, errors or cannot run refuses the whole save and lists the tests: nothing is stored until they pass.
- It leaves the measure finished: its tests (usually about five of them), a description, a format and a folder; and the model's documentation is updated when the model's structure changed.
Done means all of it: tested and cross-checked, saved, every test passing with none left unrun, and the model's health check clean on the objects it touched. While it works, Model AI reports a status: done, in progress, waiting for approval, blocked or failed, one meaning each.
The rules the saved SQL must follow are on How measures run, and generating or repairing a single measure in the measure editor is on Write DataPrism measures with AI. Running and reading tests yourself is on Measure tests, and the health check is on Check, document and trace a model.
Row-level security and the numbers you see
- A query Model AI runs for you applies your row-level security, so its answer respects what you can see.
- Its other reads, its test runs and the model's checks do not apply it. A number from those can cover rows that a viewer would not see, so treat it as wider than the reports you read. Row-level security and View as explains the rules.
- Model AI never changes row-level security, reports or charts. It reads and explains the rules and can suggest changes, but the edit is yours.
How much one message can do
Every message works within fixed budgets:
- 20 tool calls per message. Every read, query, test run and change counts as one.
- 12 objects per change, and at most 240 objects written in one message.
- Data reads: at most 500 rows per read, up to 80 reads per message, and up to 400,000 characters of data in all.
- Whole-model reads: capped at 150,000 characters; above that, Model AI reads the objects the task needs instead.
- Query-cost checks have their own budget: up to 40 estimates, 24 measurements, 6 analyses and 10 what-if runs per message. Query cost explains the modes.
Undo a change
- Each change can be undone right after it arrives, using Revert under it in the chat, or later from the model's History tab under AI changes; Change history describes the trail.
- Undoing needs the same access as using Model AI itself.
- Model AI does not bring a reverted change back on its own: it asks before redoing one.
Questions, answered
Does Model AI work on more than one model?
No. Each panel is bound to the one model it sits beside, and Model AI changes only that model. It reads the model's objects afresh as it works, and it does not touch other models or read around the model into the database.
Does Model AI keep working while a change waits for my approval?
No. The answer stops at the card, and the change is not made while it waits: "Awaiting human approval. This change has NOT been made." Decide the card to let the change run or to reject it.
Will Model AI try the same change again after I reject it?
No. A rejected change was not made, and it is never retried unchanged: "An editor of this model rejected this change, so it was NOT made." Say why you rejected it and ask again, and Model AI can propose something different.
Why does Model AI ask about a definition before building?
Because the call is yours, not its: which date defines a period, whether cancelled orders count, gross or net, which currency. It also stops when the data contradicts the request. It asks in one pass instead of guessing.
Why did my measure save get refused?
The tests blocked it. When a measure change is saved, the tests of every measure whose SQL changed, and of the measures that depend on them, run first against the new SQL. A test that fails, errors or cannot run refuses the whole save and the tests are listed; nothing is stored until they pass.
What happens if someone edits an object while Model AI is working on it?
The write is refused instead of overwriting the newer state. Every write carries the version Model AI last read, and an object changed since fails that check; Model AI continues from the fresh version.
How much can one message do?
At most 20 tool calls; up to 240 objects written and 12 in a single change; 80 data reads of 500 rows each and 400,000 characters of data; a whole-model read capped at 150,000 characters. Query-cost checks have their own budget of 40 estimates, 24 measurements, 6 analyses and 10 what-if runs.
Which of Model AI's numbers are narrowed by row-level security?
A query it runs for you applies your row-level security. Its other reads, its test runs and the model's checks do not, so those numbers can be wider than what a viewer sees; treat them as wider than the reports you read.
Can Model AI change my reports or row-level security?
No. Reports and charts are outside its reach, and row-level security is read-only for it: it reads and explains the rules and can suggest changes, but the edit is yours.
What do the status words in a Model AI update mean?
done means the finish line is met: tested, cross-checked, saved, tests passing and the check clean. in progress means work continues. waiting for approval means a card is pending. blocked means someone must clear a refusal before it can go on. failed means it stopped after the same error three times.