The Context System
Aliveo AI’s Context System is how you teach the platform to read your data the way your business does. Context isn’t code—it’s plain-English instructions, definitions, and conventions—but it powers every chat, dashboard, and automation agent on the platform.
This guide walks through the three levels of context, how they cascade, and where to set each one.
The Three Levels
Context is layered, from broadest to narrowest:
| Level | Scope | Typical contents |
|---|---|---|
| Global Context | Organization-wide | Company-wide vocabulary, KPI definitions, acronyms, brand voice |
| Org Context | A single line of business | LoB-specific KPIs, campaign-naming conventions, market hierarchies |
| Account Context | A single (or a small group of) ad accounts | Account-specific exclusions, attribution windows, market mappings |
Each level can stand on its own, and each level inherits from its parent.
A useful mental model: Global is the company glossary, Org is the playbook for one team, and Account is the post-it note on a specific ad account.
How Cascading Works
When Aliveo AI runs against a specific ad account, it resolves an effective context in this order:
- Start with the Global Context for the organization.
- Compose with the Org Context for the active line of business.
- Compose with the Account Context for the specific account(s) involved.
Each level can either add to or override what its parent says. The composed result is what Aliveo reads when planning, generating code, validating answers, or summarizing.
Cascading in practice
- Define “ROAS = revenue ÷ ad spend” at the Global level once—every account inherits it.
- Override it at the Org level for a business that uses gross profit instead of revenue.
- At the Account level for one campaign type, exclude branded-search conversions from the numerator.
You’ll see the inherited blocks rendered inline (with visual dividers) on each context page so you can see what is being inherited vs. added at that level.
Metric-Aware Resolution
Context can become long. Aliveo AI doesn’t shove the whole tree into every prompt—it pulls only what’s relevant.
- A metric resolver detects which KPIs your question is about and surfaces the matching definitions, formulas, and exclusions.
- An account resolver matches your question to the right accounts and limits context to the ones in scope.
- Metric hints on custom data columns (revenue, cost, KPI, dimension, date) let the resolver wire raw warehouse columns into the right semantic role.
You don’t have to think about this—it happens automatically. The takeaway is that more context doesn’t slow your queries down; only what’s relevant is loaded.
Setting Global Context
Global Context lives under My Account → Global Documents and applies to every business and every account inside your organization.
- Open My Account → Global Documents.
- Click Global Context.
- In the editor, describe org-wide rules in plain English. Useful starting points:
- Acronyms — e.g. “BOF means bottom-of-funnel; TOF means top-of-funnel.”
- KPIs and formulas — e.g. “Primary KPI is CAC, defined as ad spend ÷ new customers.”
- Tone — e.g. “Use full month names in narrative summaries; never abbreviate.”
- Click Save. The page also records who last saved it and when.
Global Context cascades down—Org and Account context will both inherit it.
Setting Org Context
Org Context is set per business / line of business and overrides or extends Global.
- Open My Account → select the business in the left rail.
- Open the Org Context tab.
- Use the Include inherited toggle to view (or hide) inherited Global Context blocks.
- Add this business’s own rules below. You can:
- Add brand-new instructions that don’t exist globally.
- Override a Global rule by restating it explicitly here.
- Click Save. Aliveo records the author and timestamp for traceability.
When you save Org Context that materially conflicts with Global, the UI prompts you to acknowledge the conflict. Resolve it explicitly so future readers know it was intentional.
Setting Account Context
Account Context is the narrowest scope. You attach it directly to an integration (e.g. a specific Google Ads account) or to a small set of integrations.
- Open My Account → select a business → pick a connected ad account.
- Open the Account Context tab.
- Choose Applies to these accounts—the same account-context block can be shared across multiple accounts that follow the same rules.
- The page shows the effective inherited prose (Global + Org) above your editor; toggle it on/off as you write.
- Write or paste in account-specific instructions. Examples:
- “For account X, attribution model is last-non-direct click; ignore view-through conversions.”
- “Campaigns prefixed with
_TEST_are experiments—exclude from rollups.” - “KPI for app-install campaigns here is CPI, not CAC.”
- Attach knowledge documents—taxonomy sheets, brand books, partner agreements—so the AI can read them when this account is in scope. See Knowledge Documents.
- Click Save.
Composability
You don’t have to pick between “inherit everything” or “write everything fresh.” At any level you can:
- Inherit + extend — start from the parent and add more rules below.
- Inherit + override — restate a single rule with different wording; only that rule is replaced.
- Disable inheritance — for unusual accounts, untick the Include-inherited toggle and write a fully bespoke block.
The “Learn about context” dialog inside the UI walks through these patterns with examples.
How to Tell It’s Working
Two ways to sanity-check that your context is being used:
- Account Context Pie Check — on the Account Context page, the pie indicator shows how many feasible questions, KPIs, and tags from this account are explained by your current context. A larger filled slice = more coverage.
- Run a chat — start a new chat scoped to the account and ask about an acronym, KPI, or campaign exclusion you defined. The answer should reflect your wording.
If something didn’t apply, two common culprits are:
- The chat or workflow was scoped to a different business / account than where you saved context.
- A higher-level (more specific) context is overriding what you wrote at a broader level.
Best Practices
- Start global, narrow down. Encode shared vocabulary once at Global; reserve Org and Account context for true exceptions.
- Be concrete about KPIs. Spell out the formula, the data source, and any exclusions.
- Name campaign conventions. If you have a naming scheme like
[Geo]_[Funnel]_[Brand]_[Date], write it down—Aliveo will use it to auto-tag campaigns. - Document exclusions. “Ignore campaigns containing the string
_archive” is more useful than a list of campaign IDs that goes stale. - Revisit periodically. Context is living text; saved-by/saved-at metadata helps you know when it’s time for a refresh.
For the architecture behind cascading context and how it plugs into the Data Knowledge Graph, see How Context Works.