Menu
CoddyTech

Leave a Slot to Fill

Part of the Prompting Techniques section of Coddy's AI Prompts journey. Lesson 2 of 24.

A few-shot prompt works best as a pattern the AI can simply continue. Write every example on the same labeled lines, then finish with the new input and an empty label:

Classify each review as positive, negative or neutral. Answer with one word only.
Review: I love how light this laptop is.
Label: positive
Review: The screen cracked on day one.
Label: negative
Review: It works, nothing special.
Label:
neutral

The empty Label: at the end is the slot. The examples showed that a label is a single word, and the instruction listed the three allowed labels, so the AI fills the slot with one of them.

Without the slot, a small model like the one in this course explains itself: The review is neutral because.... That is fine in a chat, but useless when a spreadsheet or another program needs the bare label.

challenge icon

Challenge

Easy

Your support inbox sends each message to one of three teams: billing, shipping or tech.

Write a few-shot prompt with two labeled examples, such as a double charge and an app crash. Then add this new message and leave the slot empty:

My parcel has not arrived after two weeks.

The AI's response must:

  • Be only the team name: one word, nothing else
bugsy Main icon

Start this challenge with Coddy's AI tutor

What is Bugsy?
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Prompting Techniques