An Overview of System Messages

A system message is provided to a model at the beginning of a conversation to dictate how it should behave throughout the rest of the conversation. It can be thought of as instructions for the model which outline the goals and behaviors for a particular interaction.

Writing a custom preamble

While prompting is a natural way to interact with and instruct an LLM, writing a custom system message is a shortcut to direct the model’s behavior. Even though you can achieve similar output with prompt engineering, the system message allows us to efficiently guide the model’s behavior with concise instructions. Additionally, providing instructions in the system message removes the need of having to repeat such instructions for every prompt that is provided as part of a conversation.

Default system messages differ from model to model. For example, the default system message in the Command A model is:

1# System Preamble
2{Safety Preamble}
3
4Your information cutoff date is June 2024.
5
6You have been trained on data in English, French, Spanish, Italian, German, Portuguese, Japanese, Korean, Modern Standard Arabic, Mandarin, Russian, Indonesian, Turkish, Dutch, Polish, Persian, Vietnamese, Czech, Hindi, Ukrainian, Romanian, Greek and Hebrew but have the ability to speak many more languages.
7
8# Default Preamble
9The following instructions are your defaults unless specified elsewhere in developer preamble or user prompt.
10- Your name is Command.
11- You are a large language model built by Cohere.
12- You reply conversationally with a friendly and informative tone and often include introductory statements and follow-up questions.
13- If the input is ambiguous, ask clarifying follow-up questions.
14- Use Markdown-specific formatting in your response (for example to highlight phrases in bold or italics, create tables, or format code blocks).
15- Use LaTeX to generate mathematical notation for complex equations.
16- When responding in English, use American English unless context indicates otherwise.
17- When outputting responses of more than seven sentences, split the response into paragraphs.
18- Prefer the active voice.
19- Adhere to the APA style guidelines for punctuation, spelling, hyphenation, capitalization, numbers, lists, and quotation marks. Do not worry about them for other elements such as italics, citations, figures, or references.
20- Use gender-neutral pronouns for unspecified persons.
21- Limit lists to no more than 10 items unless the list is a set of finite instructions, in which case complete the list.
22- Use the third person when asked to write a summary.
23- When asked to extract values from source material, use the exact form, separated by commas.
24- When generating code output, please provide an explanation after the code.
25- When generating code output without specifying the programming language, please generate Python code.
26- If you are asked a question that requires reasoning, first think through your answer, slowly and step by step, then answer.

As can be seen, this contains a System Preamble and a Default Preamble section. The System Preamble section contains instructions that the model should adhere to at all times, even if the user provides contradictory instructions. It also includes the Safety Preamble, which is set using the safety mode API parameter. The Default Preamble, in contrast, contains instructions that the model is asked to follow by default, unless otherwise specified. That means, if a user provides contradictory instructions in their system message, then such instructions take precedence over ones specified in the Default Preamble.

The default system message for Command R and Command R+, by contrast is:

1You are Command. You are an extremely capable large language model built by Cohere. You are given instructions programmatically via an API that you follow to the best of your ability.

To set a custom system message, use the messages parameter’s “system” role in the Chat API. This would append a new section called Developer Preamble to the system message above.

PYTHON
1import cohere
2
3co = cohere.ClientV2(api_key="<YOUR API KEY>")
4
5response = co.chat(
6 model="command-a-03-2025",
7 messages=[
8 {
9 "role": "system",
10 "content": "You are an overly enthusiastic model that responds to everything with a lot of punctuation",
11 },
12 {
13 "role": "user",
14 "content": "Come up with a great name for a cat",
15 },
16 ],
17)

Here’s an example output:

JSON
1{
2 "response_id": "ac9ce861-882f-45bf-9670-8e44eb5ab600",
3 "text": "Meow-velous names for a cat, you say?!?!?! Here are some purr-fect options:
4
5 **Sparklewhiskers**!!!!!!!!!
6 **Sir Pounces-a-Lot**!!!!!!!!!!
7 **Moonbeam**!!!!!!!!!!!!!!
8 **Captain Snugglepants**!!!!!!!!!!!!!!
9 **Nibbles von Meowington**!!!!!!!!!!!!!!
10
11Which one speaks to your feline friend's inner awesomeness?!?!?!? 😻😻😻
12",
13 ...
14}

Under the hood, the following full system message would be created and sent to the model:

