Write down the business rules behind your data, such as which date to use or whether revenue is net, so Luzmo's AI agents interpret your data the way your team does.
In this article
AI Context lets you add business rules and interpretation notes to the datasets, columns, formulas and dashboards used by the Analyst agent, the Chart agent, and the Dashboard agent.
Names, descriptions, and data types are useful, but they don't capture the rules your team applies every day. AI Context is where you write those rules, directly on the object they describe. The Analyst agent, the Chart agent, and the Dashboard agent read them when the related object is relevant. AI Context is guidance that shapes interpretation. It isn't a hard filter or a permission.
Use it to explain things like:
AI Context is optional. Empty (or whitespace-only) context is ignored and changes nothing.
Put guidance where it belongs: a field's meaning on the column or formula, dataset-wide rules on the dataset, and audience or purpose on the dashboard.
Rules that apply to the whole dataset.
This dataset contains completed orders only. Cancelled orders are excluded.
* Use `order_date` for sales trend questions.
* Revenue is net of refunds and excludes VAT.
* Fiscal years start in April.
Field-specific meaning, caveats, or units.
Negative values represent refunds. Do not treat them as data errors.
This is the account creation date, not the first purchase date.
Especially helpful for ambiguous names, coded values, custom metrics, dates, and monetary fields.
How a formula should be used: which questions it answers, what it excludes, or which variant of a metric it calculates.
Gross margin excludes shipping costs and refunds. Use this formula for product profitability questions.
Guidance for a specific dashboard experience: its audience, purpose, and interpretation.
This dashboard compares regional sales performance.
North America includes the United States and Canada only.
Use net revenue unless the user explicitly asks for gross revenue.
Dashboard AI Context helps the Dashboard agent, and the Analyst agent when a conversation is scoped to that dashboard, answer in a way that matches the purpose of the dashboard, not only the raw datasets behind it.
AI Context is one of several places context can come from. The others are the embed token's custom prompt and, for custom chat or agentic builds, context on the AIPrompt API request itself. These layers are additive: a dataset-level rule doesn't override a column-level one, and AI Context doesn't override the custom prompt. AI Context helps with dataset disambiguation, but it isn't always sufficient on its own. For reliable "always use X for Y" rules, combine it with the custom prompt. See Analyst agent implementation tips and tricks for the full picture of where each type of context belongs.
Add it when a smart person could still misread your data from names and descriptions alone:
status, type, value, date, or amountYou don't need it everywhere. Start with the fields that cause the most confusion, or the questions the Analyst agent answers least reliably.
The AI Context editors appear once AI-powered features are enabled on your account (they're hidden in the embedded dataset editor). You can add AI Context in these places:
Write specific, short, operational rules the Analyst agent can apply.
Use `completed_at` for fulfillment timing. Use `created_at` only for order creation.
An active customer has at least one paid invoice in the last 90 days.
Rows with `test_account = true` are internal test data. Exclude them from business summaries.
`mrr` is monthly recurring revenue in EUR, already normalized to a monthly value.
Markdown (bullets, short headings, code formatting) keeps context easy to scan. Keep it concise: Luzmo sends up to about 2,000 characters of dataset and dashboard context and about 500 characters of column context to the AI, so put the most important rules first.
Avoid context that is broad, stale, or misplaced.
is_internal_account = true."Never store secrets, credentials, or personal data in AI Context, and don't use it to enforce access. It's guidance for the AI, not a security control. Use permissions and your data model for anything that must always apply. And keep each field focused on the object it describes.
A column called revenue with no context leaves the Analyst agent guessing whether it's gross or net, includes refunds, or includes tax. Add:
Revenue is net of refunds and excludes VAT.
Negative revenue values represent refunds.
Use `order_date` for revenue trends.
Now the Analyst agent has the business rules it needs to interpret revenue questions more consistently.
Build a small set of questions your users actually ask, and compare answers with and without the context:
Because AI answers can vary between runs, test a few times. AI Context helps most when a question depends on hidden business meaning. It won't fix a wrong chart, aggregation, or dataset choice, which need separate data modeling or Analyst agent quality work.
No. Descriptions stay useful for people and general metadata quality. AI Context specifically guides AI behavior with business rules and caveats.
No. Empty or whitespace-only AI Context is ignored.
No. It's one shared text field for all languages. Unlike names and descriptions, it isn't localized.
No. Start with high-impact fields: metrics, dates, statuses, IDs, coded values, and fields users often misread.
Yes. The Analyst agent reads the text you write (the source, not rendered HTML), so bullets, short headings, and code-formatted field names all help.
No. It guides interpretation; it isn't a database constraint, permission rule, or guaranteed query filter. Use your data model and access controls for hard enforcement.
Yes. AI Context is exposed as ai_context on the relevant API resources, which is useful for syncing it from another system or managing it programmatically.