<?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: Osamudiamen Osazuwa</title>
    <description>The latest articles on DEV Community by Osamudiamen Osazuwa (@mudiazuwa).</description>
    <link>https://dev.to/mudiazuwa</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3520267%2Fa0b25c4d-adfb-4cea-89e1-41ea1d3fc085.png</url>
      <title>DEV Community: Osamudiamen Osazuwa</title>
      <link>https://dev.to/mudiazuwa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mudiazuwa"/>
    <language>en</language>
    <item>
      <title>The Two-Brain Architecture: Decoupling Recall from Learning</title>
      <dc:creator>Osamudiamen Osazuwa</dc:creator>
      <pubDate>Sun, 18 Jan 2026 22:59:26 +0000</pubDate>
      <link>https://dev.to/mudiazuwa/the-two-brain-architecture-decoupling-recall-from-learning-4m60</link>
      <guid>https://dev.to/mudiazuwa/the-two-brain-architecture-decoupling-recall-from-learning-4m60</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F236a5ni0v5lyc6ylftna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F236a5ni0v5lyc6ylftna.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why your chatbot feels slow and why async memory processing is the only way to scale.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Latency is the user experience killer. If your AI assistant takes 10 seconds to reply because it’s busy summarizing the last 50 messages to "update its memory," your product is dead on arrival.&lt;/p&gt;

&lt;p&gt;The mistake most developers make is trying to do everything in the critical path (the "Hot Path").&lt;/p&gt;

&lt;p&gt;User Message -&amp;gt; Retrieval -&amp;gt; Update Memory (Slow) -&amp;gt; Generate Response -&amp;gt; Send to User.&lt;/p&gt;

&lt;p&gt;This is naive. Human brains don't work this way. When you tell me your name, I respond instantly. I don't pause for 30 seconds to file that information into my long-term storage hippocampus. That happens later (mostly while we sleep).&lt;/p&gt;

&lt;p&gt;We need to replicate this Fast Brain / Slow Brain architecture in software.&lt;/p&gt;

&lt;p&gt;Brain 1: The Fast Brain (The Hot Path) &lt;br&gt;
This is your read-path. It must be blazing fast.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input: User query.&lt;/li&gt;
&lt;li&gt;Action: Look up existing state (e.g., "User Name: Mudia", "Role: Dev").&lt;/li&gt;
&lt;li&gt;Output: Immediate context injection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This path does zero heavy lifting. It does not summarize. It does not extract new facts. It just reads.&lt;/p&gt;

&lt;p&gt;Brain 2: The Slow Brain (The Cold Path) &lt;br&gt;
This is an asynchronous background worker. It runs after the response is sent to the user.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trigger: Conversation turn complete.&lt;/li&gt;
&lt;li&gt;Action: Analyze the new text. Extract new facts ("User moved to San Francisco").&lt;/li&gt;
&lt;li&gt;Conflict Resolution: Compare with old facts. (e.g., Overwrite "Location: Lagos").&lt;/li&gt;
&lt;li&gt;Output: Update the database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By moving the "learning" phase out of the request/response cycle, you keep your bot snappy while still retaining deep context.&lt;/p&gt;

&lt;p&gt;The Cost Benefit&lt;br&gt;
This also saves money. You don't need a GPT-4 class model for the "Fast Brain." You just need a database read. You only spend the compute credits on the "Slow Brain" when there is actually new information to process.&lt;/p&gt;

&lt;p&gt;If you are building stateful agents, stop blocking the main thread. Decouple your reads from your writes.&lt;/p&gt;

&lt;p&gt;We built the Fast/Slow brain architecture directly into @mzhub/cortex so you don't have to wire up your own message queues.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>agents</category>
      <category>vectordatabase</category>
    </item>
    <item>
      <title>Your Vector Database is Not a Memory System</title>
      <dc:creator>Osamudiamen Osazuwa</dc:creator>
      <pubDate>Wed, 07 Jan 2026 13:25:01 +0000</pubDate>
      <link>https://dev.to/mudiazuwa/your-vector-database-is-not-a-memory-system-24l2</link>
      <guid>https://dev.to/mudiazuwa/your-vector-database-is-not-a-memory-system-24l2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86ieb02a7tbdx32k2qv5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86ieb02a7tbdx32k2qv5.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why raw RAG is failing your users and how structured state solves the "context amnesia" problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We need to stop lying to ourselves. Dumping a thousand JSON objects into Pinecone or Weaviate and calling it "Long Term Memory" is bad architecture.&lt;/p&gt;

&lt;p&gt;I see this pattern in almost every MVP I audit. You take the user’s chat history, chunk it, embed it, and throw it into a vector store. When the user asks a question, you retrieve the top-k chunks.&lt;/p&gt;

&lt;p&gt;This works for document search. It fails for user state.&lt;/p&gt;

&lt;p&gt;The Problem: Semantic Similarity ≠ Situational Relevance&lt;br&gt;
If a user says "I’m allergic to peanuts" on Monday, and "I want a smoothie" on Friday, a naive vector search for "smoothie" will rarely retrieve the peanut allergy constraint. Why? Because "smoothie" and "peanut allergy" are semantically distant in vector space.&lt;/p&gt;

&lt;p&gt;The result? Your bot kills the user (metaphorically, or if it's a food delivery bot, literally).&lt;/p&gt;

&lt;p&gt;You are relying on probability to handle facts. That is an architectural sin.&lt;/p&gt;

&lt;p&gt;The "Bag of Chunks" Issue&lt;br&gt;
Vector DBs store fragments of conversation without synthesis. If a user says:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"I love React." (Day 1)&lt;/li&gt;
&lt;li&gt;"Actually, I hate React now, I use Svelte." (Day 30)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A vector search for "favorite framework" might return both chunks. The LLM then hallucinates a hybrid answer: "The user loves React and Svelte."&lt;/p&gt;

&lt;p&gt;Real memory requires updates, not just accumulation. You need a system that recognizes conflict and overwrites stale data.&lt;/p&gt;

&lt;p&gt;The Solution: Structured State&lt;br&gt;
Memory isn't search; memory is state management.&lt;/p&gt;

&lt;p&gt;We need to treat user facts (allergies, tech stack, budget) as database records, not loose text. The architecture should look like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ingest: LLM parses the conversation.&lt;/li&gt;
&lt;li&gt;Extract: Identify specific entities and attributes.&lt;/li&gt;
&lt;li&gt;Update: Perform a CRUD operation on a user profile object.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the user asks for a smoothie, you don't search for allergies. You inject the user.allergies object directly into the system prompt. Deterministic context beats probabilistic retrieval every time.&lt;/p&gt;

&lt;p&gt;The Fix: Stop treating memory as a search problem. Treat it as a data synchronization problem between the user's brain and your database.&lt;/p&gt;

&lt;p&gt;This pattern of deterministic fact extraction and state updates is the core architecture implemented in mem-ts.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>llm</category>
      <category>rag</category>
      <category>vectordatabase</category>
    </item>
  </channel>
</rss>
