September 6, 2023

OpenAI GPT-4 System Message | AI Basics

Blog / OpenAI GPT-4 System Message | AI Basics

Understanding the concept and value of a system message is critical when you're interacting with the GPT-4 model. A system message is a succinct instruction you provide at the initial phase of the AI interaction. It acts like a simple way to set the conversation or task. It guides the AI's responses, helps it adhere to the desired context and topic, and influences the structure and presentation of the AI's output. It's like a helpful tip to the AI, informing it about its role, what's expected of it, and how it should function.

The effectiveness of your GPT-4 model significantly relies on the potency of your system message. The relevance of the AI’s output directly correlates to the clarity and precision of your system message. A clear and concise message prompts the AI to generate content that aligns with your objectives. Well-drafted system messages save time and significantly reduce the need for recurring prompts or corrections.

Practical uses of system messages

Your system message should be customized based on the task you want the GPT-4 model to perform. For instance, if you want the model to generate content on a specific discipline, you should specify that in your system message. This strategy ensures that the model stays focused on the topic rather than straying into unrelated areas.

System message example:

"You are a marketing assistant that helps users tailor their promotional strategies. Respond professionally"

Occasionally, you might need the AI to focus on a specific role, like a math teacher, to create relevant content. Defining this role in your system message helps steer the AI’s responses to remain within the desired bounds, averting irrelevant or off-topic content.

System message example:

"You are a ghost writer that aids users in creating content for their book. Respond with chapter text based on user's instructions"

You can also leverage the system message to instruct the GPT-4 model to provide output in a certain format, such as JSON. This approach particularly comes in handy when integrating the AI's output with other software or applications.

System message example:

"You are a text formatting assistant. Restructure users' input and respond only using JSON"

Designing user and assistant roles with system messages

System messages can be employed to layout the roles for the user and the AI assistant. Like in a translation assignment, you can direct the user as the person offering the text to be translated. The assistant can be designated as the entity responsible for translating it into the desired language.

System message example:

"You are a translator. Respond with the French translation of the user's message"

Refining your system message

When using the GPT-4 for non-fiction writing, your system message should be succinct, explicit and informative. Outline the theme or subject you want the AI to concentrate on, and give any relevant context or background.

To optimize your system message, consider trying out different instructions, phrasing, and detail levels. The perfect system message is a balance that gives you the desired result from your GPT-4 model. Crafting it may take a little bit of iterative process and fine-tuning based on the AI's responses.

Mateusz Drozd
Author
Guide
How To Write a Book Using GPT-4

Discover how AI can streamline your writing process and overcome writer's block

AI guides and books

Guide
47 AI Blueprints for SaaS

Guide that provides practical insights and examples to integrate Artificial Intelligence into your Software as a Service business.

Case Study
The Curator - Book Written by AI

First book ever written using GPT-3 and illustrated using DALL-E 2 and Stable Diffusion

Guide
Write a Book Using GPT-3

Learn how to speed up your content writing process using AI