Zum Inhalt springen

Your First Prompts

Knowledge

A good prompt follows a simple structure: Role + Task + Context + Format. You do not always need all four elements, but the more you include, the better the result.

  • Role: Who should the LLM be? ("You are an experienced copywriter...")
  • Task: What exactly should it do? ("Write a product description...")
  • Context: What background information does it need? ("...for an online shop selling running shoes...")
  • Format: What should the result look like? ("...in 3 bullet points, maximum 50 words.")

Understand

Here are five example prompts for different tasks:

1. Email: "You are a professional copywriter. Write a polite email to a customer who has not paid for 30 days. Tone: firm but friendly. Maximum 8 sentences."

2. Summary: "Summarize the following text in 3 bullet points. Each point maximum 1 sentence. Focus on the most important facts: [insert text here]"

3. Explanation: "Explain the concept of 'inflation' so that a 10-year-old can understand it. Use an everyday example involving candy."

4. Code: "Write a Python function that takes a list of numbers and calculates the average. Add comments explaining each step."

5. Creative: "You are a creative author. Write the beginning of a short story (5 sentences) about a robot seeing a sunset for the first time. Style: poetic."

There are also helpful phrases that improve quality for many tasks:

  • "Think step by step" -- forces the LLM to structure its approach
  • "Explain it for a 10-year-old" -- leads to simpler, clearer explanations
  • "Give me 3 options" -- you get choices instead of a single answer

*Try it yourself!

Open ChatGPT (chat.openai.com) or Claude (claude.ai) and test the prompts above. Change individual parts -- for example the role or the format -- and observe how the response changes.

Apply

Take prompt example 3 (explanation) and adapt it: Choose a different topic and a different target audience. Observe how the LLM responds to it.

Reflect

Which element makes the following prompt especially effective? 'You are a nutritionist. Create a weekly plan for vegetarian lunches. Table format, 7 days, each with dish and preparation time.'