One Line of Code, 41% Better Memory: When One AI Agent Optimizes Another
Coding agents lose all context between sessions, and Lerim's memory extraction and deduplication quality was uncertain — there was room to improve but no clarity on which parts of the system needed it.
The initial evaluation harness measured the wrong thing — rewarding recall without penalizing over-extraction — so the memory store accumulated low-value entries despite high eval scores.
Round 1 achieved a 41% improvement in composite quality score, with dedup accuracy rising from 0.28 to 0.72 and maintain improving by 29% as a cascade effect.
Round 2 added a further 3.4% extraction quality improvement by teaching the LLM explicit quality criteria.
Show all 10 reported metrics
Frequently asked questions
What did this team achieve with this AI workflow?
Round 1 achieved a 41% improvement in composite quality score, with dedup accuracy rising from 0.28 to 0.72 and maintain improving by 29% as a cascade effect.
What tools did this team use?
Claude Code, Lerim, DSPy, Pydantic, MiniMax M2.5, AutoResearch.
What results were reported?
composite quality score improvement (Round 1): 41%; Dedup accuracy improvement: from 0.28 to 0.72; Maintain improvement (end-to-end cascade): 29%; extraction quality improvement (Round 2): +3.4% (source-reported, not independently verified).
What failed first in this deployment?
The initial evaluation harness measured the wrong thing — rewarding recall without penalizing over-extraction — so the memory store accumulated low-value entries despite high eval scores.
How is this workflow AI workflow structured?
Setup optimization harness → Claude Code reads and modifies → Evaluator scores pipeline → Keep or revert change → End-to-end lifecycle validation → Failure log feeds next round.