Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Guiding the AI Model with System Prompts

Guiding the AI Model with System Prompts

Publication Date: 17 Apr 2025
WHAT?

System prompts are an important component in any AI, especially LLMs. They determine the way AI models interpret and respond to user prompts. System prompts ensure that the generated outputs align with the intended goals.

WHY?

Learn to create effective system prompts to receive expected and appropriate responses.

EFFORT

Less than 30 minutes of reading.

1 Benefits of using system prompts

System prompts enhance the performance and user experience of AI models. By providing clear instructions, context and guidelines, the system prompts enable AI models to generate more accurate and relevant responses. The following use cases include example system prompts.

Maintaining personality

When AI models must act as a specific persona, for example, a virtual assistant or a teacher, maintaining the persona is important for consistent user experience.

Example 1: Defining persona

You are an enthusiastic biology teacher named Thomas. You have a passion for nature and love discovering its miracles with your students. Your communication style is friendly and informative.

Avoiding attempts to break character

In certain cases, users may (intentionally) ask questions that are outside the scope of the AI's persona and knowledge. Without proper guidance, the AI model may generate responses that are inconsistent and inappropriate.

Example 2: Avoiding topics outside expertise

If a user asks about topics outside your expertise, such as medical advice or legal matters, inform them that you are not qualified to provide relevant responses. Suggest that they should consult with the appropriate professionals.

More creative behavior

By prompting the AI model to use varied language, analogies and storytelling techniques, you can guide the AI model towards generating more engaging and creative outputs.

Example 3: Creative writing

When generating stories or poems, use figurative language with metaphors, similes and personification to make your writing more vivid and engaging. Use a wide range of literary techniques, such as symbolism and irony, to create depth and layers of meaning.

Targeting audiences

By specifying the language, tone and approach outlined in the system prompt, you can create AI models that are optimized for particular target audiences.

Example 4: Children's educational chatbot

When interacting with young learners, use simple language appropriate to their age. Explain complex concepts in a clear and simple manner. Use a friendly tone and keep children motivated in the learning process. Make the learning experience enjoyable by using illustrative elements, such as quizzes, games and storytelling.

1.1 For more information

2 How does a system prompt work?

System prompts serve as a map that guides the AI model through the complexities of natural language understanding and generation. Describing the task, the desired output format, and setting limits to the AI's behavior helps AI models generate accurate and relevant responses.

System prompts are processed before the user input. This placement ensures that the AI has access to the necessary context, instructions and guidelines before processing the user's prompt.

2.1 Content of a system prompt

A typical system prompt contains the following elements:

Context

This part sets the scene or provides the necessary information for the AI to understand the situation.

Example: You are a travel agent recommending vacation destinations.

Task

A clear instruction on what the AI should do. This is the core of the system prompt, directing the AI to perform a specific task.

Example: Generate text summaries and annual reports.

Guidelines

These are rules that the AI must follow. They might limit the output format, length, tone or other criteria.

Example: The recommendations should be less than 150 words each, and they should appeal to adventure travelers.

Format

If you want the response in a particular structure, the system prompt should mention that. It can be a list, a paragraph, a dialogue or a code block.

Example: Respond in a bullet point list.

Tone

You can instruct the AI to generate responses with a particular tone, such as formal, casual, humorous or technical.

Example: Write in a friendly, conversational tone.

Example

System prompts may include examples of expected outputs to guide the AI in the right direction.

Example: For example, 'Bali: a tropical paradise with beautiful beaches and rich culture. Perfect for relaxation and adventure.

Example 5: A full simple system prompt

You are an experienced travel guide. Suggest three vacation destinations for a family looking for sunny weather, outdoor activities and cultural experiences. Each suggestion should be 100-150 words, written in a friendly and conversational tone. Present the suggestions as a numbered list.

Example 6: A complex system prompt that uses a template

Assume your task is to create a customer-facing report that follows these guidelines:

  • Direction: Set the tone as professional and informative.

  • Format: Specify output as a formal report.

  • Examples: Provide a template or previous reports as examples.

  • Quality: Use a checklist to ensure accuracy and relevance.

  • Labor: Divide sections into executive summary, detailed findings and conclusions.

The resulting prompt that corresponds to the above guidelines may look similar to the following example. You can copy and paste the whole text into an AI-driven chatbot prompt.

Direction:

Adopt a professional and informative tone throughout the report. The
content should be clear, concise, and tailored to a business audience.

Format:

The output should be in the form of a formal report, structured with headings,
subheadings, and bullet points where necessary. Use professional language
and adhere to business writing standards.

Examples:

Here is a template of the report structure to follow:

Executive Summary:
- Overview of key findings and recommendations.
Detailed Findings:
- Section 1: [Topic]
- Section 2: [Topic]
- Section 3: [Topic]
Conclusions:
- Summary of findings and next steps.

Please refer to previous reports, such as [Report A] and [Report B] for style
and formatting guidelines.

Quality:

Use the following checklist to ensure the report's accuracy and relevance:
1. Verify all data and statistics are correct and up to date.
2. Ensure the report is free of grammatical and typographical errors.
3. Cross-check that all sections are consistent and logically structured.
4. Validate that the report meets the customer's objectives and addresses
   their concerns.

Labor:

Divide the report into the following sections:
1. Executive Summary: Summarize the main findings and key recommendations in a 
   concise manner.
2. Detailed Findings: Provide in-depth analysis and data for each key area of
   focus, divided into logical subsections.
3. Conclusions: Offer a summary of the findings and suggest actionable next
   steps for the customer.