Nunki Harmonia
Research in progress.
Research Papers
-
Functional Safety for Language Models
Michael K JohnstonNunki HarmoniaLarge language models (LLMs) are increasingly used for document and code editing, yet standard flat editing workflows generally do not expose formal assurances about the scope, structure, or side effects of their modifications. We introduce Functional Safety, a hierarchy-aware editing architecture that formalizes LLM-driven edits as typed plans over explicit hierarchies with deterministic execution. A stochastic planning stage operates on an explicit hierarchical representation and emits a structured plan of typed operations that separate structural reorganization from bounded content generation. We analyze each step with two footprints: a structural footprint (nodes whose relations may change) and a payload footprint (nodes whose local content may change), and the guarantees are scoped per step. Execution is performed by a deterministic, structure-constrained component that enforces locality, guards protected regions, preserves byte-for-byte payload outside each step's payload footprint, and confines structural changes to each step's structural footprint under the stated assumptions. We formalize the architecture, specify its invariants, and prove a Deterministic Safety theorem for correctly extracted hierarchies and valid symbolic plans. Empirical evaluations on long-form document rewriting, code refactoring, and multi-page policy briefs show improved strict success rates and lower observed side-effect rates relative to representative ReAct-style tool agents in the evaluated conditions. These results suggest that principles from functional programming—explicit structure, composability, and controlled side effects—provide a conditional and auditable foundation for LLM-driven editing, while leaving extraction, planning, and worker conformance as explicit reliability conditions.