How it works

An apprentice watches the expert, then earns the work

July 30, 2026

Apprentice turns checked examples into a better prompt, then a small model for one repeated job. Nothing takes over until it wins on examples it has never seen.

The mismatch

One job in your system runs all day: reading invoices, sorting complaints, or writing the same kind of email. The input changes. The job does not. The answer is right or wrong.

In July 2026, OpenAI reported a security test. With some normal safety checks turned off, two research models broke out of the test system, entered Hugging Face's systems, and found the test answers. It happened in a lab, not normal use. But it shows the power behind one frontier API call.

Most companies do not need that power for routine work. They need the right answer every time. The frontier model stays because it worked first. A cheaper model may save money, but one bad answer can cost more. So teams keep paying for the model they trust.

How it works

Figure 1. Two phases, one golden set that keeps growing

APPRENTICEYour AI use caseOne task, at volume, on a frontier modelYour golden setInputs and answers your experts signed offIt only grows, and it stays yoursPHASE 1A measured promptPHASE 2A model of your ownIt has to earn the jobScored on examples it never sawThen a gradual, reversible takeoverShadow first, then a slice of live traffic

Scroll the figure sideways to see all of it.

Both phases are scored on examples they never saw. Today Apprentice measures which model wins; the live traffic handoff comes next. The golden set is the only permanent thing here; everything inside the boundary is rebuilt from it whenever it grows.

A safer handoff

With repeated work, an expert trains an apprentice, checks the work, and keeps the hard cases. AI breaks that handoff: the expert knows the job, another team knows prompts, and details get lost in meetings. The prompt learns only the cases someone mentioned.

Apprentice puts real answers before the expert, and each correction becomes a verified lesson. Those lessons improve the prompt first, then train a small model for the job. Each is held out and scored before it is used. Only when they pass does the expert step back and the apprentice earn the work.

What counts as a checked example is its own subject: the golden dataset guide covers which rows count as verified and which only look like it, and how prompt optimization is scored covers the scoring.

Measured result

On classifying documents, the Apprentice model scored 86.7 out of 100 on examples it had never seen. Three public tasks in all, every score from examples held back from training and from a run you can repeat: the data, the commands and the notebooks are at github.com/singhabhishekkk/apprentice-benchmark.

Figure 2. In all three public tests, the apprentice finished above its teacher

Score out of 1009080700Scanned receipts72.9 → 84.2 → 89.2API responses83.1 → 85.6 → 88.9Classifying documents78.3 → 81.7 → 86.7Your promptApprentice promptApprentice model
Receipts and API responses: GPT-4o-mini taught Qwen3.5-4B. Classifying documents: GPT-5.4-mini taught Gemma 4 E4B. The first two points run on the frontier model; the third is the small model Apprentice trained.

Every model must pass the same test before it can take the job. If it loses, the frontier model keeps the work.

At current list prices, GPT-5.4-mini costs $0.75 per million input tokens and $4.50 per million output tokens. The 4B open model costs $0.03 and $0.15 on DeepInfra. That is at least 96% less.

Why the loop matters

A one-time switch saves money once. Then prices fall, the work changes, or a better model arrives. Your checked examples keep growing. Each correction helps Apprentice test the next prompt or model. Capture uses a LangChain callback or OpenAI wrapper. If Apprentice is slow, your model call still runs. Which surface to open first is its own question: the skill, the SDK, and the console.

OpenAI will stop taking new fine-tuning jobs from existing customers on 6 January 2027. Existing models will keep working. Customers will not be able to retrain them. The paths out are laid out in migrating off OpenAI fine-tuning.

The expert keeps the hard cases. The apprentice earns the work that repeats.

Related: what a golden dataset is, why prompts get worse over time, and the receipt benchmark in full. Or see every guide.

Common questions

How many examples does Apprentice need to start?

Hosted prompt optimization starts at 20 verified examples, and hosted training starts at 500 expert-checked ones. Those are the floors the hosted API enforces. Local mode is far looser: optimize --local needs two rows, and train --local only needs enough left after the holdout split to fill a batch. Two rows will produce a number, not a trustworthy one, so treat the hosted floors as the honest guidance.

What stops a worse model from taking my traffic?

The eval gate. A candidate is scored on human-verified examples that were held back from training, and it does not take the work unless it beats the prompt you run today on that held-out slice. Only rows a person checked can train a model or clear promotion, and what we test on is never used for training. It has happened to us: on document classification our first trained model scored 80.0, below the optimized prompt's 81.7, and it did not ship.

How much cheaper is a small model, really?

GPT-5.4-mini lists at $0.75 per million input tokens and $4.50 per million output. A 4B open model serves at $0.03 and $0.15 on DeepInfra. Because the input ratio is 25x and the output ratio is 30x, the saving lands between 96.0 and 96.7 percent for any mix of tokens, so 96 percent less is a floor rather than a best case. These are published list prices, so the arithmetic is yours to check.

What happens to the expensive model after the small one takes over?

It stays behind the small one and keeps answering anything that falls back to it. Turning the takeover off is a setting rather than a release. Fallbacks are billed at the old price and counted as failed replacements in the savings math, because a saving that hides its fallbacks is not a saving. To be exact about today: promotion is recorded rather than routed, and the gateway that moves live traffic is being built.

Why not just swap to a cheaper model once and be done?

Because a one-time swap decays. Prices drop, a better model arrives, and whatever you saved leaks away. The asset that does not decay is the growing set of checked examples: every correction your expert makes becomes another example, and when that set grows or quality slips, the loop reruns and the new candidate has to pass the same test to keep its traffic.

Sources

Apprentice
© 2026 Apprentice · Eval-gated LLM replacement