System Prompts Explained
Introduction: Understanding System Prompts
In the previous lesson, you learned how to make your prompts more effective by using clear instructions and positive reinforcement. Now, let's take a step further and talk about a special type of prompt called a system prompt.
A system prompt is a message that sets the rules or context for how a language model should behave during a conversation. Unlike regular prompts, which are usually questions or requests from the user, system prompts act as instructions for the model itself. They help define the model's role, tone, or personality for the entire session.
For example, if you want the model to act like a helpful assistant, you can set a system prompt that tells it to do so. This is especially useful in chat platforms like CosmoCPT, where you might want the model to stay in character or follow specific guidelines throughout the conversation.
Why Use System Prompts?
System prompts are necessary because they guide the model's behavior from the very beginning. They help you:
- Set the model's role (e.g., a teacher, a cat, an IT specialist)
- Control the tone and style of responses
- Limit or expand what the model can talk about
By using system prompts, you can ensure the model consistently follows your desired guidelines throughout the entire conversation.
Example
Let's look at a real-world example. Imagine you are building a customer support chatbot. You want the chatbot to always be polite and only answer questions related to your product. By setting a system prompt like:
The model will try to follow these instructions in every response.
System prompts are also helpful for creative tasks. For example, if you want the model to write stories as if it were a pirate, you can set a system prompt to make it talk like one.
System Prompts in CosmoCPT
In the practices on our platform, you can set the system prompt in CosmoCPT (the chat UI is labeled ChatCPT) in the following way:
Open Settings in the sidebar.

Enter your system prompt in the "Response Preferences" input field.

That's it! When you click the Apply & New Chat button, the system prompt will be applied to your next prompt.
