Ontology-Driven Agentic AI System — Merchandising & Data Science
Microsoft + Anthropic · Frugal AI · Modular · Autonomous · No interactive user at runtime · V5
🧠 Anthropic Claude
☁ Microsoft Azure
⚡ Frugal AI · Token Economy
🔗 Enterprise Integration
Data Sources
Input Layer
Decision Processing
Shared Knowledge
Builder Agents
Artifacts Library
Intelligence Layer
Agent Library
ML / Analytics
MCP Framework
Frugal AI
Output
Integration
FLOW
8 steps · ontology-driven · orchestration determines complexity · agent auto-selects LLM/model · write-back to enterprise
1
Data Sources
External+Enterprise
2
Input Layer
Biz+Data Ontology
3
Knowledge
Factory
4
Builder
Agents
5
Artifacts
Library+KG
6
Intelligence
Layer
7
Output
Layer
8
Integration
Write-back
⬛ FRUGAL AI · CROSS-CUTTING
⬛ MCP · CROSS-CUTTING
SHARED KNOWLEDGE
Tenant-agnostic · preloaded
● Retail KPI base
● Ontology patterns
↳ KPI definitions · benchmarks · retail norms
feeds factory
Decision Processing → combined outputs → Output Layer
← Intelligence Layer returns results · Decision Processing combines & delivers
↑ results
DATA SOURCES
3 integration surfaces · symmetric read & write-back
EXTERNAL SYSTEMS
connected via API · write-back capable
↔ API · event-driven · read & write-back
Relex
Anaplan
Blue Yonder
+ and others
CLOUD SYSTEMS
platforms · storage · processing
AWS
Azure
GCP
Snowflake
Databricks
DATA STORAGE
enterprise systems (ERP · operational)
SAP
Oracle
MS Dynamics
Workday
DATA ENTITIES · queried at runtime
queried at runtime · shared across all sources
sales_transactions
product_catalogue
pricing_history
promotion_events
inventory_positions
store_hierarchy
customer_segments
competitor_prices
seasonal_calendar
merch_financials
range_attributes
supplier_data
merch_kpis_actuals
cluster_attributes
KPI actuals → Shared Knowledge / KPI base
🧠 Intelligence overlay on all data entities
KPI targets & definitions → Shared Knowledge
external
+ cloud
APIs →
→ C1 Input
storage & entities →
LAYER 1 · INPUT LAYER
Ontology-driven · setup phase
Business Ontology
User & Business Team Defined · Setup
GOALS & STRATEGY
Goals & KPIs
Business rules
Guardrails
CONSTRAINTS
Financial targets
Brand / trade rules
Seasonal calendars
doc · sheet · slide · text
→ parsed by Biz Ontology Builder
Merch KPIs NOT here → Retail KPI base
KPI targets from Shared Knowledge
↕
Created from Data Sources ←
Data Ontology
SCHEMA & STRUCTURE
Schema & data dictionary
Entity relationships
Metadata & lineage
Semantic types
SYSTEM MAPPINGS
Relex schema mapping
Anaplan model structure
Blue Yonder data contracts
ERP table definitions
→ parsed by Data Ontology Builder
→ used to construct Knowledge Graph
business
context →
data
schemas
↑ DO→C2
LAYER 2 · DECISION PROCESSING
01
Read Knowledge &
Invoke Builders
KPI base + ontologies
→ invoke builders (setup only)
builds + caches artifacts & KG
← reads Artifacts Library & KG
02
Plan & Invoke
Intelligence Layer
Orchestration determines
task complexity
Routes: agent · ML · analytics
→ Frugal AI routing
→ instantiates via MCP
→ parallel execution possible
03
Combine & Deliver
Orchestrate all outputs
Synthesise component results
→ Output Layer
↓ via flow corridor below
ORCHESTRATION NOTE
Orchestration determines complexity
Agents auto-select LLM / model
invoke
builders →
PRIMARY
← artifacts
← KG
→ Factory
LAYER 3 · BUILDER AGENTS &
ARTIFACTS LIBRARY
BUILDER AGENTS · SETUP PHASE
Parse ontologies → produce artifacts
Biz Ontology
Builder
→ YAML · guardrails
→ system prompts
Data Ontology
Builder
→ schema maps
→ KG construction
← Business Ontology
← Data Ontology
produces ↓
ARTIFACTS LIBRARY
Own library · cached runtime
YAML configs
Guardrails
Schema maps
Column defs
System prompts
KNOWLEDGE GRAPH
Own library · entity-aware
Client-specific
Entity relations
Causal links
Semantic graph
Context vectors
Consumed by Factory (C2) ← reads at every runtime request
SETUP PHASE (one-time)
Builder agents invoked → produce artifacts
Artifacts & KG cached · versioned
RUNTIME PHASE (per request)
Factory reads cached artifacts & KG
Intelligence Layer invoked per task
KG refreshed on data change
Factory Step 02 → invokes Intelligence Layer at runtime
↓ invoke
→ Layer 4
LAYER 4 · INTELLIGENCE LAYER
3 parallel libraries · agent auto-selects model · governed by Frugal AI
Artifacts Library & KG consumed by Factory (C2) · passed as context payload to agents at invocation
FRUGAL AI FRAMEWORK
LLM auto-selection · agents choose capability tier per task complexity, cost & speed
TOKEN OPTIMISATION
prompt compression · context scoping · output caching · response length · result reuse
AGENT LIBRARY
LLM-powered · tool-use via MCP
ACTIVE AGENTS
Pricing
Promotion
Demand Forecast
Price Elasticity
Trend Analysis
Assortment
AVAILABLE IN LIBRARY
Inventory replen.
Range planning
Space planning
● Active ○ Available
AUTO-SELECTS LLM/MODEL
task complexity · cost
per Frugal AI banner ↑
ML & MODEL LIBRARY
Statistical · ML · Optimisation
FORECASTING
SARIMA / SARIMAX
Prophet
XGBoost / LightGBM
REGRESSION/CAUSAL
OLS / Ridge / Lasso
Double ML / DML
ETS / Holt-Winters
OPTIMISATION
Constraint optimiser
K-Means clustering
SHAP / explainability
NLP · ANOMALY
Embedding models
Anomaly detection
DIAGNOSTIC
Causal inference
Attribution analysis
DESCRIPTIVE
ANALYTICS
Token-free · no LLM required
Aggregations & pivots
KPI dashboards
Trend reports
Rule-based alerts
Threshold monitoring
Data slicing
Ad-hoc comparisons
↑ Zero LLM token cost
Max cost efficiency
For complex analytics:
→ Agent Library
→ ML Model Library
Simple cases only
No LLM instantiation needed
MCP TOOLING FRAMEWORK · CROSS-CUTTING
Connects: Artifacts Library · Agent Library · ML Library · Descriptive Analytics
routes all tool calls · authentication · typed results returned to Factory
ML model tools
Data warehouse tools
Rule engine tools
External API tools
PER-TASK EXECUTION PATTERN
Orchestration selects library type → agent auto-selects LLM tier (Frugal AI) → MCP routes tool calls → typed JSON
Factory combines all component results → Output Layer · results cached where applicable
results →
LAYER 5 · OUTPUT LAYER
AI decisions · plans · insights
DECISION OUTPUTS
Pricing
Optimised prices
Scenario analysis
Promotion
Discounts & eligibility
Uplift forecasts
Demand fcst
SKU-level projections
Trend + KPI signals
Inventory
Replenishment signals
Allocation decisions
Financial
OTB budget recs
Margin targets
Assortment
Range decisions
Whitespace gaps
Space Planning
Fixture allocation
Category adjacency
Supplier & Sourcing
Reorder signals
Lead time optimisation
Customer & Loyalty
Segment offers
Churn risk signals
Markdown & EoL
Clearance timing
Discount depth by SKU
expected system capability · operationalise AI outputs
WRITE-BACK DESTINATIONS
close the loop · operationalise AI outputs
EXPECTED SYSTEM CAPABILITY
EXTERNAL SYS
Relex · Anaplan
Blue Yonder · o9
forecasts · plans
OTB · write-back
CLOUD SYSTEMS
AWS · Azure
GCP · Snowflake
predictions · audit
ML feedback
DATA STORAGE
SAP · Oracle
MS Dynamics
pricing · POs
master data
↩ closes loop · writes back to source systems
refreshes Layer 1 inputs · next planning cycle
1
2
3
4
5
6
7
8
9
10
11
12
① Data Sources
·
② Input Layer
·
③ Knowledge Factory
·
④⑤ Builder Agents + Artifacts & KG
·
⑥ Intelligence Layer · Agent Library · ML & Model Library · Descriptive Analytics · Frugal AI banner
·
⑦⑧ Output + Integration