<?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: Shiv Shankar</title>
    <description>The latest articles on DEV Community by Shiv Shankar (@shiv_s_hankar).</description>
    <link>https://dev.to/shiv_s_hankar</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%2F4050861%2F76238f0e-97c8-4572-9b70-a6adc97e2ceb.png</url>
      <title>DEV Community: Shiv Shankar</title>
      <link>https://dev.to/shiv_s_hankar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shiv_s_hankar"/>
    <language>en</language>
    <item>
      <title>Why Flat Vector Retrieval Fails on Long-Term Agent Memory (And How Bi-Temporal SVO Modeling Fixes It)</title>
      <dc:creator>Shiv Shankar</dc:creator>
      <pubDate>Tue, 28 Jul 2026 10:13:32 +0000</pubDate>
      <link>https://dev.to/shiv_s_hankar/why-flat-vector-retrieval-fails-on-long-term-agent-memory-and-how-bi-temporal-svo-modeling-fixes-2fjn</link>
      <guid>https://dev.to/shiv_s_hankar/why-flat-vector-retrieval-fails-on-long-term-agent-memory-and-how-bi-temporal-svo-modeling-fixes-2fjn</guid>
      <description>&lt;p&gt;When building autonomous AI agents, developers often start with a flat vector database (like ChromaDB or Pinecone) to store conversation history. However, as agent sessions scale, flat vector search faces a fundamental limitation: &lt;strong&gt;it cannot encode time&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Core Problem: Flat Vectors Don't Know "When"
&lt;/h3&gt;

&lt;p&gt;If a user says &lt;em&gt;"I live in New York"&lt;/em&gt; on Monday, and then &lt;em&gt;"I moved to San Francisco"&lt;/em&gt; on Friday, a standard vector search for &lt;em&gt;"Where does the user live?"&lt;/em&gt; will retrieve &lt;strong&gt;both&lt;/strong&gt; statements with high cosine similarity. The agent receives conflicting facts and hallucinates.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: Bi-Temporal Dual-Calendar Memory (Smriti)
&lt;/h3&gt;

&lt;p&gt;To solve this, &lt;strong&gt;&lt;a href="https://smriti-kaal.vercel.app/" rel="noopener noreferrer"&gt;Smriti&lt;/a&gt;&lt;/strong&gt; uses a bi-temporal architecture in PostgreSQL:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SVO Event Extraction&lt;/strong&gt;: Turns are parsed into Subject-Verb-Object (SVO) assertions with explicit &lt;code&gt;valid_from&lt;/code&gt; and &lt;code&gt;valid_to&lt;/code&gt; timestamps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-LLM Fact Supersession&lt;/strong&gt;: When a new fact arrives, an in-process statistical engine invalidates the prior &lt;code&gt;valid_to&lt;/code&gt; timestamp without needing slow, expensive LLM reflection passes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Point-in-Time Queries&lt;/strong&gt;: Queries evaluate &lt;code&gt;valid_to IS NULL&lt;/code&gt; for active truths, keeping the context window 100% clean.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Check out the live API and benchmarks at &lt;a href="https://smriti-kaal.vercel.app/" rel="noopener noreferrer"&gt;smriti-kaal.vercel.app&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
