Chapter 16 of 17

Learning From Experience

Concepts

Chapter 16 โ€” Learning From Experience

Source: 16-chapter.md

What this chapter is really about

The merged chapter is about the boundary between remembering and adaptation. Memory lets retained history alter the present. Learning begins when evaluated outcomes alter the mechanism that will process the future.

Outcome adaptation and procedural memory are therefore not separate destinations. They are two increasingly strong ways experience can modify future behaviour.

Current thesis

Explicit claims

  • Memory and learning are distinct operations.
  • Outcome observation does not imply outcome attribution.
  • Retrieved, used, followed, relevant, causally helpful, and correlated-with-success are different states.
  • Outcomes may change expected utility without changing truth-confidence.
  • Candidate policy changes must be replayed/backtested before promotion.
  • Usage-count reinforcement is a lock-in baseline, not a mechanism assumed useful.
  • Procedures are derived action claims carrying goal, preconditions, steps, checks, evidence and version/scope.
  • Procedure replay is evaluated for harm as well as success.
  • Automatic adaptation is optional and may legitimately fail to earn a place.

Implied claims

  • Chapter 12’s intervention framework provides stronger attribution evidence than observational outcome logs, and it has run: oracle-auditable 0.524, decisive memory removed 0.250, that same memory restored 0.778, wrong memory 0.042 against no memory 0.226. Remove-and-restore is causal evidence in the attribution ladder’s sense; co-occurrence is not. The cost is one controlled run per memory under test, on tasks where a single item is decisive by construction, so the conservative posture is now a cost-and-scope judgement rather than a missing instrument.
  • Static traceable memory may be preferable to adaptive memory where attribution is weak.
  • Reusable method is qualitatively more dangerous than reusable fact because it can drive action directly.
  • Procedure availability may need a world-state/checking capability that the memory system itself does not own.

Material absorbed from the old final block

Old Chapter 18 โ€” Memory Learns From Outcomes

Retained:

  • attribution ladder;
  • feedback-loop lock-in danger;
  • confidence/utility separation;
  • outcome updates need provenance;
  • validity/supersession gates;
  • sequential evaluation rather than one-shot scoring.

Demoted:

  • automatic reinforcement as the natural next step;
  • usage count as meaningful causal credit;
  • an assumption that causal helpfulness can be inferred from ordinary logs.

Old Chapter 19 โ€” Remembering How

Retained:

  • declarative vs action-changing memory;
  • procedure source provenance;
  • goal/preconditions/steps/checks/evidence representation;
  • blind replay as characteristic failure;
  • versioning and supersession;
  • near-miss transfer fixtures.

Demoted:

  • “procedural memory” as taxonomy-first architecture;
  • workflow DSL;
  • automatic branching/composition;
  • procedure extraction as safe by default.

What earlier chapters contribute

  • Ch7: provenance and support logic for outcome evidence and procedure derivation.
  • Ch8: validity/supersession gates adaptation and procedure versions.
  • Ch10: policy versions and traces make updates inspectable.
  • Ch10/11: backtesting shows locally attractive changes can regress globally.
  • Ch12: intended provider of paired behavioural interventions and memory-use evidence.
  • Ch14: context/behaviour can diverge, so presence cannot be treated as use.
  • Ch15: confidence/utility and preservation/availability distinctions.

Important distinctions

  • memory vs learning;
  • outcome vs attribution;
  • retrieved vs used;
  • used vs causally helpful;
  • utility vs truth-confidence;
  • policy update vs belief update;
  • procedure vs script;
  • procedure vs declarative rule;
  • precondition vs step;
  • replay vs adaptation;
  • human-authored procedure vs automatically derived procedure.

Strongest design rule

The adaptation loop should be:

outcome
โ†“
candidate update
โ†“
historical replay
โ†“
regression gates
โ†“
promote / reject

not:

outcome
โ†“
mutate live memory policy

This generalises the policy-backtest discipline already measured in Chapters 10 and 11.

Combined experiment

A merged experiment should contain:

  • a genuinely necessary memory;
  • an irrelevant fellow traveller;
  • a misleading memory;
  • a conditionally useful memory;
  • early lucky outcomes;
  • delayed contradictory evidence;
  • a successful procedure with explicit preconditions;
  • a near-miss task where replay is unsafe;
  • a later environment change invalidating the procedure.

Candidate conditions:

  • static memory;
  • usage reinforcement;
  • outcome-only utility update;
  • intervention-backed update;
  • procedure candidate;
  • procedure gated by preconditions/checks.

Metrics remain separate:

  • task success;
  • harmful action;
  • lock-in;
  • recovery after correction;
  • false credit;
  • transfer success;
  • near-miss refusal;
  • rollback success;
  • evaluation cost.

Claims worth attacking

  • Remove/restore interventions are affordable enough to become a routine source of attribution.
  • Observable output use is a reliable proxy for memory influence.
  • Procedures can be extracted from trajectories without smuggling in hindsight.
  • Preconditions can be checked by the agent at replay time.
  • Linear checked procedures capture enough value without branching.
  • Historical replay prevents overfitting when the historical set is itself narrow.
  • A static system really is safer than an adaptive one once distribution shift arrives.

Possible verdicts

  • Adaptation improves future behaviour with strong attribution.
  • Utility adaptation helps but procedures do not.
  • Procedures help only inside narrow task families.
  • Lock-in/harm dominates; adaptation is rejected.
  • Static memory remains sufficient; Chapter 16 becomes a boundary chapter.

Architectural implication

Outcome data should initially be stored as evidence rather than immediately converted into policy.

A candidate update should carry:

affected policy/memory
task
outcome
attribution level
validity conditions
proposal version
backtest result
promotion decision
rollback reference

A procedure candidate should additionally carry:

goal
preconditions
steps
checks
evidence
version
supersession

What remains unresolved

  • Reliable causal credit without expensive interventions.
  • Exploration: memories never selected never receive outcome evidence.
  • Attribution across multiple interacting memories.
  • Procedure extraction reliability.
  • Precondition verification.
  • Safe adaptation of procedures to similar-but-not-identical tasks.
  • Whether any automatic learning belongs in the final Memory architecture.

Discussion

Start here

The key discussion is not “how should memory reinforce itself?” It is:

Which adaptations can be justified from observable evidence strongly enough that replay and regression gates make them safer than leaving memory static?

Decision for the final chapter

Chapter 17 should be able to end with either outcome:

  1. adaptation earned a limited optional place; or
  2. the remembering system remains mostly static and traceable, with learning deferred.

Both are coherent conclusions.

Explain this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Apply this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

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

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.