<?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: Abhinaya</title>
    <description>The latest articles on DEV Community by Abhinaya (@abhinaya_1031).</description>
    <link>https://dev.to/abhinaya_1031</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%2F3840574%2F7b604511-e481-4a89-8053-f7268d89737e.png</url>
      <title>DEV Community: Abhinaya</title>
      <link>https://dev.to/abhinaya_1031</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhinaya_1031"/>
    <language>en</language>
    <item>
      <title>Building Hindsight into My Workspace Sidebar</title>
      <dc:creator>Abhinaya</dc:creator>
      <pubDate>Mon, 23 Mar 2026 18:29:22 +0000</pubDate>
      <link>https://dev.to/abhinaya_1031/building-hindsight-into-my-workspace-sidebar-30l4</link>
      <guid>https://dev.to/abhinaya_1031/building-hindsight-into-my-workspace-sidebar-30l4</guid>
      <description>&lt;p&gt;I thought 'context' just meant using a massive window for everything—until I watched Hindsight synthesize fifty disjointed chat messages into a coherent meeting summary using nothing but relational data and Mongoose population.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I was trying to build&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Over the last six months, I’ve been working on an AI-powered project manager.&lt;/p&gt;

&lt;p&gt;The idea is straightforward.&lt;br&gt;
Instead of digging through Slack messages, Jira tickets, or Zoom transcripts, I wanted a system where someone could just ask:&lt;/p&gt;

&lt;p&gt;“Why are we still blocked on the Postgres migration?”&lt;/p&gt;

&lt;p&gt;and get a direct, useful answer.&lt;/p&gt;

&lt;p&gt;The stack itself is fairly standard:&lt;/p&gt;

&lt;p&gt;FastAPI on the backend&lt;br&gt;
React on the frontend&lt;br&gt;
SQLAlchemy for structured data&lt;/p&gt;

&lt;p&gt;That part wasn’t the problem.&lt;/p&gt;

&lt;p&gt;The real difficulty showed up elsewhere.&lt;br&gt;
It wasn’t about managing tasks or designing schemas.&lt;/p&gt;

&lt;p&gt;It was about capturing and understanding how the team actually works—the informal decisions, shifting responsibilities, and context that never makes it into a database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where things broke: RAG&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I started with a standard RAG setup where vector search on chat logs and the top results added to the prompt&lt;br&gt;
It worked for simple queries. It failed for anything dynamic.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bob: “I’ll fix the bug tomorrow”&lt;/li&gt;
&lt;li&gt;Later: “Alice is taking it”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the system retrieves only the first message, the answer is wrong.&lt;/p&gt;

&lt;p&gt;The issue wasn’t retrieval quality.&lt;br&gt;
It was that the system didn’t understand change over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I needed instead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I needed the system to learn from sequences, not snapshots.&lt;br&gt;
That led me to Hindsight.&lt;br&gt;
Instead of storing text chunks, it builds structured memory that evolves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How I implemented it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I added two operations:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Retain&lt;/strong&gt; to store events&lt;br&gt;
&lt;strong&gt;2. Reflect&lt;/strong&gt; to synthesize patterns&lt;/p&gt;

&lt;p&gt;Every important event goes into memory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;record_task_completion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;task_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DBTask&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;memory_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;retain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;assigned_to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Task &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; completed. AI Rationale: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ai_rationale&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;project_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;project_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;task_completion&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;memory_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reflect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;mission&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Identify team velocity and skill patterns.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;What I got wrong first&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I triggered reflection after every event.&lt;br&gt;
That made the system unstable.&lt;/p&gt;

&lt;p&gt;Reflection is not storage. It’s inference.&lt;br&gt;
If you run it too early, it draws weak conclusions.&lt;/p&gt;

&lt;p&gt;What worked better:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;batch events&lt;/li&gt;
&lt;li&gt;run reflection after meetings&lt;/li&gt;
&lt;li&gt;or after a fixed number of updates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;** Turning decisions into memory**&lt;/p&gt;

&lt;p&gt;I used to treat decisions as database rows.&lt;/p&gt;

&lt;p&gt;Now they exist in two places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL (explicit record) and  memory (learned understanding)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: “No Friday deployments”&lt;/p&gt;

&lt;p&gt;Initially, it was seeded data.&lt;br&gt;
Over time, the system started deriving it from past incidents.&lt;br&gt;
**&lt;br&gt;
Retrieval changed completely**&lt;/p&gt;

&lt;p&gt;Instead of pulling raw messages, I started querying for patterns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;learned_patterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;memory_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What are our recurring project risks?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;strategy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;relational&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is not logs.&lt;br&gt;
It’s synthesized observations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where this approach helped most&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Conflicting information.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docs say: “Use OAuth2”&lt;/li&gt;
&lt;li&gt;Later decision: “Use API keys for MVP”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RAG may surface outdated docs.&lt;/p&gt;

&lt;p&gt;The memory system prioritizes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;newer information&lt;/li&gt;
&lt;li&gt;authoritative sources&lt;/li&gt;
&lt;li&gt;repeated patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So it adapts automatically.&lt;/p&gt;

&lt;p&gt;** What the system outputs now**&lt;/p&gt;

&lt;p&gt;Instead of generic answers, I get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alice is faster on database tasks but currently overloaded&lt;/li&gt;
&lt;li&gt;FastAPI is the standard due to async performance&lt;/li&gt;
&lt;li&gt;Repeated delays are linked to a specific dependency choice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not stored facts.&lt;br&gt;
They are learned conclusions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Reflection needs discipline&lt;/strong&gt;&lt;br&gt;
Run it in batches. Not continuously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. SQL and memory solve different problems&lt;/strong&gt;&lt;br&gt;
SQL answers “what happened”&lt;br&gt;
Memory answers “what it means”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Metadata matters&lt;/strong&gt;&lt;br&gt;
User, project, and event type improve everything downstream&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. This is not search&lt;/strong&gt;&lt;br&gt;
If I need a past message, I use search&lt;br&gt;
If I need understanding, I use memory&lt;/p&gt;

&lt;p&gt;** Final thought**&lt;/p&gt;

&lt;p&gt;I stopped thinking of this as an AI wrapper.&lt;/p&gt;

&lt;p&gt;It’s a system that learns.&lt;/p&gt;

&lt;p&gt;If an AI forgets what happened last week, the issue is not context size.&lt;/p&gt;

&lt;p&gt;It’s the lack of a mechanism to reflect and update its understanding.&lt;/p&gt;

&lt;p&gt;That’s what Hindsight changed for me.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>backend</category>
      <category>productivity</category>
      <category>python</category>
    </item>
  </channel>
</rss>
