Table of Contents
Fetching ...

Generative Ontology: When Structured Knowledge Learns to Create

Benny Cheung

TL;DR

Generative Ontology addresses the problem of structural hallucination by marrying ontology-driven grammar with large language models. It encodes domain knowledge as executable schemas (Pydantic) and uses a multi-agent, retrieval-augmented pipeline to produce creative yet valid designs. The Mycelium: The Deep case study demonstrates complete tabletop game specifications generated from theme to mechanics, components, and balance. The approach generalizes to any domain with a scalable validity grammar, offering a practical path to grounded, creative design across fields.

Abstract

Traditional ontologies excel at describing domain structure but cannot generate novel artifacts. Large language models generate fluently but produce outputs that lack structural validity, hallucinating mechanisms without components, goals without end conditions. We introduce Generative Ontology, a framework that synthesizes these complementary strengths: ontology provides the grammar; the LLM provides the creativity. Generative Ontology encodes domain knowledge as executable Pydantic schemas that constrain LLM generation via DSPy signatures. A multi-agent pipeline assigns specialized roles to different ontology domains: a Mechanics Architect designs game systems, a Theme Weaver integrates narrative, a Balance Critic identifies exploits. Each agent carrying a professional "anxiety" that prevents shallow, agreeable outputs. Retrieval-augmented generation grounds novel designs in precedents from existing exemplars, while iterative validation ensures coherence between mechanisms and components. We demonstrate the framework through GameGrammar, a system for generating complete tabletop game designs. Given a thematic prompt ("bioluminescent fungi competing in a cave ecosystem"), the pipeline produces structurally complete, playable game specifications with mechanisms, components, victory conditions, and setup instructions. These outputs satisfy ontological constraints while remaining genuinely creative. The pattern generalizes beyond games. Any domain with expert vocabulary, validity constraints, and accumulated exemplars (music composition, software architecture, culinary arts) is a candidate for Generative Ontology. We argue that constraints do not limit creativity but enable it: just as grammar makes poetry possible, ontology makes structured generation possible.

Generative Ontology: When Structured Knowledge Learns to Create

TL;DR

Generative Ontology addresses the problem of structural hallucination by marrying ontology-driven grammar with large language models. It encodes domain knowledge as executable schemas (Pydantic) and uses a multi-agent, retrieval-augmented pipeline to produce creative yet valid designs. The Mycelium: The Deep case study demonstrates complete tabletop game specifications generated from theme to mechanics, components, and balance. The approach generalizes to any domain with a scalable validity grammar, offering a practical path to grounded, creative design across fields.

Abstract

Traditional ontologies excel at describing domain structure but cannot generate novel artifacts. Large language models generate fluently but produce outputs that lack structural validity, hallucinating mechanisms without components, goals without end conditions. We introduce Generative Ontology, a framework that synthesizes these complementary strengths: ontology provides the grammar; the LLM provides the creativity. Generative Ontology encodes domain knowledge as executable Pydantic schemas that constrain LLM generation via DSPy signatures. A multi-agent pipeline assigns specialized roles to different ontology domains: a Mechanics Architect designs game systems, a Theme Weaver integrates narrative, a Balance Critic identifies exploits. Each agent carrying a professional "anxiety" that prevents shallow, agreeable outputs. Retrieval-augmented generation grounds novel designs in precedents from existing exemplars, while iterative validation ensures coherence between mechanisms and components. We demonstrate the framework through GameGrammar, a system for generating complete tabletop game designs. Given a thematic prompt ("bioluminescent fungi competing in a cave ecosystem"), the pipeline produces structurally complete, playable game specifications with mechanisms, components, victory conditions, and setup instructions. These outputs satisfy ontological constraints while remaining genuinely creative. The pattern generalizes beyond games. Any domain with expert vocabulary, validity constraints, and accumulated exemplars (music composition, software architecture, culinary arts) is a candidate for Generative Ontology. We argue that constraints do not limit creativity but enable it: just as grammar makes poetry possible, ontology makes structured generation possible.
Paper Structure (46 sections, 6 figures, 6 tables)

This paper contains 46 sections, 6 figures, 6 tables.

Figures (6)

  • Figure 1: A sample Game Ontology expressed as an OntoUML class diagram. The Game root entity decomposes into Player, Mechanism, and Component aggregates, each with typed relationships (hasPlayer, hasMechanism, hasComponent) that mirror the domain structure a Generative Ontology must capture and enforce.
  • Figure 2: LLM potential plus ontology constraints yields valid design. Generative Ontology transforms a passive vocabulary for description into an active grammar for creation.
  • Figure 3: Multi-agent pipeline architecture. Generative agents build sequentially (Mechanics $\to$ Theme $\to$ Components); critic agents evaluate in parallel; refinement addresses identified issues before final assessment.
  • Figure 4: Knowledge System architecture. A unified Retriever Service dispatches queries to ChromaDB (semantic vector search) or SQLite (structured fallback), drawing on a BGG corpus of 2,000 games with 384-dimensional embeddings, mechanism types, and filterable metadata.
  • Figure 5: Case study: the design conversation. Each agent builds on the previous, with critics providing feedback that drives refinement before final assessment.
  • ...and 1 more figures