Skip to content

Semantic Layer | AI Context [Draft]

3 min read · Updated 23 Oct 2026

AI Context allows Semantic Layer admins to define shared business context and custom instructions for AI capabilities across Astrato workbooks.

The context is stored directly in the Semantic Layer and automatically made available to downstream AI-powered features.

This creates a reusable source of truth for:

  • Business terminology

  • KPI definitions

  • Data caveats

  • Preferred response style

  • Important rules and exclusions

  • Company-specific acronyms and language

AI Context behaves similarly to custom instructions for AI, but scoped to the Semantic Layer.


Semantic Layer → AI Context

The AI Context tab sits alongside:

  • Data

  • Data Explorer

  • Developer View

  • UDFs


AI Context helps AI features:

  • Understand your business terminology

  • Interpret metrics correctly

  • Avoid common misunderstandings

  • Apply company-specific rules

  • Generate more accurate summaries and insights

  • Maintain consistency across workbooks

The context is automatically passed to downstream AI capabilities connected to the Semantic Layer.


Add any context that helps AI understand your business and data better.

Recommended areas:

  • Business overview and goals

  • Key definitions and metrics

  • Important data notes and rules

  • Terminology and acronyms

  • Preferred response style

  • Any caveats or exclusions


Gross Margin should always exclude refunded orders.

Store performance should prioritize same-store growth where possible.

Customers are considered active if they purchased within 90 days.

ARR refers to Annual Recurring Revenue.

Pipeline values should use weighted pipeline unless specified otherwise.

Forecast categories follow Salesforce forecast stages.

Churn Rate = Lost Customers / Starting Customers.

Expansion Revenue includes upgrades and seat increases only.

MRR excludes one-time onboarding fees.


AI Context supports long-form text.

Recommended best practices:

  • Keep instructions clear and structured

  • Use bullet points where possible

  • Include definitions for important metrics

  • Avoid contradictory instructions

  • Focus on business context rather than technical implementation details


  • AI Context is stored at Semantic Layer level

  • Changes persist after save/reload

  • Updates apply to connected AI features after save

  • Empty AI Context is supported

  • AI Context is shared across connected workbooks using the Semantic Layer


Users must have permission to edit the Semantic Layer in order to modify AI Context.

Users without edit access can still benefit from AI Context through downstream AI capabilities.


Parameters help avoid duplicating AI Context across multiple Semantic Layers or customers.

Typical use cases include:

  • OEM and embedded analytics

  • Multi-tenant deployments

  • White-label products

  • Localization

  • Environment-specific AI behaviour

  • Customer-specific terminology

  • Dynamic branding

Parameters allow AI Context to become dynamic and reusable across tenants, customers, regions, brands, or environments.

Instead of hardcoding values directly into the context, placeholders can be inserted and populated at runtime.

ℹ️ If a parameter is not passed through dynamically, the configured default value will be used.


Parameters use double curly bracket syntax: #{{PARAMETER_NAME}}

Example:

You are an analytics assistant for #{{COMPANY_NAME}}.Focus on #{{PRIMARY_KPI}} when discussing performance.

Use the:

+ Add Parameter

button within the AI Context editor.

Each parameter supports:

Property

Description

Name

Internal parameter name

Placeholder

Generated placeholder syntax

Default Value

Fallback value if parameter is not passed through

Description

Optional explanation of the parameter

Type

Text, Number, Boolean (future support)


Default values for parameters in AI Context

Section titled “Default values for parameters in AI Context”

Default values ensure AI Context continues working even when parameters are not dynamically supplied.

Example:

Parameter

Default Value

COMPANY_NAME

Bike Sales

PRIMARY_KPI

Revenue

CURRENCY

USD

If COMPANY_NAME is not passed through at runtime, it automatically resolves to the default value: Bike Sales

You are an analytics assistant for #{{COMPANY_NAME}}.Primary reporting currency is #{{CURRENCY}}.Focus on #{{PRIMARY_KPI}} when discussing performance trends.