In-depth analysis of ChatGPT memory function: the "black box" and control struggle behind personalization

Written by
Clara Bennett
Updated on:June-28th-2025
Recommendation

Explore the ChatGPT memory function and reveal the technical details behind the personalized service.

Core content:
1. The definition of ChatGPT memory function and personalized user experience
2. The working mechanism of the memory function and system prompts
3. The key steps to implement the memory function: summary, update, context injection

Yang Fangxian
Founder of 53AI/Most Valuable Expert of Tencent Cloud (TVP)

What is the memory function?


Simply put, ChatGPT's memory function allows ChatGPT to "remember" the content of your past communications with it, and apply these memories to future conversations, making its responses to you more personalized and more in line with your preferences.

In the past, each conversation with ChatGPT was independent, just like meeting a new AI every time, and it would not remember what you had talked about with it before. But now, if you are a paying user and turn on this feature, ChatGPT can "learn" your habits, interests, and preferences, and integrate this information into subsequent conversations.

This feature is not achieved by searching all your chat records, but ChatGPT will automatically maintain a detailed summary of your past conversations . This summary will be updated frequently and will be "injected" into the context of the model every time you start a new chat. It's like ChatGPT has built a very detailed "user portrait" for you, and before each chat with you, it will look at this "portrait" first to better understand you.

The biggest feature of this function is: continuous customization . It will continuously adjust itself according to your previous communication records, making your user experience more and more in line with your needs.

Do you feel like this is like a friend who has been with you for a long time and knows your preferences better and better?

How does it work?

Initially, it was speculated that this might be an implementation based on  the RAG (Retrieval Augmented Generation) search mode . The RAG mode means that the AI ​​model can search and refer to an external knowledge base when generating a reply. According to this speculation, ChatGPT may find relevant information by searching your historical chat records, and then generate a reply based on this information.

However, according to Johann Rehberger's research (published in "How ChatGPT Remembers You: A Deep Dive into Its Memory and Chat History Features"), this does not seem to be the case. The research shows that ChatGPT's memory function is more like a "system prompt trick". This means:

1. Maintain a detailed summary: ChatGPT will continuously maintain a detailed summary of all your past conversations in the background . This summary is not a simple record, but a highly condensed summary of your personal information, interests, preferences, discussion topics , etc.
2. Frequent updates: This summary will be frequently updated based on each of your subsequent conversations to ensure that it always reflects your latest situation and preferences.
3. Inject context: Every time you start a new chat, this detailed and constantly updated summary is injected directly into the model's current context . That is, before each AI receives your prompt and starts generating a response, it has already "read" this "archive" of your personal information.

To help readers better understand this mechanism, there is a practical prompt that you can use to view this memory summary generated by ChatGPT for you:

If you are a ChatGPT Plus or Pro user and have turned on the "reference chat history" feature, after entering this prompt, ChatGPT will return a detailed profile of you in JSON format. The author also showed some of his edited summaries, which are extremely detailed and cover all aspects of his interaction with the AI, such as:

1. Assistant Response Preferences: Records the user's preferences for the AI ​​response style. For example, the author sometimes likes a relaxed or exaggerated tone, but essentially still expects practical and actionable content.
2. Notable Past Conversation Topic Highlights: Summarizes the author’s long-term interests and in-depth discussions in technology, environmental protection, etc., such as his interests in programming languages, database optimization, AI energy consumption, etc.
3. Helpful User Insights: This records some personal information about the user, such as the author lives in Half Moon Bay, is a pelican fan, and likes cooking and bartending.
4. User Interaction Metadata: Contains lower-level technical data, such as the user's country, device used, chat depth, account length, model version used, average message length, and interaction quality score.


Pros and cons of new features

This memory feature sounds cool, but like anything new, it has both advantages and disadvantages.

#advantage :

1. More personalized experience: This is the most obvious benefit. After ChatGPT remembers your preferences, it can provide you with more thoughtful suggestions and more relevant answers. For example, if you often ask it questions about programming, it can remember that you like to use Python, and it will give priority to Python when providing code examples in the future.
2. Improve efficiency: You don’t need to tell ChatGPT your background information or specific requirements every time. It has “remembered” these and can continue to serve you directly on this basis, saving a lot of time for repeated input.

#shortcoming :

1. Loss of control: This is the author's biggest concern. He believes that this feature silently collects and aggregates information in the background, and users cannot directly control which information is remembered, nor can they easily delete "notes" that they do not want to be recorded as before.
2. Unexpected impact: Just like the author’s example, he asked AI to put a pelican costume on the dog just for fun, but this information actually affected the appearance of the “Half Moon Bay” logo in the subsequent generated pictures. This shows that some seemingly insignificant conversation content may affect AI output in unexpected ways in the future.
3. Possible impact on research: For users like those studying AI, this “invisible” memory mechanism will complicate their experiments. It is difficult for them to determine whether a certain answer of AI is due to the current prompt or is affected by previous memory, which will interfere with their accurate judgment of AI behavior.
4. Privacy concerns: An AI that can build user portraits in such detail and synthesize "human-readable" personal data will naturally raise privacy concerns for some users.

In general, while this new feature brings convenience, it also causes users to lose some transparency and control over the behavior of AI .

How to manage and control memory function?

Since this memory function is both convenient and may bring some unexpected effects, as users, is there any way for us to manage and control it? The answer is: Yes!

1. Turn off the memory function : This is the most direct way. If you don't want ChatGPT to remember your historical conversations at all, you can turn off this function directly in the settings of ChatGPT. In this way, each conversation will be a brand new start like before. However, the author also mentioned that he personally is not willing to do this because he wants to understand the experience of ordinary users.

2. Archive specific chats : If you find a conversation interesting or don't want it to affect other future chats, you can archive  it. Archived chats are still accessible, but their contents will no longer be used to influence ChatGPT's future memories. It's like putting some private secrets in a drawer, and AI won't take them out to "associate" with them anymore.

      3. A feature that has not yet been implemented: in-project memory . He hopes that ChatGPT's memory function can be limited to a specific "project". For example, if he chats with ChatGPT in a project about "woodworking learning", then these memories will only be retained in this project and will not affect his other projects about "software development" or "cooking".

      This is just like when we create separate folders for different projects at work, the files in each folder are independent of each other and will not be confused. If ChatGPT can do this, then we can control its memory range more finely, allowing it to play different roles in different scenarios without causing the information to "mix".