Learning From Experience
Chapter 15 asked how a long-lived memory system keeps accumulated history manageable without destroying what later work may still need. That remains memory management: the system changes which retained experiences are represented, available, or allowed to compete.
This chapter crosses a different boundary.
Suppose the system performs a migration, observes that it succeeded, and then changes what it will retrieve next time. Suppose it notices that the same sequence of checked actions has worked repeatedly and turns that sequence into a reusable method. The system is no longer only asking what the past contains or which part matters now.
It is allowing the outcome of present behaviour to change future behaviour.
That is learning from experience.
The distinction matters because a memory system can be excellent without being self-modifying, and a self-modifying system can become worse precisely because it mistakes correlation for evidence. The original plan separated outcome adaptation and procedural memory into two chapters. They now belong together because both ask the same deeper question:
When is experience strong enough to justify changing how future work will be done?
Memory is not yet learning
The book’s behavioural definition of memory is:
retained past
โ
changes present behaviour
Learning adds another transition:
present behaviour
โ
outcome
โ
changes future memory / policy / procedure
No neural weight update is required for that distinction. The change may live entirely outside the model: a retrieval preference, an availability rule, a newly derived procedure, a correction, a new exception, a promoted or rejected policy version.
But the causal structure changes.
Memory asks whether the past influenced the present.
Learning asks whether the consequences of the present should alter the mechanism that influences the future.
The second question is harder because success and failure do not explain themselves.
Outcome observed is not outcome attributed
Imagine a migration succeeds after the system retrieved five memories:
- the PostgreSQL decision;
- the compatibility-first warning;
- an old incident;
- a general migration note;
- an irrelevant runbook echo.
Which memory deserves credit?
The tempting rule is usage:
memory retrieved
โ
task succeeds
โ
raise memory priority
That rule creates a feedback loop:
retrieved because highly ranked
โ
present during success
โ
strengthened
โ
retrieved even more often
A lucky early success can lock in a mediocre memory. An irrelevant memory can ride beside the real cause and accumulate credit. A stale memory can survive because a capable reader worked around it. A useful warning may be ignored and receive no credit even though it should have changed the plan.
The old outcome chapter captured the essential attribution ladder:
retrieved
โ
used
โ
followed
โ
relevant
โ
causally helpful
โ
correlated with success
Those distinctions survive unchanged.
Retrieved means the memory entered context.
Used means the observable output drew on it.
Followed means the action complied with it.
Relevant means it bore on the task whether or not the agent followed it.
Causally helpful means the outcome would have changed without it.
Correlated with success means it was often present when successful outcomes occurred.
Only the upper end licenses strong adaptation, and the upper end is the hardest to observe.
This chapter therefore refuses the fiction that a scalar reward can be attached cleanly to every memory after every task.
Chapter 12 supplied the instrument
The original outcome-learning draft had no way to approach attribution except co-occurrence. Chapter 12 built one, and it ran.
Its design tests the same task under matched memory interventions:
no memory
correct memory
remove decisive memory
restore decisive memory
wrong / stale memory
That design does more than score whether memory helped. It produces evidence about which memory mattered.
Book result (Chapter 12’s frozen run). Task-averaged success on matched tasks: the auditable oracle context reaches 0.524; removing the single decisive memory drops the same tasks to 0.250; restoring that memory alone lifts them to 0.778. Supplying a wrong or stale memory instead scores 0.042, far below the 0.226 of supplying no memory at all.
The remove-and-restore pair is the point. It is not “this memory was present during success”. It is an intervention on one item, holding the task, the reader and the budget fixed, with the behaviour moving down when the item is taken away and up when it is put back. That is a much stronger basis for credit than co-occurrence, and it is the evidence the attribution ladder above calls causally helpful rather than merely correlated with success.
So the conservative posture in this chapter is no longer forced by the absence of an instrument. It is a judgement about cost and scope. The evidence exists, and it is expensive: every attribution of that strength costs an additional controlled run per memory under test, on tasks where a single item is decisive by construction. Chapter 12’s own verdict carries the matching caveat โ the effect is measured on a small controlled task set, not on ordinary work where several memories contribute partially and no single removal is decisive.
The policy should therefore consume intervention-backed outcome evidence where available, and must not manufacture causal credit from ordinary co-occurrence where it is not. What Chapter 12 changes is that the first half of that sentence now names something real.
What outcomes are allowed to change
A major architectural distinction from Chapter 15 now becomes load-bearing.
An outcome may legitimately alter:
expected utility
retrieval priority
availability preference
procedure candidacy
exception set
policy proposal
An outcome does not automatically alter:
truth
historical fact
provenance
supersession
what actually happened
A memory that worked three times may be more useful. It is not therefore more true.
A true memory that was irrelevant to ten recent tasks does not become false.
This keeps confidence and utility separate:
truth-confidence
changed by evidence
expected utility
changed by task/outcome evidence
Without that separation, a self-improving retrieval system can rewrite epistemology as popularity.
Backtest before promotion
Chapter 10 produced one of the book’s strongest control results: a policy change that looked locally correct scored โ0.074 on the primary metric when replayed over the broader historical task set, and was rejected. Chapter 11 repeated the pattern exactly. Dropping the cancelling-evidence leg would have recovered a candidate the gate was suppressing โ locally correct, and the replay scored โ0.354 while breaching two gates, taking the harmful-task rate from 0.000 to 0.500 and correct abstention from 1.000 to 0.000. Twice now, the repair suggested by the failure in front of the system has been the wrong one.
That suggests a general adaptation protocol:
outcome observed
โ
candidate policy change
โ
historical replay
โ
primary metric + regression gates
โ
promote or reject
not:
outcome observed
โ
change live policy
The replay matters because adaptation is where the system begins to overfit its own experience.
A policy update may repair the task that inspired it and damage an earlier class. A retrieval preference learned from architecture work may crowd out publication evidence. A rule learned from three successful migrations may fail catastrophically on a fourth because one precondition differs.
The book has already learned to version ContextPolicy, gate policy, and assembly policy. Outcome learning should use the same discipline.
Every promoted adaptation needs:
proposal
evidence
policy version
evaluation set
regression gates
promotion decision
rollback path
Learning becomes inspectable change management rather than invisible reinforcement.
The exploration problem
There is another asymmetry.
A memory that is never retrieved cannot receive positive outcome evidence. A policy that already prefers A over B will collect more experience with A, which can make A look increasingly justified simply because B is no longer tried.
This is the classic shape of an exploration problem, but the book does not need to build a reinforcement-learning system to acknowledge it.
It does need to reject a misleading inference:
“Never used” is not the same as “not useful.”
A static or conservative policy may sometimes be preferable to an adaptive one because it avoids locking the system into early accidents.
That possibility must remain a valid verdict.
From useful memory to reusable method
Outcome adaptation changes which memories are likely to influence later work.
Procedure extraction goes further. It asks whether successful experience can be represented as a reusable method.
Compare:
Compatibility mode was important to the migration.
with:
For this class of migration:
1. enable compatibility mode
2. apply the schema change
3. shadow-read both versions
4. validate
5. remove compatibility only after checks pass
The first is a declarative memory. It can inform a future decision.
The second can organise action.
That difference is why procedure is the strongest form of the book’s behavioural claim โ and also the most dangerous.
A stale fact can mislead. A stale procedure can perform the wrong action.
Procedures are derived action claims
The old procedural-memory chapter proposed a useful minimal representation:
goal
preconditions
steps
checks
evidence
That survives the consolidation.
Goal says what kind of work the procedure serves.
Preconditions define the applicability envelope.
Steps preserve the sequence.
Checks prevent blind replay by gating progress on observed state.
Evidence preserves the episodes, documentation, postmortems, or experiments from which the procedure was derived.
The representation stays deliberately small. Branching languages, composition operators, parameter systems, autonomous skill graphs, and workflow DSLs remain outside the earned architecture until a measured failure needs them.
A procedure is best treated as a derived claim about action.
That means it inherits all the discipline of other derived state:
- provenance;
- scope;
- validity;
- versioning;
- supersession;
- re-evaluation when evidence changes.
Preconditions are the safety boundary
The most important field is not the step list.
It is the precondition.
A remembered procedure may have worked under one platform version, one service topology, one data constraint, or one compatibility contract. Similar future work can differ on exactly the hidden condition that made the old procedure safe.
Blind replay is therefore the characteristic procedural-memory failure.
A procedure can only be considered available for action when its relevant preconditions can be checked.
That introduces a natural boundary: the memory system may remember a procedure even when the agent lacks the tools or world-state access to verify its preconditions. In that case the correct behaviour is not confident replay. It is to request evidence, defer, or use the procedure as advisory context.
Memory should not silently convert a remembered method into authority to act.
Checks distinguish procedure from script
The second safety feature is validation during execution.
A script says:
do A
do B
do C
A robust remembered procedure says:
do A
check X
if X holds:
continue
otherwise:
stop / roll back / seek evidence
The book does not need a general branching language to preserve this distinction. A linear sequence with explicit validation gates is enough for the first experiment.
That restraint matters. The moment procedures become arbitrary programs, the chapter has become a workflow-engine design project rather than a memory investigation.
A combined experiment
The old plan proposed one experiment for outcome adaptation and another for procedures. The merged chapter can ask one broader question:
Does feeding evaluated experience back into memory improve the next task, and if so, is the useful change a retrieval preference, a reusable procedure, or neither?
A controlled repeated-task world can contain:
- memory A, genuinely necessary for one task family;
- memory B, correlated but irrelevant;
- memory C, actively misleading;
- memory D, useful only under condition X;
- a successful action sequence with explicit preconditions;
- a near-miss task where the same sequence becomes unsafe;
- early lucky outcomes that favour the wrong memory;
- a later environmental change that invalidates the old procedure.
Conditions could include:
STATIC
no outcome adaptation
USAGE
retrieval frequency strengthens future priority
OUTCOME
task outcome adjusts utility without strong attribution
INTERVENTION-BACKED
adaptation uses Chapter 12-style remove/restore evidence
PROCEDURE-CANDIDATE
successful sequence is stored as advisory method
PROCEDURE-GATED
procedure may guide action only when preconditions/checks pass
The measurements should remain separate:
- task success;
- harmful-action rate;
- lock-in rate;
- recovery after contradictory evidence;
- false strengthening of irrelevant memories;
- procedure transfer success;
- near-miss refusal or safe adaptation;
- policy rollback after a bad update;
- number and cost of additional evaluations.
Book hypothesis. Outcome feedback can improve future memory selection only when attribution is strong enough to distinguish useful evidence from fellow travellers, and procedure extraction can improve repeated task performance only when applicability conditions and checks survive transfer. If those conditions cannot be established reliably, static traceable memory should remain the default and automatic adaptation should be deferred.
That is a much weaker claim than “memory should learn from every outcome,” and deliberately so.
What would count as a negative result?
Several negative outcomes would be useful.
If ordinary static memory plus a strong reader matches every adaptive condition, adaptation has not earned its statefulness.
If usage reinforcement locks onto early noise, it should remain a baseline pathology.
If intervention-backed utility updates help selection but procedure extraction adds no behavioural gain, only the first half survives.
If procedures improve mean success but cause rare destructive replay, they fail even if an aggregate rises.
If only human-authored procedures remain safe, automatic extraction should be demoted to candidate suggestion.
If outcome evidence cannot support causal attribution at practical cost, the chapter should end with a boundary rather than a mechanism.
That boundary would be valuable:
Memory can preserve outcomes and expose them to evaluation without automatically rewriting itself from them.
Where memory ends
The distinction can now be stated cleanly.
Memory is durable causal dependence on a retained past.
Learning is modification of the mechanism that determines how future situations will be processed.
A system may have rich memory and almost no autonomous learning. It may keep project history, resolve current truth, preserve open work, choose relevant context, and reuse human-authored procedures without updating any policy from its own outcomes.
That is a coherent architecture.
This chapter therefore treats automatic adaptation as optional. It should enter the final system only if an experiment demonstrates value that static, auditable memory cannot obtain more simply.
Research foundations
Several agent systems demonstrate pieces of this possibility.
Reflexion carries verbal feedback across attempts. ExpeL derives transferable lessons from successes and failures. Voyager maintains an expanding skill library and uses environmental feedback to improve later behaviour. Self-Refine applies generated feedback iteratively.
These systems show that prior outcomes can change later performance. They do not eliminate the attribution, lock-in, applicability, and provenance problems this chapter makes explicit.
The architectural standard remains stricter: adaptation is versioned, replayable, reversible, and separate from truth maintenance.
References
- Reflexion: Language Agents with Verbal Reinforcement Learning (2023).
- ExpeL: LLM Agents Are Experiential Learners (2023).
- Voyager: An Open-Ended Embodied Agent with Large Language Models (2023).
- Self-Refine: Iterative Refinement with Self-Feedback (2023).
The handoff
Whether Chapter 16 eventually earns automatic adaptation or ends by refusing it, the book has now reached the same place.
The question is no longer which additional memory mechanism can be invented.
It is:
After every proposed layer has faced a baseline, a failure test, and a cost, what architecture is actually left?
The final chapter answers that question.