Published April 12, 2026 | Version v4

Context IR and Compiler Passes for Enterprise AI

Authors/Creators

  • 1. Independent Researcher

Description

Enterprise AI systems depend on external context, yet the dominant paradigm remains retrieval-augmented prompt stuffing: retrieve candidates, pack them into a prompt, and hope the model reasons correctly. We argue that this pipeline is structurally underpowered. The correct abstraction is compiled context: a structured, transformed, and constrained semantic artifact produced through staged lowering from heterogeneous source evidence.

This paper introduces a four-level Context Intermediate Representation (Context IR) spanning Source IR, Semantic IR, Task IR, and Execution IR, and defines a taxonomy of six compiler pass categories that transform context through canonicalization, semantic enrichment, relevance conditioning, governance enforcement, compression, and execution shaping. It formalizes context graph breaks as points where optimization-critical structure is lost, proposes policy-as-a-type-system to make governance intrinsic to compilation, and specifies a Context ABI for portability across models, agents, tools, and sessions.

This is Part 1 of the Context Compilation Trilogy, defining the representation and semantics layer for enterprise AI context systems.

Notes

This record is the standalone Zenodo preprint landing page for Part 1 of the Context Compilation Trilogy.

Version note: corrected author affiliation; a prior version listed an incorrect institutional affiliation.

Version 3 (August 2026) — erratum on experimental results. The experimental sections of the version 2 manuscript reported quantitative results that were design targets from the reference architecture, not measured outcomes from completed experiments. Version 3 relabels every such number as a design target or illustrative projection, and distinguishes them typographically from measured results. No measured claims are made in this version. The empirical program that will replace these targets with measured results is public: datasets, runner configurations, and result bundles will be checked into the companion repository as they are produced. The conceptual contributions (representations, taxonomies, algorithms, and formal definitions) are unchanged.

Files

Context_IR_and_Compiler_Passes_Letort_2026.pdf

Files (145.0 kB)

Name Size
md5:f8f5c91ff44c12f24e19e324d9d11606
145.0 kB Preview Download