<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aleksandar Kovacevic</title>
    <description>The latest articles on DEV Community by Aleksandar Kovacevic (@aleksandar_kovacevic_6044).</description>
    <link>https://dev.to/aleksandar_kovacevic_6044</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4017688%2F16c75835-c9bb-4478-9710-2c24de20edc4.png</url>
      <title>DEV Community: Aleksandar Kovacevic</title>
      <link>https://dev.to/aleksandar_kovacevic_6044</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aleksandar_kovacevic_6044"/>
    <language>en</language>
    <item>
      <title>Retrieval isn't memory: building a reasoning layer for AI</title>
      <dc:creator>Aleksandar Kovacevic</dc:creator>
      <pubDate>Mon, 06 Jul 2026 12:56:34 +0000</pubDate>
      <link>https://dev.to/aleksandar_kovacevic_6044/retrieval-isnt-memory-building-a-reasoning-layer-for-ai-369b</link>
      <guid>https://dev.to/aleksandar_kovacevic_6044/retrieval-isnt-memory-building-a-reasoning-layer-for-ai-369b</guid>
      <description>&lt;p&gt;Anyone who codes with an AI agent knows the feeling. Inside a session it's sharp — it follows your patterns, respects your decisions, fixes the bug. Close the terminal, open it tomorrow, and it's a stranger. It re-suggests the pattern you rejected. It re-introduces the bug you already fixed.&lt;/p&gt;

&lt;p&gt;The usual fix is a memory tool — mem0, Zep, Letta, a hand-maintained CLAUDE.md. We tried them and hit the same wall.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retrieval is not the same as remembering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every memory tool does the same three things: store text, embed it, find it again. Store → search → return chunks. That's retrieval, and it's useful — but it's passive. It waits to be asked, then hands back the closest matching text.&lt;/p&gt;

&lt;p&gt;A coding agent rarely &lt;em&gt;asks&lt;/em&gt;. It acts. By the time you'd want it to recall that this repo validates at the boundary, it's already written the code the wrong way. Retrieval that only fires on demand is a library nobody walks into.&lt;/p&gt;

&lt;p&gt;So the question wasn't "how do we store more?" It was "how do we get the right guidance in front of the model &lt;em&gt;before&lt;/em&gt; the mistake?" That reframing is the whole product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three layers over one database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory&lt;/strong&gt;. One SQLite database is both source of truth and vector store, via &lt;code&gt;sqlite-vec&lt;/code&gt; — no separate vector DB, no sync job keeping two systems honest. Work is recorded non-intrusively by hooks in the agent. Retrieval is hybrid: vector similarity plus BM25 full-text, then a cross-encoder rerank. This layer is table stakes — roughly what the other tools do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Angel (reasoning).&lt;/strong&gt; A persistent process that thinks over what's stored instead of waiting to be queried. It extracts patterns and decides when one is worth surfacing. Before a pattern is promoted, multiple independent passes have to converge on it — if only one run noticed it, it's noise; if several land on the same thing, it's real. That check keeps single-session bias out of long-term memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Whisper (behavior).&lt;/strong&gt; The part worth its own section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Whispers: steering the model at inference time
&lt;/h2&gt;

&lt;p&gt;Static prompts don't scale. If you've maintained a &lt;code&gt;CLAUDE.md&lt;/code&gt;, you know the failure mode — it grows, every rule is always "on," and by the third session the model half-ignores the whole wall.&lt;/p&gt;

&lt;p&gt;So we inverted it. The static prompt shrinks to identity essentials. Everything situational — a rule, a lesson, a convention — becomes a &lt;strong&gt;whisper&lt;/strong&gt;: guidance tagged with a trigger condition, dormant until it's relevant. At session start, and on any turn whose shape calls for it, a lightweight detector asks "is this a moment where remembered guidance helps?" If yes, the whisper is injected into context &lt;em&gt;before&lt;/em&gt; the model responds.&lt;/p&gt;

&lt;p&gt;The model then behaves as if it had internalized the rule — with no weight update. It's the closest analog to fine-tuning without access to the weights: steering through just-in-time context instead of gradient descent. &lt;strong&gt;Retrieval makes the model know more; whispers make it behave differently.&lt;/strong&gt; A database versus a tutor.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest part: misfires
&lt;/h2&gt;

&lt;p&gt;Just-in-time injection has an obvious failure mode — firing when it shouldn't. And the costs aren't symmetric: a correct whisper earns a little trust, a wrong one that interrupts your flow costs a lot, because people remember the annoying one.&lt;/p&gt;

&lt;p&gt;So the bar isn't "never misfire" — chasing that makes the system too timid to be useful. The bar is: &lt;strong&gt;a wrong whisper has to be cheap to ignore.&lt;/strong&gt; Non-intrusive, easy to dismiss, never blocking. Get that right and thousands of quiet correct nudges beat the occasional shrug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this is
&lt;/h2&gt;

&lt;p&gt;Code stays in your trust boundary — generation runs through your own local agent with your own credentials, not a third-party box in the middle. The reasoning and whisper orchestration is the part that's ours.&lt;/p&gt;

&lt;p&gt;The engine runs daily across real projects and benchmarks competitively on long-memory. What we're building now is the boring, necessary part: making a stranger's first session good.&lt;/p&gt;

&lt;p&gt;If you've fought agent memory — rolled your own, wrestled a &lt;code&gt;.cursorrules&lt;/code&gt; file into the ground — I'd like to hear how you approached it, especially the misfire problem. I don't think anyone has fully solved that one yet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sonn is at &lt;a href="https://sonn.dev" rel="noopener noreferrer"&gt;sonn.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>claude</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
