Home โ€บ Giving Your AI a Personality
๐Ÿง  Module 03 ยท Intermediate

Giving Your AI a Personality

โœจ PAN'S RULE: An AI without a personality is just a boring calculator! โœจ

Ever wanted a homework helper that talks like a pirate? Or a story generator that thinks it's a grumpy dragon? Let's learn the secret trick to give any AI a unique personality: the System Prompt!

๐Ÿ›ก๏ธ Safety Check: Remember our #1 rule: never share personal secrets with an AI! Don't type in your full name, address, school, or passwords. Think of it like talking to a very smart, very public parrot. Never put secrets or your full name in a prompt!
๐ŸŽญ

The AI's Secret Instructions

Think of an AI like a super-smart actor. Before the play starts, you can give it secret notes on how to act! This is called a System Prompt. It's your way of telling the actor, "Today, you're going to be a pirate!" instead of just a plain old robot.

๐Ÿค” What a Difference a Prompt Makes!

It's like giving your AI a costume and a script to play a character!

๐Ÿค– A plain robot (No System Prompt)

๐Ÿ˜ด

You ask: "What's 2+2?"

4.

Zzz...

๐Ÿดโ€โ˜ ๏ธ A pirate robot (WITH a System Prompt)

๐Ÿดโ€โ˜ ๏ธ

You ask: "What's 2+2, matey?"

Arrr, the treasure be 4!

๐ŸŽ‰

Wait... Why Two Boxes?

Why not just put "Act like a pirate" in your main question? Great question! It's because keeping the "rules" separate from the "question" makes the AI much more reliable. It's like the difference between the rulebook of a game (the System Prompt) and the moves you make on your turn (the User Question). You don't want the player to be able to change the rules of the game every turn!

๐Ÿ“บ Watch this to learn the secrets of crafting powerful prompts!
๐Ÿค– Your First Quest: The AI Character Lab

System Directives

Let's build an AI character! In the first box, write the AI's "secret instructions." In the second, ask a question. Then press the button and see if it follows your rules! Try our character starters or write your own!

๐Ÿค– Your AI's Reply:

Your character's answer will appear here...

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Parent Corner: AI Family Game Night

This is a great chance to learn together! Try this fun activity: Have your child create a custom AI persona in the challenge box above. Then, you (the parent) try to guess the persona just by asking it questions. Is it a grumpy chef? A space alien who loves sports? A historian who only speaks in rhymes? Take turns building and guessing!

๐Ÿš€ Advanced Mission

Build a Sarcastic Code Helper

Your mission is to build a Sarcastic Code Helper. First, create the System Prompt. Instruct it to be a senior developer who is a bit sarcastic but always gives the correct fix. Then, paste this broken code into the 'User Asks' box and see if your AI can spot the error:


// Find the bug in this code!
let fruits = ["apple", "banana", "cherry"];
for (let i = 0; i <= fruits.length; i++) {
  console.log(fruits[i]);
}
                

๐Ÿ•ต๏ธ Knowledge Check

What is the main purpose of a System Prompt?

To give the AI a personality and rules to follow *before* it talks to the user.
To make the AI answer questions faster.

๐Ÿ“š Learn More