<?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: Anjali Jakka</title>
    <description>The latest articles on DEV Community by Anjali Jakka (@anjali_jakka).</description>
    <link>https://dev.to/anjali_jakka</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%2F4148454%2F60d28c06-564b-48fd-b0ea-8fd729250d2a.png</url>
      <title>DEV Community: Anjali Jakka</title>
      <link>https://dev.to/anjali_jakka</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anjali_jakka"/>
    <language>en</language>
    <item>
      <title>Building an AI Customer Support Agent with Memory</title>
      <dc:creator>Anjali Jakka</dc:creator>
      <pubDate>Tue, 29 Sep 2026 05:36:49 +0000</pubDate>
      <link>https://dev.to/anjali_jakka/building-an-ai-customer-support-agent-with-memory-1616</link>
      <guid>https://dev.to/anjali_jakka/building-an-ai-customer-support-agent-with-memory-1616</guid>
      <description>&lt;p&gt;Customer-support systems can answer questions quickly, but a useful support agent needs more than a good-looking response. It needs to understand what happened before.&lt;/p&gt;

&lt;p&gt;While working on ResolveIQ Lite, I focused on the LLM layer of our AI-powered customer-support agent. My goal was to make the model use relevant customer history while avoiding information that was never provided.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;br&gt;
Imagine a customer previously said:&lt;/p&gt;

&lt;p&gt;“My order A104 arrived damaged. I want a replacement.”&lt;br&gt;
Later, they send:&lt;/p&gt;

&lt;p&gt;“I still haven't received my replacement.”&lt;br&gt;
Without memory, the AI doesn't know which order the customer means.&lt;/p&gt;

&lt;p&gt;With relevant memory, it can connect the message to A104.&lt;/p&gt;

&lt;p&gt;But there is an important limitation: the AI should not invent information.&lt;/p&gt;

&lt;p&gt;For example, it should not say:&lt;/p&gt;

&lt;p&gt;“Your replacement was shipped yesterday and will arrive tomorrow.”&lt;br&gt;
unless that information actually exists in the available history.&lt;/p&gt;

&lt;p&gt;This became the main focus of my implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How the system works&lt;/strong&gt;&lt;br&gt;
The flow is:&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F69ijf2z3n85ld0mn87ei.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F69ijf2z3n85ld0mn87ei.png" alt=" " width="799" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A teammate worked on the memory/retrieval component. I worked on agent.py, which takes the recalled memories and the current customer message and generates the response.&lt;/p&gt;

&lt;p&gt;The recalled information is added to the LLM prompt as PAST HISTORY&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa3brvn3kxj6ujyjr2jmi.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa3brvn3kxj6ujyjr2jmi.png" alt=" " width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gives the model a clear distinction between current information and previously remembered information.&lt;/p&gt;

&lt;p&gt;Prompt engineering became important&lt;br&gt;
Simply giving an LLM memory doesn't guarantee that it will use it correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I added rules telling the agent to:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use previous history when relevant.&lt;br&gt;
Refer to earlier orders or problems when appropriate.&lt;br&gt;
Never pretend to remember something that isn't available.&lt;br&gt;
Never invent tracking numbers, dates, or policies.&lt;br&gt;
Never claim that a refund or replacement was completed without evidence.&lt;br&gt;
Ask for missing information when necessary.&lt;br&gt;
Keep responses short, warm, and specific.&lt;/p&gt;

&lt;p&gt;One useful test was running the same message with and without memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With memory&lt;/strong&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx4xaaxe339im3l9o50lo.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx4xaaxe339im3l9o50lo.png" alt=" " width="800" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The agent can identify the relevant previous incident.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without memory&lt;/strong&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6aq7rxxjmcwlourayd4.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6aq7rxxjmcwlourayd4.png" alt=" " width="800" height="92"&gt;&lt;/a&gt;&lt;br&gt;
Now the agent should ask for the missing order information instead of pretending it remembers A104.&lt;/p&gt;

&lt;p&gt;This helped verify that the memory was actually influencing the response.&lt;/p&gt;

&lt;p&gt;One failure taught me an important lesson&lt;br&gt;
During testing, I encountered a response similar to:&lt;/p&gt;

&lt;p&gt;“Thank you for confirming it's order A104.”&lt;br&gt;
The customer had not confirmed A104.&lt;/p&gt;

&lt;p&gt;The model had correctly retrieved A104 from memory, but then treated the remembered information as if the customer had just provided it.&lt;/p&gt;

&lt;p&gt;This showed me that agent memory isn't only about retrieval. The model also needs clear rules about what is known, what is remembered, and what is actually confirmed by the customer.&lt;/p&gt;

&lt;p&gt;I tightened the prompt accordingly and continued testing.&lt;/p&gt;

&lt;p&gt;Adding model fallback&lt;br&gt;
I also added a fallback mechanism so the response generator doesn't depend on only one model.&lt;/p&gt;

&lt;p&gt;The agent tries the configured models in sequence:&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnqyyjk9lu9jy9pkzvgi0.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnqyyjk9lu9jy9pkzvgi0.png" alt=" " width="799" height="203"&gt;&lt;/a&gt;&lt;br&gt;
If one model fails, the next configured model can be tried.&lt;/p&gt;

&lt;p&gt;I also remove ... sections before returning the customer-facing response.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Memory needs boundaries. Giving an LLM more context doesn't automatically make it more accurate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test with and without memory. This is a simple way to check whether retrieved history is actually affecting the response.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test failure cases. Questions about missing tracking numbers, delivery dates, or policies can reveal when the model starts inventing information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prompt engineering is part of system design. The prompt defines what the agent can and cannot claim.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test the fallback deliberately. A fallback is useful only when the configured models are actually available.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The result&lt;/strong&gt;&lt;br&gt;
The LLM component of ResolveIQ Lite now follows a s imple principle:&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvvv4pvmnun81v6fcz48o.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvvv4pvmnun81v6fcz48o.png" alt=" " width="800" height="303"&gt;&lt;/a&gt;&lt;br&gt;
The goal isn't simply to make the AI sound confident.&lt;/p&gt;

&lt;p&gt;It is to make the AI use customer history when it has it, ask for information when it doesn't, and avoid presenting assumptions as facts.&lt;/p&gt;

&lt;p&gt;That was my main learning from building the LLM layer of ResolveIQ Lite.&lt;/p&gt;

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