Cold Start vs Cached Execution¶
G6's self-training system improves over repeated runs. This page explains what happens on the first run versus subsequent runs, so you know what to expect.
The two modes¶
Cold start (first run)¶
On the first execution of a workflow:
- The harness is built from scratch using your examples
- Every classification requires full reasoning (keyword matching in demo, LLM inference in live mode)
- No cached artifacts or prior experience exist
- The improvement loop runs all iterations from baseline
What you see: Lower initial accuracy, full iteration count, higher cost (in live mode).
Warm cache (subsequent runs)¶
After one or more successful runs:
- Improved keywords/rules from previous iterations are available
- The hyperdistillation system may have cached successful reasoning patterns
- The experience loop records what worked, informing faster convergence
- Subsequent runs start closer to the target
What you see: Higher starting accuracy, fewer iterations needed, lower cost.
How hyperdistillation works¶
Run 1: Goal → Full LLM reasoning → Answer → Trace captured
Run 2: Same goal pattern → Check distilled library → Replay cached artifact
Run 3: Similar goal → Partial match → Hybrid (cached + new reasoning)
The hyperdistillation component (components/mvp/hyperdistillation/) captures execution traces and synthesizes reusable artifacts:
- Capture: Records the reasoning chain that produced a correct answer
- Synthesize: Extracts the algorithm/pattern into a standalone artifact
- Replay: On future similar inputs, replays the artifact instead of full LLM reasoning
- Verify: Checks that replayed results match quality expectations
Cached does not mean universally correct
Hyperdistillation is a cache-and-verify learning loop, not model retraining and not a proof that future inputs are correct. Cached artifacts are useful when the new input matches the learned problem structure. New categories, shifted data, high-stakes decisions, or regulated workflows should still run domain tests, holdout checks, and human review before relying on the cached result.
Artifact execution is bounded, not a VM
Distilled Python artifacts are statically checked and run in a timeout-bounded subprocess. That blocks common unsafe patterns and runaway loops, but it is not a container or virtual-machine security boundary. Multi-tenant or untrusted-code deployments should add an outer sandbox.
What this means for you¶
First session¶
- Expect the full iteration loop to run
- Accuracy improves across iterations (baseline → improved → final)
- Cost reflects full computation
- This is normal and expected
After your first successful workflow¶
- The system has learned what works for your category set
- New data with similar categories will classify faster
- The improvement loop may converge in 1-2 iterations instead of 5
- Cost decreases proportionally
Honest limitations¶
- Distillation is not magic: It caches what worked before. New categories or significantly different data still require cold-start reasoning.
- Replay is not learning: A cached artifact reproduces a known-good answer. It doesn't generalize to novel situations the way a retrained model would.
- Quality can degrade: If your data distribution shifts (new categories, different language), cached artifacts may underperform. The system detects this and falls back to full reasoning.
- Traces are data: Event logs and synthesized test cases can contain summaries of user inputs and outputs. Treat the distillation database as sensitive application data.
When cold-start is expected¶
| Scenario | Mode |
|---|---|
| First time running any workflow | Cold |
| New category added to your data | Cold for that category |
| Significantly different text style | Cold |
| Same data, re-running for verification | Warm |
| Similar data, same categories | Warm |
| Different user, same workflow template | Cold (per-user isolation) |
Cost implications¶
| Mode | Demo | Live (Ollama) | Live (Cloud) |
|---|---|---|---|
| Cold start | $0 | ~$0.001/run | ~$0.05-0.20/run |
| Warm cache | $0 | ~$0.0001/run | ~$0.005-0.02/run |
Cloud costs drop 5-10x after initial distillation succeeds.
How to check your status¶
Via MCP:
Via REST:
The workflow report's "Cost Summary" section always indicates whether cached artifacts were used.