Deep Dive

The .onto Format

A proprietary domain specification language that turns business knowledge into executable intelligence. Not a schema. Not a prompt. A compiled reasoning engine.

01 — Overview

What is .onto?

.onto is a domain-specific language created by Ontos for encoding business intelligence in a format that AI agents can compile, reason over, and execute at scale.

It combines what traditionally required 5+ separate tools: entity modeling, rule engines, knowledge graphs, data quality tooling, and AI orchestration — all in one human-readable file that compiles in milliseconds.

// ═══════════════════════════════════════════════════════
// domain: consumer_goods_intelligence.onto
// version: 2.4.1
// ═══════════════════════════════════════════════════════

// ── Base Entities ────────────────────────────────────────

entity Brand {
  name: String @required
  parent_company: Company @relation
  market_share: Float @confidence
  segments: [ConsumerSegment] @relation
  products: [Product] @relation
}

entity Product {
  name: String @required
  brand: Brand @relation
  category: Enum["beverage", "snack", "dairy", "frozen"]
  sku: String @unique
  price_point: Currency
  distribution: [Retailer] @relation
  launch_date: Date
  status: Enum["active", "discontinued", "planned"]
}

// ── Inheritance ──────────────────────────────────────────

entity CompetitorProduct extends Product {
  competitor: Company @relation
  threat_level: Enum["low", "medium", "high", "critical"]
  overlap_segments: [ConsumerSegment] @relation
  price_delta: Float @derived  // vs our equivalent SKU
  source: Provenance @tracked
}

entity ConsumerSegment {
  name: String @required
  demographics: Map<String, String>
  size_estimate: Integer @confidence
  growth_rate: Float @confidence
  preferences: [String]
}

// ── Provenance Tracking ─────────────────────────────────

source NielsenIQ {
  type: "syndicated_data"
  reliability: 0.92
  refresh: weekly
  fields: [market_share, distribution, price_point]
}

source InternalSales {
  type: "first_party"
  reliability: 0.99
  refresh: daily
  fields: [revenue, volume, returns]
}

source SocialListening {
  type: "unstructured"
  reliability: 0.68
  refresh: hourly
  fields: [sentiment, trends, mentions]
}

// ── Inference Rules ─────────────────────────────────────

rule competitive_threat_detection {
  match product: CompetitorProduct
  where product.status == "active"
    and product.overlap_segments.any(
      s => s.growth_rate > 0.05
    )
    and product.price_delta < -0.10
  then {
    flag: "competitive_threat",
    severity: "high",
    confidence: 0.84,
    action: recommend("pricing_review", {
      product: product.name,
      segments: product.overlap_segments,
      suggested_response: "price_match_or_differentiate"
    })
  }
}

rule market_gap_opportunity {
  match segment: ConsumerSegment
  where segment.growth_rate > 0.08
    and segment.size_estimate > 500000
    and not exists(
      p: Product where p.brand.parent_company == self
        and p.segments.contains(segment)
    )
  then {
    flag: "market_gap",
    severity: "medium",
    confidence: min(
      segment.size_estimate.confidence,
      segment.growth_rate.confidence
    ),
    action: alert("product_development", {
      segment: segment.name,
      estimated_tam: segment.size_estimate * avg_revenue_per_consumer,
      competitors_present: count(
        cp: CompetitorProduct
        where cp.overlap_segments.contains(segment)
      )
    })
  }
}

rule distribution_erosion {
  match product: Product
  where product.status == "active"
    and product.distribution.count() < 
        product.distribution.count(lookback: 90d) * 0.85
  then {
    flag: "distribution_erosion",
    severity: "critical",
    confidence: 0.91,
    action: alert("sales_ops", {
      product: product.name,
      lost_retailers: product.distribution.diff(lookback: 90d),
      revenue_at_risk: estimate_revenue_impact(product)
    })
  }
}

02 — Consolidation

What .onto replaces

Six categories of tooling, collapsed into a single format.

Database schemas

SQL / ERD

.onto

Typed entity graphs

Rule engines

Drools, Camunda

.onto

Inference rules

Knowledge graphs

RDF / OWL / SPARQL

.onto

Compiled domain model

Data quality tools

