Skip to main content

Organization-level AI Context

What is organization-level context for AI?

Organization-level context allows you to define a global knowledge base and instructions for the AI. It ensures that AI responses follow your company’s business logic, terminology, and data standards.

This context typically includes:

  • Business Background: High-level information about your company’s industry and goals.
  • Operational Knowledge: Unique processes and industry nuances not captured in your AMQL formulas.
  • Response Preferences: Standardized instructions for the AI’s tone, language, and writing style.

How to add organization-level context

In Holistics, you can define your organization-level context under const ai_context = @md in the context.aml file. This context is programmable and dynamic, and can reference different objects and user attributes.

We provide an empty file to help you get started. You can find it in either of the following locations:

  • Development > Project Explorer > settings > ai
  • Your Tenant name > Organization Settings > More Settings > AI Settings

Examples

Add business background

const ai_context = @md

## Business Background:
Adventure Works sells high-quality road bikes and mountain bikes,
and cycling accessories such as bike racks, stands, tires and tubes, etc.

;;

Add AI response preference

const ai_context = @md

## AI Response Preferences
- Be concise, professional, and objective
- Always give 1-2 key insights and suggest next steps for deeper analysis

;;

Customize responses by user attribute

// You can dynamically customize AI responses based on user attributes, such as team membership. This allows different teams to receive responses tailored to their workflows and datasets.


const product_context = '''
Preferred dataset: ${products_dataset}
'''

const customer_context = '''
Preferred dataset: ${customers_dataset}
'''

const purchasing_context = '''
Preferred dataset: ${purchasing_dataset}
'''

const ai_context = @md

${
if (H.current_user.team == 'Business Analyst') {
product_context
} else if (H.current_user.team == 'Growth & Marketing') {
customer_context
} else if (H.current_user.team == 'Purchasing'){
purchasing_context
}
}

;;


Let us know what you think about this document :)