Why Does AI keep “Forgetting” Things, like Code Segments or Parts of the Discussion ?

31 Oct. 2024 - - Total Reads 657

Why does AI keep forgetting things

One of the most misunderstood aspects of enterprise AI is how quickly and completely it forgets. Tools like ChatGPT, Claude, or Gemini may sound like they understand and recall information, but under the hood, these models are stateless. Each call to the API is a blank slate. There’s no memory of previous chats, no knowledge of user preferences, and no continuity unless you explicitly build it yourself. This is a major issue when building AI for customer service, sales assistance, coaching tools, or anything requiring follow-up or context.

At a technical level, the AI model only sees what you send in the current prompt. If you want it to remember something, you have to feed that memory back into the prompt each time. That means memory management is not a model feature — it’s an application architecture responsibility. So how do we solve this?

Step 1: Identify and Persist User Identity

Start by assigning every user a unique ID (UUID, email, or account number). On each interaction, log the conversation using this ID.

Step 2: Store and Retrieve Memory

Use a SQL database or a vector store (e.g. Pinecone, Weaviate) to keep chat history, user preferences, or extracted facts. For scalability, embed and store text as vectors, allowing retrieval by semantic similarity.

Step 3: Summarise if Needed

If token limits are an issue, summarise history before sending to the model. Use a separate LLM or prompt to condense.

Step 4: Inject Memory into Prompt

Now you can construct a prompt dynamically, layering in both current user input and summarised memory:

Additional Tips:

Use embedding models (e.g. OpenAI’s text-embedding-3-small) to vectorise long-term memories

For real-time apps, keep for example, recent 2–3 interactions inline; archive older history

Use tools like LangChain or LlamaIndex if you want to manage memory pipelines more easily

If you’re serious about building context-aware AI tools, memory is not optional — it’s foundational. It also separates production-grade systems from flashy demos. As Robert Cialdini teaches in pre-suasion, success comes from what happens before action. This architecture is your pre-suasion: the groundwork that ensures your AI delivers value users remember. Want to fast-track your build with a team that’s solved this? Contact AndMine.

Michael Simonetti, BSc BE MTE
Posted by:

Post Reads: 657

Share this

Go on, see if you can challenge us on "Why Does AI keep “Forgetting” Things, like Code Segments or Parts of the Discussion ?" - Part of our 184 services at AndMine. We are quick to respond but if you want to go direct, test us during office hours.

Add Your Comment

Trusted by

Cooper Mills
Macpherson Kelley
Arc One
Associated Press
Catholic Insurance
Hairhouse Warehouse
Matchbox Homewares
Schiavello
Ego Pharmaceuticals
Garmin
aga logo
MyAccount
Focus On Furniture
ABC
work and training logo
Acquia Certified Site Builder Drupal
TPP
Positive Poster
SMH – The Sydney Morning Herald
Windsorsmith
liberal
Drupal
Max’s
Sunday Creek
University of South Australia
Ebay
Watches of Switzerland
Loan Market
Scrum.org
Microsoft Certified Azure Fundamentals
Bintani Australia
OMS – Order Management System
Tek Ocean
Rackspace
Victorian Government
Marshall White
Oracle
WTFN
Fast.co
Oakdale Meat Co
ACTUATE IP
Naturtint
PranaOn
learning partners logo
Parker Lane
Elucent
Australian Organic Food CO
Ello
Ubertas Group
Melrose Health
Vendor Advocacy Australia
Celebrate Health
Viktoria & Woods
Cronos Australia
Royal Freemasons
Thomson Geer
Amino Active
CCI
Engine Swim
Inferflora
Forbes
Smart Company
AC/DC
White Suede
Launtel
Cell Therapies
Bondi Sands
Natralus Australia
Engineers Without Borders
DUSA, Deakin University Student Association
POSTER Magazine
131 Pizza
DeeWhy Market
Atlantic Group of Companies
NextTech
CB Richard Ellis
Mark Alexander Design
nara logo
Madman Entertainment
Australian Anthill
Green St Juice CO
Tassal
NGS Super
Aqium Gel
Xavier
Uber
Metricon
Federation Square
skillhire logo
Tribe
intowork logo
mas national logo
Unsw Australia
Crumpler
Gadens
GooglePlay
itfe logo
Heat Holders
National Relay Services
help logo
OpenAI
intojobs logo
Magento Solution Specialist
The Age
Chia
One Shift
ISO Certified
Kay&Burton
SunSense Digital Agency
National Museum of Australia
21st Century Australia Party
Magento
SwinBurne University of Technology
Wild Rhino Shoes
Movember
HGG 
interact logo
The Fortune Institute
Melbourne Sports and Aquatic Centre – MSAC
Arthur Galan
Gilbert+Tobin
Beaumont
Melbourne Central
Moov Head Lice
The Canberra Times
Etihad Stadium
ctc logo
Novvi
Carlton Football Club
Jalna
NMI Insurance
Palace Cinemas
McArthur Skincare
The Burger Cheese
Kadac
findstaff logo
Toni&Guy
Australian Government
Castran Gilbert
Fit My Car
Boston Consulting Group
Sports Power
htn logo
Grow Your Business
Cleanfit
Grainshaker
RMIT University
Adobe Professional
Instant RockStar
Craft CMS
Melrose MCT
Tomorrow Stars Basketball
Street Kitchen
High Street Armadale
Eway
Australian Physiotherapy Association
Brisbane Times
MAP
Mecca Brands
Maxine
GPT Group
Florsheim Shoes
LBG Australia and New Zealand
Fairfax Media
Bostik
Mamma Lucia
Taylor Rose
Jetstar
Shell
King Wood Mallesons
French Tables
Rydges
Banki Haddock Fiora
Google
Peter Mac
News
Bulk Nutrients
Coles
The Royal Melbourne Hospital
kestrel logo
Macmillan Publishing
Plants
Melbourne Heart
Vitura Health
Globird
VISSF
Bank of Cyprus
Bigcommerce
Rock Pool Group
Passage To India
Appstore
Federation University Australia
Switzer Media+Publishing
Telstra
nextgenskills logo
Bolle Safety
Paypal
ISO CERTIFIED 27001
Think & Grow Rich Inc
Fresh Cheese Company
Grays Ecommerce
Hanover
OJAY
Herbert Smith Freehills
Liveoneday
CAN- Common Wealth Bank
Dinosaur Designs
Toy World
QV Skincare
ATT logo
James Buyer Advocates
BlackMores
Passage Foods
Dial Before You Dig
iPrimus
ADP Payroll
The University Of Melbourne
Van Egmond Group

Testimonials

I strongly recommend AndMine and Michael's work to any forward thinking company. They have helped us rapidly evolve our business with great success in a very difficult period in retail. From online to offline they are the new generation of advertising delivering brilliant results and service. From simple EDM's to our new online store and creative campaigns, they have gone above and beyond, engrained themselves in our business and amplified our brand. We look forward to what Michael and the team achieve for us next. Harry Goles, OJAY Clothing

More Testimonials
AndMine-Google-Partner-Signature