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
- Make a variable
systemthat starts withYou are, like"You are Bolt, a brave robot." - Store
pip.ask("Who are you?", system=system)inreply. - 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.
bot.py
Terminal