Context Picker
The AI Context Picker property editor enables dynamic context resolution based on content hierarchy.
The AI Context Picker (Uai.ContextPicker) is a property editor that allows content editors to assign AI Contexts to content nodes. When AI operations run, the system automatically resolves contexts by walking up the content tree.
How It Works
┌─────────────────────────────────────────────────────────────┐
│ Content Tree │
│ │
│ Home (context: "corporate-brand") │
│ ├── About Us │
│ │ └── Team ← AI operation here │
│ │ (inherits "corporate-brand" from Home) │
│ │ │
│ └── Products (context: "product-focused") │
│ └── Widget Pro ← AI operation here │
│ (uses "product-focused" from Products) │
└─────────────────────────────────────────────────────────────┘When an AI operation runs on content:
The resolver starts at the current content node.
It walks up the tree to ancestors.
It finds the first context picker property with a value.
That context is used to enrich the AI operation.
The tree-walking approach allows you to set a context once at a parent level and have all descendants inherit it automatically.
Adding the Property Editor
Create a Data Type
Navigate to Settings > Data Types.
Click Create Data Type.
Name it (e.g., "AI Context").
Select AI Context Picker as the property editor.
Configuration Options
Allow Multiple
Enable selection of multiple contexts
Minimum Items
Minimum contexts required (optional)
Maximum Items
Maximum contexts allowed (optional)
Add to Document Type
Open your document type.
Add a new property.
Select your AI Context data type.
Save.

Context Resolution
Resolution Order
When an AI operation executes, contexts are resolved from multiple sources:
Content
1 (highest)
Context picker property on content (inherited up tree)
Profile
2
Context IDs configured on the AI profile
Contexts from all sources are merged, with content-level contexts taking precedence.
Content Resolution Details
The content context resolver:
Checks the current content node for a
Uai.ContextPickerproperty.If not found or empty, moves to the parent node.
Continues up the tree until a context is found.
Returns the first non-empty context found.
This enables powerful inheritance patterns:
Set brand voice at the site root.
Override with product-specific context on product sections.
Individual pages inherit from their nearest ancestor with a context.
Using Contexts in Code
Reading Context from Content
Manual Context Resolution
Resolved Context Structure
The AIResolvedContext contains:
InjectedResources
Resources with Always injection mode (included in system prompt)
OnDemandResources
Resources with OnDemand injection mode (available as tools)
AllResources
All resolved resources
Sources
Tracking information for debugging
Injection Modes
Context resources support two injection modes:
Always Mode
Resources are directly included in the system prompt:
Brand voice guidelines
Tone of voice instructions
Core writing rules
OnDemand Mode
Resources are available as tools the AI can invoke when needed:
Reference documentation
FAQ content
Optional context materials
Profile-Level Contexts
Contexts can also be assigned at the profile level:
Edit an AI Profile.
In the Settings tab, select contexts.
These contexts apply to all operations using this profile.
Profile contexts are merged with content contexts, allowing layered context strategies.
Related
Contexts - Creating and managing AI contexts
Managing Contexts - Backoffice guide
Profiles - Profile-level context assignment
Last updated
Was this helpful?