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

31 Oct. 2024 - - Total Reads 2,801

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

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 183 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

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

Testimonials

We aren't exactly 'IT savvy' but AndMine's Marketing Software is simple to use and the guys are always there to help us out. We send out eNewsletters and automated Birthday offers with ease, keeping the restaurant busy and our 10,000+ members happy. All The Team, La Camera Restaurant

More Testimonials
AndMine-Google-Partner-Signature