Skip to main content

Enrich Context for AI

Introduction

Context is the information that guides Holistics AI to understand your specific business and analytics needs, such as business rules, goals, terms, possible values, and common analysis patterns.

What does Holistics AI use for context?

From the modeling layer

  • Dataset:

    • Metadata: name, label and description
    • relationships between data models
    • context > analysis including underlying views for View Underlying Data and breakdown groups for Drill Down & Break Down
    • tags
  • Data model:

    • Metadata: name, label and description
    • tags
  • Field:

    • Metadata: name, label, type and description
    • definition

From the reporting layer

  • Dashboard:

    • Metadata: name and label
    • blocks: visualization blocks, text blocks, controls and filters
    • tags
  • Visualization:

    • Metadata: label
    • Fields and filters used in the visualization
    • Result data (if shared with Holistics AI)

Other context sources

  • Prebuilt context by the Holistics Engineering team: Role and scope of the AI, product knowledge, feature guidelines, AQL foundations, and documentation knowledge.
  • User's current chat: Questions asked within the ongoing conversation.
  • Auto-learning context: User preferences (for example: concise responses, more suggestions)

Where can you enrich context for AI?

You can enhance AI context by adding details to:

  • description of any object: dataset, data model, field, tag
  • definition (i.e. formula) of a metric or dimension
  • context > analysis
  • tags

Object's description

Descriptions give you the most space and flexibility to add business context, synonyms, and AI instructions. See examples below:

Include business context for a dataset

dataset marketing_campaigns {
label: "Marketing Campaigns"
description: '''
This dataset lists all campaigns you run (ID, name, platform, start/end dates, etc.)
and their key metrics (spend, impressions, reach, clicks, CTR, CVR, etc.),
so you can easily compare performance across channels and creatives.
'''
}

Include synonyms for a metric

metric cvr {
label: "CVR"
description: '''
Synonyms: Conversion Rate, CR, Sign-up Rate
'''
definition: @aql ...
}

Include instructions for AI

dataset marketing_campaigns {
label: "Marketing Campaigns"
description: '''
Instruction for AI:
- Language: Always respond in both English and Chinese.
- Clarify: If user says "Facebook", clarify if they also mean "Thread" and "Instagram".
- Rounding: Show currency with 2 decimals; percentages with 2 decimal places.
'''
}

Metric and dimension definitions

For accuracy and consistency, encapsulate logic in metric and dimension formulas - especially for ambiguous terms or complex business rules.

Example of “Active User” with both description and formula:

metric active_user_count {
label: 'Active user count'
description: '''
Active users are those who placed at least one order in the previous month
'''
definition: @aql
ecommerce_orders
| where(ecommerce_orders.created_at is @(last month))
| count_distinct(ecommerce_orders.user_id)
}

Analysis context

When you customize underlying views for View Underlying Data or breakdown groups for Drill Down, you not only improve the end-user experience, you also give AI more signal.

For example, if Revenue has predefined underlying views of Orders, Users and Products, AI can surface top canceled orders, churned users, or least-selling products when investigating a Revenue drop.

Object's tags

Tags help organize and categorize models, datasets, and dashboards, benefiting both users and AI.

For example, a “verified” or “trusted” tag signals reliable content to prefer; a “deprecated” tag signals content to avoid.

How to enrich context faster?

Holistics AI includes built-in features that help you enrich data context quickly and at scale.

Create field descriptions with AI

Holistics AI helps automatically generate clear, contextual descriptions for your data fields. This helps business users to understand data fields better, as well as improve the quality of AI queries by providing better context.

Create tag descriptions with AI

Holistics AI quickly generates meaningful descriptions for your tags based on the tag name, user-provided keywords, or conventions from existing tags in your workspace. This improves documentation consistency and enhances context for other AI features.

Create metrics and dimensions with AI

As noted earlier, the most reliable way to encode context is to translate business rules into actual metrics or dimensions. Our AI Explore Data helps you quickly create these. You can always review its analysis and AQL formula before adding the field back to the dataset.


Let us know what you think about this document :)