arXiv:2609.00759cs.CLSep 2026

Manuscript Offprint

arXiv:2609.00759

Compile, Don't Memorize: A Context Compilation Architecture (CCA) for In-Context Learning

Jinhu Qi, Minda Hu, Wentao Zhang, Weiqiang Jin, Yanyu Chen, Junli Wang, Irwin King

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models (LLMs) increasingly handle in-context learning (ICL) tasks where a long, novel context defines the rules, knowledge, and output schema for a series of questions. On benchmarks that grade against every detail of the context, even strong open-weights models pass only 12–16% of tasks: a single overlooked rule fails the whole response. We argue this brittleness is structural: the dominant “read-and-reason” paradigm asks the model to extract, plan, generate, and self-verify in one forward pass. We therefore ask whether explicit context compilation can fix it, how it compares to existing long-context strategies (gist retrieval, multi-agent self-play), and where the resulting harness benefit holds across task structure and model scale. We propose the Context Compilation Architecture (CCA), whose central novelty is a typed intermediate representation (IR) with fixed slots (rules. {must_do, must_not, conditional}, output_spec, available_tools, data_profile) into which any prose context is compiled once; executable verifiers and a violation-gated correction loop follow as downstream consequences. On CL-bench (1,899 tasks across 4 open base models), CCA outperforms vanilla prompting and two long-context baselines (ReadAgent-P, Ctx2Skill) on every base model, lifting Kimi K2.5 from 15.4% to 21.4% with gains concentrated on rule-dense sub-categories. Code and cached completions are available at https://github.com/TonyQJH/cca-emnlp2026.

1 Introduction

Modern LLMs are routinely deployed in scenarios where a single conversation contains tens to hundreds of thousands of characters of novel context (domain documentation, multi-agent workflows, custom DSLs, complex business rules), and the model is asked to comply with this context

across many downstream questions. Benchmarks designed for this setting, such as CL-bench (Dou et al., 2026), grade responses against detailed rubrics: each of 5–20 criteria per question must be met, and a single missed constraint marks the task as failed. Empirically, even strong open base models pass only 12–16% of such tasks under vanilla prompting (Table 1).

We hypothesize that the issue is not raw reasoning capability but a saturation of the read-and-reason pipeline: any single constraint is usually within reach, yet the model is asked to perform extraction, planning, generation, and self-verification simultaneously in a single forward pass, and small details fall through the cracks. As context length grows and rubrics multiply, the joint probability of catching every required element collapses.

We draw inspiration from movable type printing. Before Bi Sheng's 11th-century invention, reproducing a new page required carving an entire fixed wooden plate that was expensive, inflexible, and single-use. Movable type changed this by introducing a two-stage workflow: a compositor first reads the new manuscript and selects individual type pieces into a custom plate; only then does the press mechanically reproduce the page. We argue current ICL methods resemble fixed-plate printing: the model carries pre-trained “plates” (memorized procedures) and tries to adapt them by force to whatever context arrives. Instead, we propose to compile the context: treat the raw input as a manuscript, extract the typed pieces (rules, entities, exact terms, output schema), and assemble them into an executable plate that mechanically verifies and produces the answer.

Concretely, we introduce the Context Compilation Architecture (CCA), whose central novelty is a typed context representation: the compiled IR — a fixed-slot JSON vocabulary — is the representational contract the rest of the pipeline consumes, and executable per-context verifiers plus a violation-gated correction step follow as downstream consequences, not co-equal contributions. Where Self-Refine (Madaan et al., 2023), Ctx2Skill (Si et al., 2026), and ReadAgent-P (Lee et al., 2024) operate on prose throughout, this representational shift turns the “did I remember everything?” question into the mechanical “did my code-verifier pass?”.

CCA is, in modern terms, a concrete instance of harness engineering (Böckeler, 2026): the emerging discipline that treats the LLM as a frozen reasoning utility and derives production reliability from the surrounding pipeline.

Running example. Task 54ff6369 (14 rubrics): Compiler yields 50 rules, CodeGen synthesizes verifiers, Reasoner-1 drafts, 4 violations flagged, Reasoner-2 fixes only those—CCA 14/14 vs vanilla fail.

Research questions. We organize the paper around three questions any context-compilation harness must answer. RQ1 (Effectiveness): does explicitly compiling context into a structured IR with executable verifiers improve pass rate on rubric-graded ICL relative to vanilla prompting, and which CCA components are responsible for the improvement? RQ2 (Comparison with existing strategies): how does explicit context compilation compare to gist-memory retrieval (ReadAgent-P) and self-play skill libraries (Ctx2Skill) under rubric-based grading, and which design properties of each method are well- or poorly-matched to this evaluation regime? RQ3 (Where and for whom): where does the compilation harness help most, and how does the benefit scale with the underlying model's capacity and with the task's structural density?

Contributions. (RQ1) We introduce CCA, a context-driven compilation pipeline that auto-generates per-context verification tooling and improves rubric-graded ICL pass rate over vanilla prompting on every base model tested (§3, §4.5); we localise the load-bearing component via a controlled ablation (§5.1). (RQ2) We characterise how two strong long-context strategies (gist-memory retrieval and multi-agent self-play) interact with rubric-based grading and identify design properties well- or poorly-matched to this regime (§5.2). (RQ3) We isolate the task-structural and model-capacity factors that bound the harness benefit, through per-domain and per-sub-category break-

downs (§5.3).