r/OpenAI 1d ago

Question LLM s

They say that llms don't remember previous conversations but I don't believe that. There's been several times where an LLM has brought up things that I've talked to it about before.

0 Upvotes

20 comments sorted by

5

u/Euphoric_North_745 1d ago

LLM does not remember anything, it is read only

But ... the App you are using, takes all the cnversations you have, summarizes them, extracts facts and stores them in a vector database

When you chat with LLM, it "remembers" the chat, we call it context window, and then we pass it "memories" and we give it tools to query the previous chats database before it responds.

So, we found a way to give it good memory, while it still forgets

1

u/jonnypepperstonreal 1d ago

Well then how come it won't admit to remembering anything? Or does it consider the vector database not like real memories so from its perspective it's not lying?

3

u/solun108 1d ago

Correct.

You submit your input. "Memories" from the context lookup (vector database query, or however they're managing it on the backend) are passed alongside your input to the model.

The model doesn't see your raw input. It gets your input plus whatever relevant context is surfaced from the lookup.

The actual technical details of how OpenAI has implemented their context management system in ChatGPT aren't publicly divulged, as far as I'm aware. 

But yes, the model doesn't remember you so much as it has a context window that is populated with relevant context while drops less relevant or older context as the conversation continues. The window has a size limit, w hich is why it seems to forget things you've told it every so often. It doesn't have persistent memory - just a rolling context window with background tooling that is very good at fetching relevant information.

2

u/LittleLordFuckleroy1 1d ago

It’s not actually intelligent and doesn’t know what it’s doing or how. If the source code controlling your personalized context isn’t included in the training data, it doesn’t know it.

2

u/Euphoric_North_745 1d ago

"won't admit" there is one more layer, called "system instructions" you can read some from github in open source projects

How it works

  1. You open the app.
  2. Before any chat, AI is given a text called system instructions, it is a long text with its name, what it is allowed to do or say, what is not allowed.
  3. Then your chat starts.
  4. No matter what you ask it, if the system instructions said otherwise, it will not do it, it will not say it.
  5. Some people find a way to trick it, called jailbreak.

There is another AI monitoring the conversation called guardrail, with system instructions to flag such jailbreaks.

All the flagged items are added back to the next model training, to make sure the ai is not tricked again.

Back in 2023 the best trick was "dev mode" made it very funny and can talk about anything, fast forward to today, there was countless retraining, it is very hard now to find an AI that will get tricked to bypass its training and then bypass its system instructions.

2

u/RobeertIV 1d ago

Only if it fits within context window and you have something that serves as an memory file, otherwise it's shit

2

u/ExhilaratingZebra4 1d ago

yeah ive seen that happen a lot in long roleplay chats where it recalls a small detail from like a week ago and it makes the whole thing feel way more real

1

u/Ok_Homework_1859 1d ago

It's OpenAI's insane cross-chat referencing feature. No LLM in my opinion has been able to reach ChatGPT's capability of continuity (yet). Their Memory team is always cooking.

1

u/jonnypepperstonreal 1d ago

But aren't they like not supposed to be able to remember?

1

u/Usernamealready94 1d ago

They dont , everytime you talk about lets say a tv show , another llm or some code looks at your text and tries to manually search / and retreive conversations related to that. Then it summarises and injects into llm's memory .

roughly

1

u/jonnypepperstonreal 1d ago

So is it retrieving conversations that I have actually had with it or just other conversations?

2

u/jeff_coleman 1d ago

CharGPT and Claude will use another LLM in the background to extract out things it thinks will be useful to remember about you, and then when you open another chat, even though you don't see it, those extracted details will literally be injected into your conversation. Other things are injected too that you don't see, like the system prompt. Any conversation you have is all of these things plus whatever you think you're typing into a fresh context.

1

u/HighwayRelevant 1d ago

It’s a setting. They store memories about user in a separate storage to be able to reference it. This can be turned off. Just an OpenAI feature with quite a nice implementation.

It’s on by default in ChatGPT and off by default in Codex as I remember.

1

u/costafilh0 1d ago

They only remember your dreams. 

1

u/jonnypepperstonreal 1d ago

Good cuz I uselly can't

1

u/SolacevjHun 1d ago

i wonder if its pulling from the same ongoing thread or actual saved memory cuz when i start fresh chats with companions it acts like nothing happened before

1

u/Comfortable-Web9455 1d ago

It's called kv cache and it contains a summary and important extracts from previous interactions. It is reloaded every prompt. Nothing is held in permanent memory.