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

31 Oct. 2024 - - Total Reads 2,316

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.3K

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

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

Testimonials

Metricon recently worked with AndMine on a major online brand promotion. We were impressed with AndMine’s thinking from concept stage through to campaign execution. We would not hesitate to brief AndMine again on future projects. Yvonne Abood, Marketing Manager, Metricon Homes

More Testimonials
AndMine-Google-Partner-Signature