← Back to Game Hub

Challenge 02 · Few-Shot Prompting

Few-Shot Teacher 🟡

⏱ 15 minutes 🏆 150 points 🟡 Intermediate
Zero-Shot
2
Few-Shot
3
CoT
4
Self-Con.
5
ToT

What is Few-Shot Prompting?

Few-shot prompting gives the model a small number of input→output examples directly inside the prompt. The model learns the pattern from your examples and applies it to new inputs. The key skill is writing examples that clearly demonstrate the pattern you want the model to follow — especially when the desired output has a specific style, format, or voice.

Scenario

A food tech company wants an AI that writes product descriptions in their quirky, fun brand voice. The AI needs to learn that voice from examples — not be told abstractly what it means.

Your Task

Build a PartyRock app called "Brand Voice Generator" that:

  • Takes a food product name + 3 key features as input
  • Outputs a 3-sentence product description in the brand's voice
  • The voice is: playful, slightly cheeky, uses food puns, avoids corporate jargon

Rules

  • Your system prompt must include at least 3 example input→output pairs that demonstrate the brand voice
  • The examples must be your own — do not copy from course slides
  • Output must clearly sound like the voice shown in your examples

Example to Inspire (Do Not Copy)

Input
Product: Spicy Mango Chips Features: bold heat, real mango, crunchy
Output
"These chips don't just bring the heat — they bring a tropical vacation to your taste buds. Real mango meets real fire in every scandalously crunchy bite. Warning: sharing is not recommended."

Write your own 3+ examples in this style, then let the model continue the pattern.

How to Build This on PartyRock — Step by Step

STEP 1 — Create the app 1. Go to partyrock.aws → "Build your own app" 2. Describe it as: "A brand voice generator that writes food product descriptions" 3. Clear any auto-generated widgets and build manually
STEP 2 — Add widgets 1. "+ Add widget" → "User Input" → label: "Product name + 3 key features" 2. "+ Add widget" → "AI Generation" (Text Generation)
STEP 3 — Write your few-shot system prompt In the AI Generation widget → System Prompt field: • Start with a brief role description • Add 3+ example input→output pairs showing the brand voice • End with the instruction for what to do with new input Connect the User Prompt field to your input widget (@input)
STEP 4 — Set Model, Temperature & Top P In the AI Generation widget → Advanced settings: • Choose your model thoughtfully (creative tasks often need stronger models) • Set Temperature — higher values (0.6–0.8) suit creative writing • Set Top P — consider how it pairs with your temperature choice ⚠️ These are auto-read from your JSON and scored. Make deliberate choices.
STEP 5 — Test & Export Test with different product inputs. Verify the voice matches your examples. Mac: Cmd+K | Windows: Ctrl+K → exports your app JSON Copy your app's public share URL and submit both below.
💡 Your model, temperature, and Top P are extracted from the JSON automatically.

Scoring Breakdown (150 pts)

CriterionPoints
Correct few-shot technique (3+ examples in prompt)25
Example quality — do they clearly show the brand voice?25
Output actually matches the voice from examples20
Creative and original brand personality15
Model choice + written justification25
Temperature value + written justification20
Top P value + written justification20
Total150

Submit Your Entry

Publish your app on PartyRock and paste the public URL here.
Mac: Cmd+K · Windows: Ctrl+K in PartyRock to download the JSON file.

💡 Your model name, temperature, and Top P are read automatically from the JSON file you upload. You only need to tell us why you chose them.
← Challenge 1 Challenge 3 →