How to Store & Protect Personal Context in ChatGPT

Introduction

ChatGPT is based on Generative Pre-trained Transformers (GPT). These models are pre-trained on a large amount of data from the internet and are designed to generate responses in human natural language based on the input they receive.

Storing personal context in ChatGPT allows the AI model to generate more specific responses based on the user’s history, preferences, and specific circumstances. This can allow for more personalized, accurate, and relevant interactions between the user and the model.

However, storing personal information also raises privacy concerns. Therefore, it is important to protect personal context effectively when storing personal information in ChatGPT. This article aims to provide an overview of the steps involved in storing personal context in ChatGPT, provide a comparison between the different ChatGPT models, and highlight techniques to protect personal information.

Storing Context in ChatGPT

ChatGPT stores context by sending the current prompt, along with a part of the previous conversation (as much as the token limit allows for) as the input to its model. When using OpenAI's GPT models in your applications, this technique can be used by including context in the ChatML document.

The ChatML document in GPTs allows for three roles: system, user, and assistant. To store personal context in ChatGPT so it refers to this information for future responses, you can include the following code in your ChatML document:

[{
  "role": "system",
  "content": "You are ChatGPT, a large language model trained by OpenAI. You take the user's personal information to provide precise responses.\\nKnowledge cutoff: 2021-09-01\\nCurrent date: [current_date]"
}},

{
  "role": "user",
  "content": "I am providing you with personal context to keep in mind for future responses: [include personal context here]"
}},

{
  "role": "assistant",
  "content": "Got it. How can I assist you today?"
}},

{
  "role": "user",
  "content": "[future requests]"
}}

Using this method, specific personal context can be saved in GPT models. However, another way to achieve the same result can be sending personal context in the beginning of every chat.

When using the ChatGPT website, personal context can be stored by providing the chatbot with information in the beginning of the chat for users that are using GPT-3.5. Users that have access to ChatGPT Plus (GPT-4), can create their own GPTs and feed personal information in the process. This can be done by either writing the personal information or uploading a file in the GPT creator.

Comparison Between Different GPTs

The ability to store personal context in ChatGPT varies between different GPTs because of their different context windows that is measured in the number of tokens and defines how much information the model can take into account or “remember” for any given input. Here is a breakdown of the context limits of the GPTs offered by OpenAI:

Model Context Window
gpt-4-0125-preview 128,000
gpt-4-turbo-preview 128,000
gt-4-1106-preview 128,000
gpt-4-vision-preview 128,000
gpt-4-1106-vision-preview 128,000
gpt-4 8,192
gpt-4-0613 8,192
gpt-4-32k 32,768
gpt-4-32k-0613 32,768
gpt-3.5-turbo-0125 16,385
gpt-3.5-turbo 16,385
gpt-3.5-turbo-1106 16,385
gpt-3.5-turbo-instruct 4,096
gpt-3.5-turbo-16k 16,385
gpt-3.5-turbo-0613 4,096
gpt-3.5-turbo-16k-0613 16,385

According to the table above, GPT-4 versions are the best models to consider if context is an important factor in your application.

Techniques to Protect Personal Information

Data Minimization: GPT models collect data to improve their performance. Considering this, try to minimize the data fed to the model to only include the necessary information required for the task at hand.

Turn Off Chat History & Training: This option is available in the settings on the ChatGPT website. By turning it on, your information will no longer be saved and used for model training.

Monitor for Data Breaches: Keep an eye out for news regarding data breaches with OpenAI. In such an occurrence, take action immediately according to the data you have shared.

Anonymize Data: There are tools available that can anonymize the data shared with ChatGPT. For example, you can switch some personal information with placeholder text, and de-anonymize the output where the same text appears.

Conclusion

Storing personal context in ChatGPT can be helpful for applications that require a more personalized output. Though, when doing so it is important to protect the sensitive information you may share when providing context to protect against data breaches. This article provided an overview of the process of storing context in ChatGPT, a comparison between the context windows for various GPT models (that are available up to date), and some techniques to protect personal data when interacting with ChatGPT.

References

https://cobusgreyling.medium.com/when-using-the-chatgpt-api-users-will-have-to-manage-the-context-ba5869238913

https://community.openai.com/t/how-can-i-maintain-conversation-continuity-with-chat-gpt-api/574819

https://platform.openai.com/docs/models/overview

https://www.popsci.com/diy/chatgpt-privacy-tips/

https://www.pandasecurity.com/en/mediacenter/protect-personal-data-chatgpt/

https://coda.io/@faridsabitov/anonymize-data

Previous
Previous

Building Backend with Flutter using Celest

Next
Next

Top 20 Generative AI Products for Productivity