LLM-friendly URL

Managing AI context

AI context lets you add plain-text business context to dashboards, datasets, columns, and formulas. Luzmo IQ uses dataset, column, and formula AI context to produce more accurate answers and charts, while dashboard AI context lets you store dashboard-level business context for AI-enabled workflows. Use it for knowledge that is not obvious from a technical name, expression, or short description, such as metric definitions, business rules, caveats, reporting conventions, or how a dashboard should be interpreted.

AI context enriches the existing name and description. It does not replace them.

ℹ️

AI context is available for dashboards, datasets, columns, and formulas.

The field is called ai_context in the Core API. It is plain text, nullable, and shared across all languages. Unlike name or description , it is not an internationalized object.

When to use AI context

Use AI context when Luzmo IQ needs extra meaning to answer a question correctly:

  • A dataset contains order lines, but refunds are stored as negative revenue.

  • A column has a technical source name, but business users know it as "Net revenue".

  • A dashboard should be interpreted as executive reporting, not operational monitoring.

  • A formula has exclusions, fiscal calendar rules, or tenant-specific definitions.

Keep the content concise and factual. Write context for the AI assistant, not for end-user display.

API behavior

Dashboards and datasets are both securables, so use the securable endpoint for them. Columns and formulas use their own endpoints.

Resource Endpoint Type or identifier Field
Dashboard /0.1.0/securabletype: "dashboard"ai_context
Dataset /0.1.0/securabletype: "dataset"ai_context
Column /0.1.0/column Column ID ai_context
Formula /0.1.0/formula Formula ID ai_context

Set ai_context to null to clear it.

Use attributes when you want to retrieve ai_context . It is not part of text search, so do not use find.search.keyphrase to search inside AI context.

The API stores and returns the full value. Luzmo IQ may shorten long dataset, column, and formula context only when rendering prompts.

Dashboard AI context

Set AI context on a dashboard with the securable update action:

set-dashboard-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/securable \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<dashboard id>",
    "properties": {
      "ai_context": "Use this dashboard to answer executive questions about monthly revenue, pipeline, and churn trends."
    }
  }'

Retrieve it by adding ai_context to find.attributes :

get-dashboard-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/securable \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "find": {
      "where": {
        "id": "<dashboard id>",
        "type": "dashboard"
      },
      "attributes": ["id", "name", "ai_context"]
    }
  }'

Clear dashboard AI context by sending null :

clear-dashboard-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/securable \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<dashboard id>",
    "properties": {
      "ai_context": null
    }
  }'

Dataset AI context

Set AI context on a dataset with the same securable update action:

set-dataset-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/securable \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<dataset id>",
    "properties": {
      "ai_context": "Use this dataset for order and revenue analysis. Revenue fields are stored before tax unless explicitly named otherwise."
    }
  }'

You can retrieve dataset AI context and column AI context in one request:

get-dataset-and-column-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/securable \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "find": {
      "where": {
        "id": "<dataset id>",
        "type": "dataset"
      },
      "attributes": ["id", "name", "ai_context"],
      "include": [
        {
          "model": "Column",
          "attributes": ["id", "name", "ai_context"]
        }
      ]
    }
  }'

Clear dataset AI context by sending null :

clear-dataset-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/securable \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<dataset id>",
    "properties": {
      "ai_context": null
    }
  }'

Column AI context

Set AI context on a column with the column update action:

set-column-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/column \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<column id>",
    "properties": {
      "ai_context": "Treat this field as net revenue before tax. Negative values represent refunds or chargebacks."
    }
  }'

Retrieve it by adding ai_context to find.attributes :

get-column-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/column \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "find": {
      "where": {
        "id": "<column id>"
      },
      "attributes": ["id", "name", "ai_context"]
    }
  }'

Clear column AI context by sending null :

clear-column-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/column \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<column id>",
    "properties": {
      "ai_context": null
    }
  }'

Formula AI context

Set AI context on a formula with the formula update action:

set-formula-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/formula \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<formula id>",
    "properties": {
      "ai_context": "Gross margin excludes shipping costs and refunds. Use this formula for product profitability questions."
    }
  }'

Retrieve it by adding ai_context to find.attributes :

get-formula-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/formula \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "find": {
      "where": {
        "id": "<formula id>"
      },
      "attributes": ["id", "name", "expression", "ai_context"]
    }
  }'

Clear formula AI context by sending null :

clear-formula-ai-context.sh
bash
curl -X POST https://api.luzmo.com/0.1.0/formula \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "version": "0.1.0",
    "key": "<your API key>",
    "token": "<your API token>",
    "id": "<formula id>",
    "properties": {
      "ai_context": null
    }
  }'

Best practices

Write AI context as short, direct notes that explain business meaning:

  • Define ambiguous metrics and business terms.

  • Call out exclusions, caveats, and sign conventions.

  • Prefer stable business rules over temporary observations.

  • Keep dataset-level context broad and column- and formula-level context specific.

Avoid adding sensitive information that should not be visible to users who can access the dashboard, dataset, column, or formula metadata.

Did this page help you?
Yes No