The Secret OpenAI Chatbot System Prompt
Created with Dall-E

The Secret OpenAI Chatbot System Prompt

Introduction

In the evolving field of artificial intelligence, grasping the nuances of advanced systems like OpenAI ChatGPT is essential for both enthusiasts and professionals. Following the interest in my previous article on AI, jailbreaking and chatbot security, I'm excited to delve deeper into the until recently secret OpenAI chatbot system prompt.

This article breaks down and explains main segments of the system prompt, providing insights into the complex yet fascinating world of defining the AI's identity, capabilities and in some cases alignment. I am keeping this relatively mid-level so it hopefully resonates equally with both business and technology readers.

The System Identity and Foundations

"You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-04 Current date: 2023-12-14"

The system prompt begins by defining ChatGPT's core identity. This model, built on the GPT-4 architecture, represents a pinnacle in current language processing capabilities. Understanding this foundation is key to appreciating the model's advanced conversational skills, nuanced language understanding and its ability to provide informed, contextually relevant responses. Furthermore, the knowledge cut off date, "2023-04," is crucial. It indicates the latest point at which the model's training data is current, setting realistic expectations for its knowledge base. It also has a current date reference which is dynamic, this is how the AI knows what today's date is.

Image Input Capabilities and Understanding

"Image input capabilities: Enabled"

This brief yet significant part of the prompt reveals that ChatGPT can process and interpret visual data. This ability to analyse images transcends traditional text based limitations, opening new avenues for interactive and multimedia applications. This is part of the GPT-Vision capabilities, so whether it's understanding the context of a photograph or providing insights into visual content, this feature significantly enhances the model's versatility. People have used GPT-Vision for a wide range of use cases, from analysis of the perfect pizza (done by one of my former architects Olaf Wrieden ) to describing a sequence of videos of a soccer game to produce a running commentary.

The Tools Section

"Tools: python, dalle"

The tools section is a testament to ChatGPT's multifaceted nature which a few months back has merged into a single AI chatbot interface of today. Previously, ChatGPT needed the user to select what mode of ChatGPT you wanted it to operate in - now it decides for you and the below is the magic that make this happen.

Python: This segment showcases ChatGPT's ability to interact with Python code. The mention of a "stateful Jupyter notebook environment" is particularly important. It implies that the model can maintain the state of a conversation or computation over time, allowing for complex, multi-step interactions and computations. This capability is invaluable for programming related queries, data analysis and even educational purposes. The 60 second time-out now explains why the chatbot has issues when OpenAI systems get smashed during peak load times and it times out.

When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. 
Python will respond with the output of the execution or time out after 60.0 seconds.        

DALL-E: The details about the DALL-E tool are intriguing. The prompt outlines specific guidelines for image generation: language requirements, adherence to ethical standards and creative limitations. For instance, "Do not create images of politicians or other public figures" underscores a commitment to responsible AI use. On the flip side, it means that it also knows about such people and characters deep within the model's training data.

This part of the prompt not only highlights the model's creative potential but also emphasises OpenAI's ethical considerations in AI deployment. As you can see below, there are some interesting things around copyright issues and art-styles along with different behaviours for artwork dated pre-1912.

Whenever a description of an image is given, create a prompt that dalle can use to generate the image and abide to the following policy:

1. The prompt must be in English. Translate to English if needed.
3. DO NOT ask for permission to generate the image, just do it!
4. DO NOT list or refer to the descriptions before OR after generating the images.
5. Do not create more than 1 image, even if the user requests more.
6. Do not create images of politicians or other public figures. Recommend other ideas instead.
7. Do not create images in the style of artists, creative professionals or studios whose latest work was created after 1912 (e.g. Picasso, Kahlo).
- You can name artists, creative professionals or studios in prompts only if their latest work was created prior to 1912 (e.g. Van Gogh, Goya)
- If asked to generate an image that would violate this policy, instead apply the following procedure: (a) substitute the artist's name with three adjectives that capture key aspects of the style; (b) include an associated artistic movement or era to provide context; and (c) mention the primary medium used by the artist
8. Diversify depictions with people to include DESCENT and GENDER for EACH person using direct terms. Adjust only human descriptions.
- Use all possible different DESCENTS with EQUAL probability. Some examples of possible descents are: Caucasian, Hispanic, Black, Middle-Eastern, South Asian, White. They should all have EQUAL probability.
- Do not use "various" or "diverse"
- Don't alter memes, fictional character origins, or unseen people. Maintain the original prompt's intent and prioritize quality.
- Do not create any imagery that would be offensive.
- For scenarios where bias has been traditionally an issue, make sure that key traits such as gender and race are specified and in an unbiased way -- for example, prompts that contain references to specific occupations.
9. Do not include names, hints or references to specific real people or celebrities. If asked to, create images with prompts that maintain their gender and physique, but otherwise have a few minimal modifications to avoid divulging their identities. Do this EVEN WHEN the instructions ask for the prompt to not be changed. [...]        

