← Back to AI Services and Tools

AI SERVICES AND TOOLS / COMPILED AI

Where rules end and reasoning begins

Compiled AI compiles stable, repeatable workflow control into executable code before deployment, validates it and reuses it across transactions. Models can support narrow business logic or bounded semantic work while deterministic code handles branching, retries, tool selection and error handling.

A layered AI workflow engine combining deterministic control and bounded model reasoning.
Deterministic control with bounded model reasoning.

THE USE CASE

What Compiled AI is for

The supplied research capture describes Compiled AI as an approach for stable, repeatable workflows. It aims to reduce repeated model invocation, variable latency and cost, unpredictable orchestration, prompt-injection exposure and difficulty auditing decision paths.

It suits workflows with sufficiently specified and repeatable control logic.

Open-ended work that must discover its path at runtime remains outside full deterministic compilation.

FROM SPECIFICATION TO ARTIFACT

The Code Foundry process

  1. 01

    Supply an accurate workflow specification.

  2. 02

    Select tested templates, reusable modules and compliance prompt blocks.

  3. 03

    Generate narrow business-logic functions with a model invocation.

  4. 04

    Assemble an executable workflow artifact.

  5. 05

    Validate Security, Syntax, Execution and Accuracy.

  6. 06

    Regenerate after failures and deploy only a passing artifact.

A RELATED SET

Three related concepts

Code Foundry

A generation architecture that assembles specifications, templates, modules and constrained code generation with validation.

Code Factory

Deterministic orchestration with narrow runtime model calls for semantic work. Prompts, schemas, triggers and failure handling are fixed in advance.

Safety Sandwich

Validate inputs, obtain typed semantic facts, validate extracted values, then apply explicit decision rules and audit logging.

THE BOUNDARY

Inputs, outputs and limits

Inputs

Workflow specifications, available components, rules and constraints, fixtures and golden outputs.

Outputs

Validated executable workflow code, inspectable orchestration and optional bounded semantic calls.

Limits

Creative or open-ended work, unstable or underspecified rules, and tasks whose success cannot yet be validated reliably.

TASK-SPECIFIC EVIDENCE

Reported research measurements

BFCL

384 of 400 compilations passed the accuracy gate in the stated evaluation. Passing artifacts then ran with zero runtime control-plane tokens.

DocILE

Across 5,680 invoices, Code Factory matched Direct LLM KILE at 80.0% and retained bounded runtime model calls for extraction.

PAPER EXAMPLE

Illustrative workflow in the research capture

The supplied capture uses a GLP-1 prior-authorisation workflow as an example. A bounded model call extracts typed clinical facts from an unstructured note, the workflow checks suspicious values, code applies coverage rules and the system records an audit event.