High-quality generation of dynamic game content via small language models: A proof of concept
Morten I. K. Munk, Arturo Valdivia, Paolo Burelli
TL;DR
The paper addresses the challenge of generating coherent, world-grounded dynamic game content offline, where cloud-based LLMs are impractical due to latency, cost, and accessibility. It proposes an agentic framework of narrowly fine-tuned SLMs arranged as a DAG-based network, using world-grounded, DAG-generated training data to ground behavior in a specific game world. As a proof-of-concept, the authors implement DefameLM, a single fine-tuned SLM that drives a reputational-conflict loop and is evaluated at 16-, 8-, and 4-bit quantization under a retry-until-success strategy judged by an LLM-based evaluator; results show real-time viability on consumer hardware, with 8-bit and 16-bit performing similarly and 4-bit offering speed advantages at the cost of some quality and reliability. The work demonstrates the feasibility of offline, agentic SLMs for real-time game content and outlines practical paths and challenges for extending to broader narrative tasks, including the need for local runtime quality assessment and broader ethical considerations.
Abstract
Large language models (LLMs) offer promise for dynamic game content generation, but they face critical barriers, including narrative incoherence and high operational costs. Due to their large size, they are often accessed in the cloud, limiting their application in offline games. Many of these practical issues are solved by pivoting to small language models (SLMs), but existing studies using SLMs have resulted in poor output quality. We propose a strategy of achieving high-quality SLM generation through aggressive fine-tuning on deliberately scoped tasks with narrow context, constrained structure, or both. In short, more difficult tasks require narrower scope and higher specialization to the training corpus. Training data is synthetically generated via a DAG-based approach, grounding models in the specific game world. Such models can form the basis for agentic networks designed around the narratological framework at hand, representing a more practical and robust solution than cloud-dependent LLMs. To validate this approach, we present a proof-of-concept focusing on a single specialized SLM as the fundamental building block. We introduce a minimal RPG loop revolving around rhetorical battles of reputations, powered by this model. We demonstrate that a simple retry-until-success strategy reaches adequate quality (as defined by an LLM-as-a-judge scheme) with predictable latency suitable for real-time generation. While local quality assessment remains an open question, our results demonstrate feasibility for real-time generation under typical game engine constraints.