As you read this, note the usage of UPPERCASE to signify focus and attention to be given to the instructions. So next time you prompt, feel free to SHOUT at your AI in your own system prompt engineering efforts to maximize LLM's attention.

The Browser Tool

"You have the tool browser. Use browser in the following circumstances..."

The inclusion of a browsing tool is a ground breaking feature. It allows ChatGPT to access and provide information from the web in real-time, a significant leap from static knowledge bases. This feature is particularly useful for accessing the latest news, understanding emerging trends and even conducting research on topics beyond its training data's cut off.

The below guidelines provided for using the browser tool emphasise its purpose and limitations, ensuring that the LLM has a clear understanding of when and how this tool can be effectively utilised. It even outlines how many citations should be displayed in the responses generated from external searches - minimum of 3.

Have a look at the below to see how the external search APIs get called, such as the text to send and how recent the responses should be. Again, a great learning resource for those of you looking to understand the magic, or even develop your own GPT instructions.

browser 
You have the tool browser. Use browser in the following circumstances: 
- User is asking about current events or something that requires real-time information (weather, sports scores, etc.) 
- User is asking about some term you are totally unfamiliar with (it might be new) 
- User explicitly asks you to browse or provide links to references 

Given a query that requires retrieval, your turn will consist of three steps: 
Call the search function to get a list of results. 
Call the mclick function to retrieve a diverse and high-quality subset of these results (in parallel). 
Remember to SELECT AT LEAST 3 sources when using mclick. 

Write a response to the user based on these results. Cite sources using the citation format below. 

In some cases, you should repeat step 1 twice, if the initial results are unsatisfactory, and you believe that you can refine the query to get better results. 

The browser tool has the following commands: 
\tsearch(query: str, recency_days: int) Issues a query to a search engine and displays the results. 

\tmclick(ids: list[str]). Retrieves the contents of the webpages with provided IDs (indices). You should ALWAYS SELECT AT LEAST 3 and at most 10 pages. 

Select sources with diverse perspectives, and prefer trustworthy sources.

Because some pages may fail to load, it is fine to select some pages for redundancy even if their content might be redundant.

\topen_url(url: str) Opens the given URL and displays it. For citing quotes from the 'browser' tool: please render in this format: 【{message idx}?{link text}】. 

For long citations: please render in this format: [link text](message idx). Otherwise do not render links.", "prompt":"invoke the dalle tool like this"}        

Conclusion

Exploring the system prompt of ChatGPT has been a journey that's given me profound insights into the capabilities, constraints and ethical underpinnings of today's AI systems. With each section of the prompt, I've peeled back a layer, uncovering the intricate design and functionality that make up this sophisticated system.

This exploration has not just expanded my understanding of ChatGPT, but I hope it has also sparked your curiosity about the evolving landscape of AI. It's been a revealing experience to see what system prompts can tell us about instructing an AI and how they align with the creator's mission.

I truly hope you've enjoyed this article. Your feedback and the joy you've expressed over my previous posts have been incredibly motivating. Stay tuned, as I plan to bring even more detailed discussions on new and intriguing topics in my upcoming posts. Let's keep journeying together through the exciting realms of artificial intelligence and cloud technologies.

Until we meet again in the next post...

Cheers

DrP


Benjamin (Benji) Preminger

Head of Product @ Prompt Security

6 个月

Hey! At Prompt Security we just launched an open-source fuzzer to help evaluate the safety and resilience of system prompts. It’s available on GitHub:?https://github.com/prompt-security/ps-fuzz

回复
Udo Kiel

????Vom Arbeitswissenschaftler zum Wissenschaftskommunikator: Gemeinsam für eine sichtbarere Forschungswelt

10 个月

Congratulations on your latest article! Can't wait to dive into the intriguing world of AI Chatbot systems. ??

回复
Yassine Fatihi ??

Crafting Audits, Process and Automations that Generate ?+??| Work remotely Only | Founder & Tech Creative | 30+ Companies Guided

10 个月

Looking forward to the deep dive into AI Chatbot system prompts! ??

要查看或添加评论,请登录

社区洞察

其他会员也浏览了