Your agent solves the same class of task 500 times a week and never gets better at it. How would you make it learn, without fine-tuning?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
It never improves because it has no procedural memory. Every run rediscovers the same path. What is missing is a write path from trajectories to reusable procedures, and a retrieval path that pulls them at planning time.
Full worked answer with diagram
It never improves because it has no procedural memory. Every run rediscovers the same path. What is missing is a write path from trajectories to reusable procedures, and a retrieval path that pulls them at planning time.
Distil trajectories into procedures. After a run, a second model reads the trajectory and proposes a candidate: trigger condition, ordered steps with the actual tool calls and arguments, verification checks, known pitfalls. This is the Agent Workflow Memory idea, inducing reusable workflows from past trajectories and feeding them back in. The paper reports 24.6% and 51.1% relative success-rate improvements on Mind2Web and WebArena, with fewer steps per solved task.
Mine failures, not just successes. ReasoningBank distils generalisable strategies from self-judged failures as well as successes, reporting up to 8.3% improvement on web tasks with fewer interaction steps. Preventative lessons ("this filter returns empty silently when the date range is inverted") are often worth more than the happy path.
Two indexes, not one. Facts, what is true, are keyed for lookup. Procedures, how to do it, are keyed by task signature - intent plus environment plus available tools - and retrieved at plan time, not answer time. Collapsing both into one vector store is the common mistake: a procedure retrieved as a fact gets quoted instead of executed.
Then the parts that make this a senior question:
- Validation before trust. A candidate procedure is a hypothesis. Replay it against the eval set for that task class, or canary it on a traffic slice, and promote only if success rate and step count both improve. Promoting on one good run is how you learn a coincidence.
- Versioning and rollback. Procedures are artifacts with versions, provenance back to the runs that produced them, and an owner. Ship them like prompt changes (Q53) and bisect the same way.
- Poisoning. Self-write memory is a persistence channel for injection: content that arrived as an untrusted tool result comes back as "your own procedure" and gets trusted (memory poisoning, safety bank). Do not write procedures from runs that touched untrusted content without review, never let a learned procedure grant capability rather than order steps within capability the agent already has, and keep procedures human-readable and diffable.
- Consolidation. 500 runs a week generates near-duplicates that fragment retrieval. A periodic merge, dedupe and expire pass with usage counters ages dead procedures out.
- Measurement. Aggregate improvement is unattributable, because models, prompts and traffic all move. Run a holdout slice with memory disabled and compare success rate, steps and cost per successful task on the same task mix. If you cannot switch memory off, you cannot prove it helps.
Worth sketching. The validation gate is what separates learning from an append-only pile.
flowchart TD
A["Trajectories: successes and failures"] --> B["Distil a candidate procedure"]
B --> C{"Beats baseline on the eval set<br/>for this task class?"}
C -->|"no"| D["Discard or park for review"]
C -->|"yes"| E["Promote, versioned and owned"]
E --> F["Retrieved at plan time<br/>by task signature"]
F --> A
E --> G["Merge, dedupe, expire"]
What a good answer covers
- It never improves because it has no procedural memory
- Every run rediscovers the same path
- What is missing is a write path from trajectories to reusable procedures, and a retrieval path that…
- Distil trajectories into procedures
- This is the Agent Workflow Memory idea, inducing reusable workflows from past trajectories and feeding…
Key terms: Distil trajectories into procedures · Mine failures, not just successes · Two indexes, not one · Validation before trust · Versioning and rollback · Poisoning · Consolidation · Measurement
Interviewer follow-ups to expect
How would you stop two learned procedures from contradicting each other?
What would make you delete a procedure that is still being retrieved and still succeeding?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep