0%
⭐ 0 XPMap
Chapter 2 · Quest 2 of 5 · 10 XP

Who Are You?

🎭 A system prompt tells the model who it is before the chat starts. It's how every bot gets its personality. You pass it to Pip with system=.

import pip
system = "You are Sprocket, a snack expert."
print(pip.ask("Who are you?", system=system))
I am Sprocket, a snack expert.

Start your system prompt with You are, then a name and what your bot is like.

Instructions

  1. Make a variable system that starts with You are, like "You are Bolt, a brave robot."
  2. Store pip.ask("Who are you?", system=system) in reply.
  3. Print reply.
💡 Hint

Pass the system prompt by name: pip.ask("Who are you?", system=system). The first part is the question, the second is the personality.

Ask the community

bot.py
Terminal
← BackNext →

Chapter 2: Talk to the Model

The full quest map

Talk it out

  1. Read the instruction with the ✗ out loud.
  2. Say what your code does, line by line, as if to a friend.
  3. Find the line where what it does and what you want split apart.
  4. Press Run and read the terminal. Is that what you expected?
  5. Still stuck? Press Ask Pip why, or peek at the solution.
  6. Or ask on the community help board: say which quest, and paste your code.
New badge!

Your bot just got a new part. See it on the quest map.

Name your bot

It levels up as you play, and gets a new part with every chapter.