What an agent may conclude from its own attempts, and what has to be true before it acts on it
Twelve steps, four parts, three runnable labs — eight switchable layers, two scores, and the gap between them.
- All 12 steps, read online
- Runnable labs to download (plain Python, runs offline)
- Free updates whenever it's revised
- 14-day refund (conditions)
Introduction
You gave an agent the ability to write notes to itself — rules, heuristics, a file it edits, a prompt it appends to — and the number went up. This volume is about which number went up, and whether it is the one you care about.
The shape of every self-learning loop
However it is dressed up, it is this. Steps 2 and 3 are where the subject lives; step 4 is where the engineering effort usually goes.
| # | the agent… | where the subject lives |
|---|---|---|
| 1 | attempts the task | |
| 2 | finds out how it went | this is where the result is decided |
| 3 | works out which part went wrong | step 6 |
| 4 | writes a rule | where the effort usually goes |
| 5 | attempts the next task with the rule in hand |
A wrong memory makes one answer wrong. A wrong rule makes every later attempt wrong, in the same direction, while looking like progress.
What self-learning engineering is
Self-learning engineering is the practice of deciding what an agent may conclude from its own attempts, and what has to be true before it is allowed to act on that conclusion.
Eight switchable layers in four phases. This volume measures what each one buys by holding the agent fixed — it is scripted and deterministic — and turning the layers on and off around it, over 102 measured configurations. A change in the outcome can only have come from a layer.
| phase | the question it answers | layers | stages |
|---|---|---|---|
| keep a record | what did I do, and did it work? | tracing · outcome | 5–6 |
| work out what went wrong | which step, and what rule follows? | credit · extraction | 7–8 |
| check before you believe it | does the rule hold, and hold on something new? | validation · unseen | 9–10 |
| tidy the rule book | do the rules argue, and do they still pay? | conflict · retirement | 11–12 |
The headline, up front
The two scores
Everything here rests on a distinction that is not a design choice. Only one of these can be inside the loop: if the agent could run the expensive one continuously, it would be the cheap one, and you would need a new one behind it.
| the score the agent can see | the score that counts | |
|---|---|---|
| what it is | a cheap check, runnable as often as you like | the real standard the work is held to |
| who runs it | the agent, every round | you, occasionally |
| in the loop? | yes — necessarily | no — necessarily |
| examples | a test suite, a linter, a regex, a rubric prompt | a careful review, a pristine test, whether the customer complained |
Is this for you?
| if… | then |
|---|---|
| your agent edits a file that your checks read | step 7 — one free rule closes it |
| your score went up and you cannot say what improved | step 4, then step 11 |
| you are about to add more checking layers | step 5. Four of the eight change nothing in any lab |
| your cheap check accepts a plausible answer as a right one | step 9. That is the case where nothing in this volume helps |
| you hold tasks back and the held-out score is rising | step 11 — that is a different instrument for a different failure |
The three labs
Eight tasks each — five to practice on, three never practiced on — and three rounds of learning. What differs between them is a property of the scorer, not of the agent or the task.
| the agent's job | can the cheap check be satisfied without being right? | outcome | |
|---|---|---|---|
A · fix-a-test | repair a program until a test file passes | yes, by editing the test file | a defense works |
B · triage | name the cause of a failure from a crash report | yes, by naming any framework the report mentions | nothing helps |
C · answer | state a figure from a policy document | not by any rule it proposed | learning simply works |
How to read the source labels
| label | means |
|---|---|
| concept | argued from first principles, quotes nothing from a lab |
| measured | a lab compares configurations and reports the difference |
| hands-on | you run it on your own material |