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

31 Oct. 2024 - - Total Reads 3,330

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

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

Testimonials

We absolutely love working with AndMine - our website is always bang up to date, beautifully designed and full of software innovation. I would highly recommend AndMine as the online solution for any forward thinking company. Emma Roberts, Essensuals, Toni&Guy (UK)

More Testimonials
AndMine-Google-Partner-Signature