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

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
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:
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:
Pros and cons of new features
This memory feature sounds cool, but like anything new, it has both advantages and disadvantages.
#advantage :
#shortcoming :
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".