Great Expectations

.onto

Provenance + confidence calibration

BI dashboards

Tableau, Power BI

.onto

Real-time reasoning + alerts

AI orchestration

LangChain, custom glue

.onto

Agent-native execution

03 — How It Works

The compilation pipeline

From human-readable specification to real-time intelligence in six steps.

01

Author

Domain experts and engineers write .onto files. Human-readable, version-controlled, code-reviewed like any source code.

02

Compile

The Ontos compiler validates the domain model, checks constraints, resolves inheritance, and produces a Domain Intermediate Representation (IR).

03

Load

Data flows in from connected sources — documents, APIs, databases. The engine extracts entities and maps them to the .onto schema with provenance tracking.

04

Reason

When new data arrives, the engine evaluates all inference rules against the full entity graph. Rules fire based on pattern matching with confidence scoring. Sub-millisecond execution.

05

Act

Fired rules produce structured outputs: alerts, recommendations, reports, API calls. AI agents consume these as typed, confidence-scored intelligence — not raw text.

06

Learn

The gap detector identifies data the model doesn't capture yet and proposes schema extensions. Source reliability calibrates against ground truth over time.

04 — RAG vs .onto

Why not just use RAG?

Retrieval-Augmented Generation retrieves text. Ontos reasons over structure. The difference is fundamental.

RAG

Retrieves text chunks by embedding similarity — a search engine with an LLM wrapper.

.onto

Encodes the structure of a business. Traverses typed relationships, evaluates rules, returns confidence-scored answers with provenance.

RAG

Hallucinates because it has no ground truth. Similarity ≠ correctness.

.onto

Every value is typed, sourced, and confidence-scored. Ground truth is built into the model.

RAG

Can't reason forward. Only answers questions — never anticipates them.

.onto

Fires inference rules proactively. Detects threats before anyone asks.

RAG

Degrades with scale. More chunks = more noise = worse retrieval.

.onto

Improves with scale. More entities = more connections = more intelligence.

// Example: "What's our competitive exposure in zero sugar?"

// RAG: searches for "competitive exposure zero sugar"
//      → returns 5 text chunks → LLM guesses

// .onto: Brand → Product[category="beverage", tags contains "zero sugar"]
//        → CompetitorProduct[overlap_segments]
//        → evaluate pricing_rules → check distribution_data
//        → return confidence: 0.87, sources: [NielsenIQ, InternalSales]

05 — vs RDF/OWL

Why not RDF/OWL?

RDF and OWL were designed for the semantic web — linking web pages, not running businesses. We took the useful concepts and made them practical.

Syntax

Verbose XML/Turtle that requires PhD-level expertise to author and debug.

Human-readable, code-like syntax. Any engineer can read it in minutes.

Rules

No built-in inference rules. Need separate tools (SWRL, Jena, custom reasoners).

Embedded inference rules with pattern matching, confidence scoring, and actions.

Provenance

No native provenance tracking, confidence scoring, or gap detection.

Every value tracks its source, reliability score, and freshness. Gaps are auto-detected.

Performance

SPARQL queries over large graphs measured in seconds to minutes.

Compiled to IR. Full rule evaluation in sub-millisecond execution.

Agents

Not designed for AI agents. Requires significant middleware to be useful.

Agent-native from day one. Typed outputs with confidence scores that agents consume directly.

06 — The Agent Era

Built for the agent era

LLMs are powerful but blind — they don't know your business. .onto gives them structured sight.

Structured context at scale

.onto models give agents typed, relational context that scales far beyond token limits. No more stuffing prompts with text.

Typed graph reasoning

Agents reason over entity graphs with formal relationships — not text chunks with embedding similarity.

Confidence + provenance

Every answer comes with confidence scores and source citations. Agents know what they know — and what they don't.

Compounding intelligence

The model gets smarter with every data feed, every correction, every new source. Intelligence compounds over time.

Proactive detection

Inference rules fire automatically when new data arrives. Threats and opportunities surface before anyone asks.

Domain-portable

Same engine works for PE due diligence, CPG competitive intelligence, financial compliance, energy risk management. Swap the .onto file.

See .onto
in action.

The best way to understand .onto is to see it running on your data.