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

31 Oct. 2024 - - Total Reads 3,406

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: 3.4K

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

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

Testimonials

Michael and his team have just launched our new website and the team at AndMine have been professional and a pleasure to deal with. From the very start, it was evident that Michael was able to deliver a first class website and gave great advice about social media and other tools we need to consider, given the nature of our business. After several design phases, we worked closely together and achieved a result that we are very happy with. I wouldn’t hesitate recommending AndMine for web and online marketing related services. Illona Vak, C Squared Executive

More Testimonials
AndMine-Google-Partner-Signature