Compiled AI: Deterministic Code Generation for LLM-Based Workflow Automation
Not on the map. Why?
Abstract (arXiv)
We study compiled AI, a paradigm in which large language models generate executable code artifacts during a compilation phase, after which workflows execute deterministically without further model invocation. This paradigm has antecedents in prior work on declarative pipeline optimization (DSPy) and hybrid neural-symbolic planning (LLM+P); our contribution is a systems-oriented study of its application to high-stakes enterprise workflows, with particular emphasis on healthcare settings where reliability and auditability are critical. By constraining generation to narrow business-logic functions embedded in validated templates, compiled AI trades runtime flexibility for predictability, auditability, cost efficiency, and reduced security exposure. We introduce (i) a system architecture for constrained LLM-based code generation, (ii) a four-stage generation-and-validation pipeline that converts probabilistic model output into production-ready code artifacts, and (iii) an evaluation framework measuring operational metrics including token amortization, determinism, reliability, security, and cost. We evaluate on two task types: function-calling (BFCL, n=400) and document intelligence (DocILE, n=5,680 invoices). On function-calling, compiled AI achieves 96% task completion with zero execution tokens, breaking even with runtime inference at approximately 17 transactions and reducing token consumption by 57x at 1,000 transactions. On document intelligence, our Code Factory variant matches Direct LLM on key field extraction (KILE: 80.0%) while achieving the highest line item recognition accuracy (LIR: 80.4%). Security evaluation across 135 test cases demonstrates 96.7% accuracy on prompt injection detection and 87.5% on static code safety analysis with zero false positives.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 12 of its 41 references that are in the map. First posted on arXiv 6 Apr 2026.
Builds on
12 of 41 references.
References · 12
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,402
- 2025Why Do Multi-Agent LLM Systems Fail?cited by 604
- 2023Efficient Guided Generation for Large Language Modelscited by 200
- 2023An Empirical Study of the Non-determinism of ChatGPT in Code Generationcited by 137
- 2024Non-Determinism of "Deterministic" LLM Settingscited by 92
- 2023DocILE Benchmark for Document Information Localization and Extractioncited by 58
- 2024FlowMind: Automatic Workflow Generation with LLMscited by 30
- 2025Blueprint First, Model Second: A Framework for Deterministic LLM Workflowcited by 12
- 2025Towards a HIPAA Compliant Agentic AI System in Healthcarecited by 8
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generationcited by 8
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026PreAct: Computer-Using Agents that Get Faster on Repeated Taskscited by 5
- 2026SPL: Orchestrating Workflows with Declarative Deterministic-Probabilistic Compositioncited by 0
- 2026Generating Workflow DAGs from Natural Language with Non-Reasoning LLMscited by 0
- 2026When to Compile a Computer-Use Agent? Measuring Payback and Making Compilation Decisions for Token Efficiencycited by 0
- 2026When to Compile a Computer-Use Agent? Measuring Payback and Making Compilation Decisions for Token Efficiency2 Oct 2026
- 2026Generating Workflow DAGs from Natural Language with Non-Reasoning LLMs31 Aug 2026
- 2026SPL: Orchestrating Workflows with Declarative Deterministic-Probabilistic Composition6 Jul 2026
- 2026PreAct: Computer-Using Agents that Get Faster on Repeated Tasks16 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2026Compiling Deterministic Structure into SLM Harnesses
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
- 2025A Survey on Code Generation with LLM-based Agents
- 2025AI-Generated Code Is Not Reproducible (Yet): An Empirical Study of Dependency Gaps in LLM-Based Coding Agents
- 2026STELP: Secure Transpilation and Execution of LLM-Generated Programs
- 2025The Dual-State Architecture for Reliable LLM Agents
- 2026FlowMind: Execute-Summarize for Structured Workflow Generation from LLM Reasoning
- 2026From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agents