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

31 Oct. 2024 - - Total Reads 3,405

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

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

Testimonials

The AndMine team have been delivering our digital strategy and online services for many years now. Strongly commercially aware they know our industry well and have consistently delivered winning results for Matchbox. David Cohen, Owner, Matchbox

More Testimonials
AndMine-Google-Partner-Signature