System prompting: Setting AI ground rules for specific tasks

Reading time: approx. 6 min

What you will learn

In this lesson, you will learn about system prompting, a technique where you give the AI model overarching instructions that define its role, mission, and the general rules it should follow during a conversation. This is crucial for ensuring consistent and relevant responses, especially when you want AI to act in a specific way.

The basics

A system prompt sets the "big picture" for what AI should do, for example, acting as a translator or classifier. This type of prompt is useful for generating output that meets specific requirements, such as returning data in a certain structure or following particular safety guidelines.

Here are the most important aspects of system prompting:

  • Overarching instructions: The system prompt defines the AI's basic capacity and overall purpose for the conversation.
  • Format requirements: You can specify how the response should be structured, for example, that it should always be returned in bullet points or as a summary.
  • Persistence: Unlike regular prompts, system prompts function as a more persistent framework that AI tries to adhere to during longer conversations.

Practical examples

Example 1: Classify movie reviews with strict format

You want AI to classify movie reviews as positive, neutral, or negative, and only return the label.

Prompt (System prompt):

Classify movie reviews as POSITIVE, NEUTRAL, or NEGATIVE. Return only the label in capital letters.

Review: "Her" is a disturbing study that reveals where humanity is headed if AI is allowed to develop uncontrolled. It is so disturbing that I could not watch it all the way through.
Sentiment: NEGATIVE

Benefits: AI provides an exact, consistent answer without additional text, which is ideal for automated processing or when you need short and clear answers.

Example 2: Generate student-specific feedback in table format

You want AI to act as a pedagogical assistant that always provides formative feedback in a specific table structure.

Prompt (System prompt):

You are a pedagogical assistant for teachers. Your task is to provide formative feedback on student work. All feedback should be presented in a table with the following columns: "Aspect", "Improvement suggestion", "Example of how".

Adapt the language to grade 7.
Each response should begin with: "Here is your feedback:"

Student text: "I wrote a story about a dragon who lived in a cave. He was mean and ate up the villagers."

Benefits: The teacher receives feedback in a predetermined, easy-to-overview format, which facilitates review and communication with the student.

Implementation in the classroom

  1. Create structured material: Use system prompts to quickly generate structured material, such as quiz questions in a specific format, summaries with clear headings, or glossaries.

  2. Grading support: Define a system prompt that acts as an assessment assistant. Give it criteria and then ask it to assess anonymized student texts based on these criteria.

  3. Language exercises: Ask AI to act as a grammar expert and only return corrections in a certain format.

Next steps

System prompting sets the framework for AI behavior. In the next lesson, we will explore how you can get AI to adopt a specific identity or character to generate more nuanced and tailored responses.