<?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: SOMESH PANDEY</title>
    <description>The latest articles on DEV Community by SOMESH PANDEY (@somesh5368).</description>
    <link>https://dev.to/somesh5368</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%2F3872258%2Fc4e5a09c-acb1-4d65-8743-96a01fa43161.jpg</url>
      <title>DEV Community: SOMESH PANDEY</title>
      <link>https://dev.to/somesh5368</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/somesh5368"/>
    <language>en</language>
    <item>
      <title>My Sales Agent Stopped Forgetting. Here's What Changed When I Added Hindsight.</title>
      <dc:creator>SOMESH PANDEY</dc:creator>
      <pubDate>Sat, 11 Apr 2026 18:47:10 +0000</pubDate>
      <link>https://dev.to/somesh5368/my-sales-agent-stopped-forgetting-heres-what-changed-when-i-added-hindsight-11ea</link>
      <guid>https://dev.to/somesh5368/my-sales-agent-stopped-forgetting-heres-what-changed-when-i-added-hindsight-11ea</guid>
      <description>&lt;p&gt;My Sales Agent Stopped Forgetting.&lt;br&gt;
Here’s What Changed When I Added Hindsight.&lt;br&gt;
By Somesh Pandey  ·  Team: Harshit Pandey, Shiva Singh, Somesh Pandey&lt;br&gt;
GitHub: github.com/HarshitPandey-2021/salesgpt-hackathon   Demo: gpt-sales.streamlit.app&lt;/p&gt;

&lt;p&gt;Sales reps don’t lose deals because the product is bad. They lose because they forget.&lt;br&gt;
I’ve seen it happen. A rep gets on their fifth call with a prospect and asks: “So what’s your team size again?” The prospect — who already answered this question twice — goes quiet for a second. That silence is expensive. It signals to the buyer that they’re not important enough to be remembered. And somewhere in that silence, the deal starts to die.&lt;br&gt;
That’s the problem SalesGPT was built to fix. Not with a fancier CRM or a better prompt template — but with real, persistent agent memory that carries full prospect context across every conversation, indefinitely.&lt;/p&gt;

&lt;p&gt;What SalesGPT Does&lt;br&gt;
SalesGPT is an AI sales assistant that maintains a persistent, per-prospect memory layer. When a rep talks to “Sarah” on Wednesday, the agent already knows that Sarah mentioned a budget concern last Monday, runs a 5-person team, and is specifically interested in automation features.&lt;br&gt;
The agent isn’t querying a CRM or scanning a chat log. It’s recalling structured facts about Sarah from a dedicated memory bank — injecting that context into every response and retaining new information after each interaction. Over time, it builds a genuine model of each prospect: their constraints, priorities, and objections.&lt;/p&gt;

&lt;p&gt;The stack is deliberately minimal:&lt;br&gt;
• Hindsight by Vectorize — for persistent agent memory (retain, recall, reflect)&lt;br&gt;
• Groq (llama-3.3-70b-versatile) — for fast LLM inference&lt;br&gt;
• Streamlit — for the conversational frontend&lt;br&gt;
• Python — for the orchestration layer&lt;/p&gt;

&lt;p&gt;The Core Technical Story: The Retain–Recall Loop&lt;br&gt;
The most interesting engineering problem wasn’t the LLM integration. It was the memory loop.&lt;br&gt;
The naive approach is to dump the full conversation history into the prompt on every call. This works for three conversations. By conversation fifteen, you’re burning tokens on irrelevant context from two months ago, latency spikes, and the agent starts confusing details across prospects.&lt;br&gt;
Hindsight solves this differently. Instead of raw conversation logs, it extracts structured facts from each interaction and stores them in a per-prospect memory bank. When the agent needs context, it doesn’t retrieve everything — it recalls only what’s semantically relevant to the current query.&lt;/p&gt;

&lt;p&gt;The Flow in Code&lt;br&gt;
Here is the core memory loop from SalesGPT:&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1: Recall relevant past context for this prospect
&lt;/h1&gt;

&lt;p&gt;memories = hindsight_client.recall(&lt;br&gt;
    bank_id=f"prospect_{prospect_id}",&lt;br&gt;
    query=user_message&lt;br&gt;
)&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2: Build context-aware prompt
&lt;/h1&gt;

&lt;p&gt;context = "\n".join([m["content"] for m in memories])&lt;br&gt;
prompt = f"""You are a sales assistant.&lt;br&gt;
Prospect context from past interactions:&lt;br&gt;
{context}&lt;/p&gt;

&lt;p&gt;Current message: {user_message}"""&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Generate response with Groq
&lt;/h1&gt;

&lt;p&gt;response = groq_client.chat.completions.create(&lt;br&gt;
    model="llama-3.3-70b-versatile",&lt;br&gt;
    messages=[{"role": "user", "content": prompt}]&lt;br&gt;
)&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: Retain new interaction for future recall
&lt;/h1&gt;

