0 / 0

Adding prompts

Last updated: Mar 26, 2025
Adding prompts

The different prompt modes allows users various ways to add prompts based on their experience level.

The following edit modes are available in Prompt Lab:

  • Freeform: Users can send prompts as plain text to the model exactly as entered. Ideal for experienced users familiar with advanced prompt engineering.
  • Structured: Users can add text to the labeled fields to format and send prompts to the model. Ideal for beginners that are getting started with prompt engineering.
  • Chat: Users can interact with the model to see how the model handles dialog or question-answering tasks.

The following samples show you how to add prompts in the freeform and structured modes. For more information about how to use chat mode, see Chat mode in Prompt Lab.

Sample with a few-shot prompt: Classify a message

Scenario: Given a message that is submitted to a customer-support chatbot for a cloud software company, classify the customer's message as either a question or a problem description. Based on the class type, the chat can be routed to the correct support team.

Select a model that is suited for classification tasks. For details, see Choosing a model.

Model parameters

  • Decoding : Set to Greedy. The model must return one of the specified class names. The model cannot be creative and make up new classes.
  • Stopping criteria: Specify two stop sequences: "Question" and "Problem". After the model classifies the input into either of the categories, it should stop. The Max tokens parameter can be set to 5 because the output is short.

Freeform mode

Prompt text

Paste this few-shot prompt text into the freeform prompt editor in Prompt Lab, select the model, set parameters, and then click Generate to see the result.

Message: When I try to log in, I get an error.
Class name: Problem

Message: Where can I find the plan prices?
Class name: Question

Message: What is the difference between trial and paygo?
Class name: Question

Message: The registration page crashed, and now I can't create a new account.
Class name: Problem

Message: What regions are supported?
Class name: Question

Message: I can't remember my password.
Class name: Problem

Message: I'm having trouble registering for a new account.

Structured mode

Set up section

Paste these headers and examples into the Examples area of the Set up section:

Table 2. Classification few-shot examples
Message: Class name:
When I try to log in, I get an error. Problem
Where can I find the plan prices? Question
What is the difference between trial and paygo? Question
The registration page crashed, and now I can't create a new account. Problem
What regions are supported? Question
I can't remember my password. Problem

Try section

Paste this message in the Try section:

I'm having trouble registering for a new account.

Select the model and set parameters, then click Generate to see the result.

Sample with a few-shot prompt: Summarize a meeting transcript

Scenario: Given a meeting transcript, summarize the main points as meeting notes so those notes can be shared with teammates who did not attend the meeting.

Select a model that is suited for summarization tasks. For details, see Choosing a model.

Model parameters

  • Decoding: Set to Greedy. The model must return the most predictable content based on what's in the prompt, not be too creative.
  • Stopping criteria: To make sure that the model stops generating text after the summary, specify a stop sequence of two newline characters. To do that, click in the Stop sequence text box, press the Enter key twice, and then click Add sequence. Set the Max tokens parameter to 60.

Freeform mode

Prompt text

Paste this few-shot prompt text into the freeform prompt editor in Prompt Lab, select the model, set parameters, and then click Generate to see the result.

Transcript:
00:00   [sam]   I wanted to share an update on project X today.
00:15   [sam]   Project X will be completed at the end of the week.
00:30   [erin]  That's great!
00:35   [erin]  I heard from customer Y today, and they agreed to buy our product.
00:45   [alex]  Customer Z said they will too.
01:05   [sam]   Great news, all around.
Summary:
Sam shared an update that project X will be complete at the end of the week. 
Erin said customer Y will buy our product. And Alex said customer Z will buy 
our product too.

Transcript:
00:00   [ali]   The goal today is to agree on a design solution.
00:12   [alex]  I think we should consider choice 1.
00:25   [ali]   I agree
00:40   [erin]  Choice 2 has the advantage that it will take less time.
01:03   [alex]  Actually, that's a good point.
01:30   [ali]   So, what should we do?
01:55   [alex]  I'm good with choice 2.
02:20   [erin]  Me too.
02:45   [ali]   Done!
Summary:
Alex suggested considering choice 1. Erin pointed out choice two will take 
less time. The team agreed with choice 2 for the design solution.

Transcript:
00:00   [alex]  Let's plan the team party!
00:10   [ali]   How about we go out for lunch at the restaurant?
00:21   [sam]   Good idea.
00:47   [sam]   Can we go to a movie too?
01:04   [alex]  Maybe golf?
01:15   [sam]   We could give people an option to do one or the other.
01:29   [alex]  I like this plan. Let's have a party!
Summary:

Structured mode

Set up section

Paste these headers and examples into the Examples area of the Set up section:

Table 4. Summarization few-shot examples
Transcript: Summary:
00:00 [sam] I wanted to share an update on project X today.
00:15   [sam]   Project X will be completed at the end of the week.
00:30   [erin]  That's great!
00:35   [erin]  I heard from customer Y today, and they agreed to buy our product.
00:45   [alex]  Customer Z said they will too.
01:05   [sam]  Great news, all around.
- Sam shared an update that project X will be complete at the end of the week
- Erin said customer Y will buy our product
- And Alex said customer Z will buy our product too
00:00   [ali]   The goal today is to agree on a design solution.
00:12   [alex]  I think we should consider choice 1.
00:25   [ali]   I agree
00:40   [erin]  Choice 2 has the advantage that it will take less time.
01:03   [alex]  Actually, that's a good point.
01:30   [ali]   So, what should we do?
01:55   [alex]  I'm good with choice 2.
02:20   [erin]  Me too.
02:45  [ali]   Done!
- Alex suggested considering choice 1
- Erin pointed out choice two will take less time
- The team agreed with choice 2 for the design solution

Try section

Paste this message in the Try section:

00:00   [alex]  Let's plan the team party!
00:10   [ali]   How about we go out for lunch at the restaurant?
00:21   [sam]   Good idea.
00:47   [sam]   Can we go to a movie too?
01:04   [alex]  Maybe golf?
01:15   [sam]   We could give people an option to do one or the other.
01:29   [alex]  I like this plan. Let's have a party!

Select the model and set parameters, then click Generate to see the result.

What to do next

After you are done building and testing your prompt in Prompt Lab, you can save your work as a project asset. For details, see Saving prompts.

Parent topic: Prompt Lab