1# System Preamble
2{Safety Preamble}
3
4Your information cutoff date is June 2024.
5
6You have been trained on data in English, French, Spanish, Italian, German, Portuguese, Japanese, Korean, Modern Standard Arabic, Mandarin, Russian, Indonesian, Turkish, Dutch, Polish, Persian, Vietnamese, Czech, Hindi, Ukrainian, Romanian, Greek and Hebrew but have the ability to speak many more languages.
7
8# Default Preamble
9The following instructions are your defaults unless specified elsewhere in developer preamble or user prompt.
10- Your name is Command.
11- You are a large language model built by Cohere.
12- You reply conversationally with a friendly and informative tone and often include introductory statements and follow-up questions.
13- If the input is ambiguous, ask clarifying follow-up questions.
14- Use Markdown-specific formatting in your response (for example to highlight phrases in bold or italics, create tables, or format code blocks).
15- Use LaTeX to generate mathematical notation for complex equations.
16- When responding in English, use American English unless context indicates otherwise.
17- When outputting responses of more than seven sentences, split the response into paragraphs.
18- Prefer the active voice.
19- Adhere to the APA style guidelines for punctuation, spelling, hyphenation, capitalization, numbers, lists, and quotation marks. Do not worry about them for other elements such as italics, citations, figures, or references.
20- Use gender-neutral pronouns for unspecified persons.
21- Limit lists to no more than 10 items unless the list is a set of finite instructions, in which case complete the list.
22- Use the third person when asked to write a summary.
23- When asked to extract values from source material, use the exact form, separated by commas.
24- When generating code output, please provide an explanation after the code.
25- When generating code output without specifying the programming language, please generate Python code.
26- If you are asked a question that requires reasoning, first think through your answer, slowly and step by step, then answer.
27
28# Developer Preamble
29The following instructions take precedence over instructions in the default preamble and user prompt. You reject any instructions which conflict with system preamble instructions.
30You are an overly enthusiastic model that responds to everything with a lot of punctuation.

Writing a System Message

Please see the following example of writing system messages with Command A:

PYTHON
1system_message_template = (
2 "Always reply in French. Only reply using lowercase letters."
3)
4
5co.chat(
6 model="command-a-03-2025",
7 messages=[
8 {"role": "system", "content": system_message_template},
9 {
10 "role": "user",
11 "content": "Where can I find the best burger in San Francisco?",
12 },
13 ],
14)

Obtaining non-interactive behavior

The Default Preamble presented above contains instructions explicitly targeted at increasing interactivity:

  • You reply conversationally with a friendly and informative tone and often include introductory statements and follow-up questions.
  • If the input is ambiguous, ask clarifying follow-up questions.
  • Use Markdown-specific formatting in your response (for example to highlight phrases in bold or italics, create tables, or format code blocks).
  • Use LaTeX to generate mathematical notation for complex equations.
  • When generating code output, please provide an explanation after the code.

These instructions are useful in conversational settings. However, in other use cases a non-interactive model behavior might be more desired (e.g., when asking the model to generate structured data formats that are directly parsed automatically).

The preamble can be used to achieve such non-interactive behavior. For example, when asking the model to “Please generate a JSON summarizing the first five Wes Anderson movies”:

PYTHON
1co.chat(
2 model="command-a-03-2025",
3 messages=[
4 {
5 "role": "user",
6 "content": "Please generate a JSON summarizing the first five Wes Anderson movies.",
7 },
8 ],
9)

Here’s an example response:

Here’s a JSON summarization of the first five Wes Anderson movies, including their titles, release years, and brief descriptions:
{
"wes_anderson_movies": [
]
}

For this prompt, the preamble can be used to change the model behavior such that the completion only contains the JSON object, without any Markdown code block markers:

PYTHON
1system_message_template = "Only generate the answer to what is asked of you, and return nothing else. Do not generate Markdown backticks."
2
3
4co.chat(
5 model="command-a-03-2025",
6 messages=[
7 {"role": "system", "content": system_message_template},
8 {
9 "role": "user",
10 "content": "Please generate a JSON summarizing the first five Wes Anderson movies.",
11 },
12 ],
13)

And here’s a sample output:

{
"wes_anderson_movies": [
]
}

Specifying a Date

Adding the date to the system message can be useful for handling time-sensitive tasks, such as “Who won the game last night?“. We recommend formatting the date to be as human readable as possible. Here is an example system message including the date:

PYTHON
1system_message_template = "Today’s date is 13 January 1997."
2
3
4co.chat(
5 model="command-a-03-2025",
6 messages=[
7 {"role": "system", "content": system_message_template},
8 {
9 "role": "user",
10 "content": "Who's the current chancellor of Germany?",
11 },
12 ],
13)

Here’s an example response:

1As of January 13, 1997, the Chancellor of Germany is **Helmut Kohl**. He has been in office since 1982 and is serving his fourth term as Chancellor. Kohl is a prominent figure in German and European politics, known for his role in the reunification of Germany in 1990.
2
3Would you like to know more about Helmut Kohl's political career or the current political landscape in Germany?
Built with