<?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: Shaik Irfan</title>
    <description>The latest articles on DEV Community by Shaik Irfan (@shaik_irfan7).</description>
    <link>https://dev.to/shaik_irfan7</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%2F4149021%2F8d4428d1-5207-4003-8bbc-26b7e1342917.png</url>
      <title>DEV Community: Shaik Irfan</title>
      <link>https://dev.to/shaik_irfan7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shaik_irfan7"/>
    <language>en</language>
    <item>
      <title>Building a GEO Agent That Learns with Hindsight</title>
      <dc:creator>Shaik Irfan</dc:creator>
      <pubDate>Tue, 29 Sep 2026 08:34:22 +0000</pubDate>
      <link>https://dev.to/shaik_irfan7/building-a-geo-agent-that-learns-with-hindsight-3nc2</link>
      <guid>https://dev.to/shaik_irfan7/building-a-geo-agent-that-learns-with-hindsight-3nc2</guid>
      <description>&lt;p&gt;When we started thinking about Generative Engine Optimization (GEO), the obvious question was how to measure whether a brand appears in AI-generated answers. But that was only the first half of the problem.&lt;/p&gt;

&lt;p&gt;A scan can tell a founder whether an AI engine mentions their brand. It doesn't tell them what to do next, whether they've already tried it, or whether the last action helped.&lt;/p&gt;

&lt;p&gt;So instead of a reporting tool that produces an isolated result every time, we built an agent that remembers its previous experience. That's where Hindsight came in.&lt;/p&gt;

&lt;p&gt;The system&lt;/p&gt;

&lt;p&gt;A founder enters a brand name on a dashboard and a visibility scan begins.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Scan Agent generates questions a realistic customer might ask an AI assistant.&lt;/li&gt;
&lt;li&gt;Those questions go to engines like ChatGPT and Perplexity.&lt;/li&gt;
&lt;li&gt;Responses are analyzed for mentions of the brand and its competitors.&lt;/li&gt;
&lt;li&gt;The Recommendation Agent receives the current scan and the brand's history from Hindsight.&lt;/li&gt;
&lt;li&gt;The founder implements one recommended action.&lt;/li&gt;
&lt;li&gt;The outcome is written back to Hindsight.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Dashboard → Scan → AI Engines → Recommendation → Hindsight&lt;br&gt;
                                                    ↑   ↓&lt;br&gt;
                                   Outcome ← Founder Action&lt;/p&gt;

&lt;p&gt;Why memory is the core&lt;/p&gt;

&lt;p&gt;An advisor without memory can still give decent advice. The problem shows up when the same brand comes back a week later. The agent sees the current scan, suggests another generic improvement, and has no idea the founder already tried something similar.&lt;/p&gt;

&lt;p&gt;With Hindsight:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scan 1: the actions log is empty, so the recommendation is a baseline.&lt;/li&gt;
&lt;li&gt;Scan 5: the agent sees what was tried and whether visibility moved.&lt;/li&gt;
&lt;li&gt;Scan 10: recommendations can point to specific past actions and their outcomes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Architecture decisions&lt;/p&gt;

&lt;p&gt;We kept the Scan Agent and Recommendation Agent as separate modules. The Scan Agent observes: it generates queries, calls models, and produces a structured scan record. The Recommendation Agent reasons over that record plus the history. Neither Hindsight nor the frontend needs to understand how scanning works internally.&lt;/p&gt;

&lt;p&gt;We also locked the data structures between components:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "brand": "Acme",&lt;br&gt;
  "timestamp": "2026-01-15T10:00:00Z",&lt;br&gt;
  "queries_tested": ["..."],&lt;br&gt;
  "mentions": 3,&lt;br&gt;
  "total_queries": 20,&lt;br&gt;
  "competitors_mentioned": ["..."],&lt;br&gt;
  "raw_snippets": ["..."]&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;That let us build in parallel. The AI pipeline ran against a sample Hindsight record, the memory layer against sample scans, and the frontend against hardcoded JSON. Integration followed a checkpoint order: scan → memory → recommendation → frontend.&lt;/p&gt;

&lt;p&gt;Making the loop visible&lt;/p&gt;

&lt;p&gt;Real learning takes many cycles, so our demo uses a believable ten-scan history and compares scans 1, 5, and 10. The architecture is identical to the real thing. Only the history is synthetic.&lt;/p&gt;

&lt;p&gt;The bigger idea&lt;/p&gt;

&lt;p&gt;The interesting part isn't that an AI system can analyze brand visibility. It's that an agent can connect observation, action, outcome, and memory. The Scan Agent observes, the Recommendation Agent decides, the founder acts, and Hindsight remembers. That makes Hindsight the bridge between one decision and the next, not just a storage component.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>architecture</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