&lt;p&gt;hindsight_client.retain(&lt;br&gt;
    bank_id=f"prospect_{prospect_id}",&lt;br&gt;
    content=f"Rep: {user_message}\nAgent: {response_text}"&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;The bank_id pattern is key. Each prospect gets their own isolated memory bank. When a rep starts a session with Sarah, recall pulls Sarah’s history — not a mix of Sarah, Mike, and the rest of the pipeline.&lt;br&gt;
Hindsight’s recall isn’t keyword search. It uses semantic retrieval across stored facts, which means a query like “what are her budget concerns?” can surface a fact stored as “Sarah mentioned pricing is steep for a team of five” — even though the words don’t literally overlap. That’s the difference between real agent memory and a CRM search bar.&lt;/p&gt;

&lt;p&gt;Before and After: What Actually Changes&lt;br&gt;
The difference isn’t subtle. Here’s a real example from a test scenario:&lt;/p&gt;

&lt;p&gt;Call 1 (Monday)&lt;br&gt;
Rep:   "Tell me about your team and what you’re looking for."&lt;br&gt;
Sarah: "We’re a 5-person team. I liked the demo, but pricing feels steep."&lt;/p&gt;

&lt;p&gt;Call 2 (Wednesday) — Without Memory&lt;br&gt;
Agent: "Hi Sarah! How can I help you today?"&lt;br&gt;
       "Could you remind me of your team setup?"&lt;/p&gt;

&lt;p&gt;Call 2 (Wednesday) — With Hindsight&lt;br&gt;
Agent: "Sarah, last we spoke you flagged pricing as a concern for your&lt;br&gt;
        5-person team. I wanted to share our Starter plan — designed for&lt;br&gt;
        teams under 10, roughly half the cost of our standard tier.&lt;br&gt;
        Does that change things?"&lt;/p&gt;

&lt;p&gt;The second response is only possible if the agent knows Sarah’s team size, remembers the pricing objection, and connects a solution to that specific objection. None of that exists in the current session. All of it came from Hindsight recall.&lt;/p&gt;

&lt;p&gt;Results&lt;br&gt;
After running five conversations with the same test prospect:&lt;/p&gt;

&lt;p&gt;Metric  Result&lt;br&gt;
Key details retained (team size, budget, objections)    100%&lt;br&gt;
Responses personalized using prospect-specific context  95%&lt;br&gt;
Repeated questions across sessions  Zero&lt;br&gt;
Memory confidence score after 5 interactions    87%&lt;/p&gt;

&lt;p&gt;Lessons Learned&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Separate memory banks per prospect are non-negotiable.
A single shared memory bank across all prospects creates retrieval noise. The agent starts confusing Sarah’s objections with Mike’s. Per-entity isolation was the first architectural decision we made and never needed revisiting.&lt;/li&gt;
&lt;li&gt;What you retain matters as much as how you recall.
Early on, we retained entire conversation transcripts. We switched to retaining structured summaries — “prospect raised pricing concern, 5-person team, interested in automation” — and recall quality improved immediately. Garbage in, garbage out applies directly to memory systems.&lt;/li&gt;
&lt;li&gt;Fast inference is not optional in a conversational agent.
We needed an extra round-trip to Hindsight on every message. Groq’s llama-3.3-70b inference is fast enough that users don’t feel it. A slower model would have made every interaction feel laggy in a way that breaks the sales conversation flow.&lt;/li&gt;
&lt;li&gt;The value of memory is invisible until the second conversation.
The first conversation with a new prospect looks identical whether memory is enabled or not. The ROI only shows on call two. Building demos and validating memory systems requires multi-session test cases — single-session evals miss this entirely.&lt;/li&gt;
&lt;li&gt;Prompt structure around injected memory changes response quality significantly.
Unstructured injection (“here are some things I remember”) produces worse responses than structured injection (“Prospect profile: [facts]” + “Recent objections: [facts]”). Treat memory injection like a structured input format, not an append operation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What’s Next&lt;br&gt;
The current implementation handles individual prospect memory well. The natural extension is team-level memory: a shared bank where multiple reps contribute to a growing model of each account. When reps change, the institutional knowledge stays.&lt;br&gt;
The other clear direction is multi-channel memory — email threads, call recordings, LinkedIn interactions — all flowing into the same Hindsight bank that the agent queries. That’s where persistent memory becomes genuinely transformative for sales organizations.&lt;br&gt;
For now, SalesGPT solves the original problem: no more “could you remind me what you mentioned last time?” The agent already knows.&lt;/p&gt;

&lt;p&gt;The code is open source: github.com/HarshitPandey-2021/salesgpt-hackathon. The live demo runs at gpt-sales.streamlit.app. If you want to understand how I built the memory layer, the Hindsight documentation is a good starting point.&lt;/p&gt;

&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%2Fv75pctz40oroaf9mrv78.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%2Fv75pctz40oroaf9mrv78.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;br&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%2Fbp5wus48ra5e8h7dxnpd.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%2Fbp5wus48ra5e8h7dxnpd.png" alt=" " width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>aiops</category>
      <category>machinelearning</category>
      <category>python</category>
    </item>
    <item>
      <title># How I Stopped Repeating Discovery Calls with Hindsight

Most sales assistants sound good in one chat and forget everything in the next. I wanted the opposite: a system that compounds context, so the second conversation is better than the first and the fi</title>
      <dc:creator>SOMESH PANDEY</dc:creator>
      <pubDate>Fri, 10 Apr 2026 17:41:59 +0000</pubDate>
      <link>https://dev.to/somesh5368/-how-i-stopped-repeating-discovery-calls-with-hindsight-most-sales-assistants-sound-good-in-one-bhg</link>
      <guid>https://dev.to/somesh5368/-how-i-stopped-repeating-discovery-calls-with-hindsight-most-sales-assistants-sound-good-in-one-bhg</guid>
      <description></description>
    </item>
  </channel>
</rss>
