Skip to content

atyronesmith/axiomatic

Repository files navigation

Axiomatic

Compile LLM capabilities into deterministic code, decision trees, or small models that run without API keys.

The Problem

LLM APIs are powerful but often unavailable where you need them — CI runners, air-gapped environments, cost-sensitive pipelines. Many LLM tasks in production are narrow enough to compile into code. A 200B parameter model answering "which OpenShift operators does this Helm chart need?" is like using a general-purpose codec on a file of all zeros.

How It Works

Axiomatic is a compiler, not a runtime. It uses a large LLM once at build time to produce artifacts that run forever without the LLM.

Three backends, chosen by task entropy:

Backend Output Dependencies Best For
rules Python/Go source code Zero Extraction, pattern matching, finite mappings
tree Exported decision tree Zero (via m2cgen) Classification with finite categories
neural LoRA model adapter transformers/ONNX Free-form text generation

Rules Backend: Test-Driven Code Generation

The core loop:

  1. Feed task description + dataset (with known-good outputs) to an LLM
  2. LLM writes a function
  3. Run the function against the dataset
  4. If mismatches: feed failures back as context, iterate
  5. If clean: emit the function as the artifact
  6. If max iterations exhausted: report what it couldn't solve

The output is a .py or .go file. No model weights, no inference runtime. Just code that was written by an LLM and validated by a test harness.

Tree Backend: Classifier Export

  1. Collect input data, generate gold labels via teacher LLM
  2. Train a decision tree or logistic regression on features
  3. Export via m2cgen to pure Python/C/Go
  4. Optional: confidence-gated LLM fallback for edge cases

Neural Backend: Knowledge Distillation

  1. Collect input data, generate gold labels via teacher LLM
  2. Fine-tune a small model (0.5B-2B params) with LoRA
  3. Export: LoRA adapter → ONNX → GGUF (phased)

Sibling Projects

Axiomatic is the third piece of a trilogy:

  • Denoise — input-side: strips low-entropy noise before LLM processing (83% token reduction, zero deps)
  • Drift — output-side: replaces low-entropy LLM output with rules (50-90% latency savings)
  • Axiomatic — build-time: compiles LLM reasoning into the smallest artifact that preserves it

All three exploit the gap between data entropy and processing capacity.

First Consumer: QuickPat

QuickPat converts AI Quickstarts into Validated Patterns. It has five optional LLM call sites — four are classification/extraction (compilable to code), one is generative (needs a small model):

Task Axiomatic Backend Output
Operator detection rules Python function (~5KB)
ArgoCD drift prediction rules Python function (~5KB)
Secret classification tree Pure Python if/else (~10KB)
Secret false-positive review rules Python function (~5KB)
README summarization neural LoRA adapter (~350MB)

Installation

Requires Python 3.11+ and uv.

git clone git@github.com:atyronesmith/axiomatic.git
cd axiomatic
uv sync

Usage

# List available tasks
axiomatic list

# Rules backend: generate code from task description + dataset
axiomatic distill operator-detector --backend rules --dataset ./data/quickstarts/ --lang python

# Tree backend: train and export a classifier
axiomatic distill issue-classifier --backend tree --dataset ./data/issues/

# Neural backend: fine-tune a small model
axiomatic distill readme-summarizer --backend neural -b Qwen/Qwen2.5-0.5B --epochs 3

# Run inference (neural backend only)
axiomatic infer readme-summarizer ./path/to/README.md

Documentation

  • docs/design.md — full design document with information-theoretic foundation, backend details, and integration plan

Why "Axiomatic"?

An axiom is a self-evident truth that doesn't need proof. A compiled artifact is a self-contained capability that doesn't need an API call.

License

TBD

About

Distill LLM capabilities into small models and deterministic code for CI/CD

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages