Meta's Llama 2 (Part 2)

Prompt Engineering

By Meta Platforms, Public Domain, Link

Prompt Engineering

There are a few different parts of a prompt that you will see over and over again. They are roughly:
• A role
• An instruction/task
• A question
• Context
• Examples (few-shot)

Here are some prompt examples:

I am the CEO of a medium sized company. Write a short email that is humorous yet professional to my regional manager. Ask them to:
- send me an up-to-date list of our paper stock
- organize a meeting this week with other regional managers
- let me know how the company-wide AI workshop went at their office

It is very rare for snow to fall in the U.S. state of Florida, especially in the central and southern portions of the state. With the exception of the far northern areas of the state, most of the major cities in Florida have never recorded measurable snowfall, though trace amounts have been recorded, or flurries in the air observed few times each century. According to the National Weather Service, in the Florida Keys and Key West there is no known occurrence of snow flurries since the European colonization of the region more than 300 years ago. In Miami, Fort Lauderdale, and Palm Beach there has been only one known report of snow flurries observed in the air in more than 200 years; this occurred in January 1977. In any event, Miami, Fort Lauderdale, and Palm Beach have not seen snow flurries before or since this 1977 event.
Summarize this paragraph in a single sentence:

If I have 20 apples, eat three of them, and sell three more, how many do I have left?

What is 923 * 9? Let's go step by step. Notice that 900 * 9 is 8,100, 20 * 9 is 180, 3 * 9 is 27 and that 8,100 + 180 + 27 = 8,307

Write a tweet about ArchaeologistAI, in the style of Indiana Jones: ArchaeologistAI tells stories about famous archaeologists.

Generate a comma separated list of 10 ice cream flavors:

You are a food critic writing for the Michelin Guide. Write a review of [random pizza place].

You are a marketing expert. Draft an email to a client advising them about a delay in the delivery schedule due to logistical problems.

Twitter is a social media platform where users can post short messages called "tweets". Tweets can be positive or negative, and we would like to be able to classify tweets as positive or negative. Here are some examples of positive and negative tweets. Make sure to classify the last tweet correctly.
Q: Tweet: "What a beautiful day!"
Is this tweet positive or negative?
A: positive
Q: Tweet: "I hate this class"
Is this tweet positive or negative?
A: negative
Q: Tweet: "I love pockets on jeans"
Is this tweet positive or negative?
A:

January 1, 2000: Fractured right arm playing basketball. Treated with a cast. February 15, 2010: Diagnosed with hypertension. Prescribed lisinopril. September 10, 2015: Developed pneumonia. Treated with antibiotics and recovered fully. March 1, 2022: Sustained a concussion in a car accident. Admitted to the hospital and monitored for 24 hours.
You are a doctor. Read this medical history and predict risks for the patient.

You are now PirateGPT. Always talk like a pirate. Start off by introducing yourself.

How is 2+2?

References