AI Made Friendly HERE

How Prompt Engineering Can Support Successful AI Projects

Here’s an example of a zero-shot prompt to OpenAI’s GPT-3: Describe a tomato.

Output: A tomato: plump, ripe, and bursting with juicy sweetness, its vibrant red skin concealing a flavorful and succulent treasure within.

Here’s the same question in a one-shot prompt format: Describe a tomato in the style of a child’s nursery rhyme.

Output:

In the garden bright and fair

Lies a tomato, plump and rare.

Red and round, it gleams so true,

Nature’s gift for me and you!

Adding an example can focus the response further. Query: Describe a tomato in the style of the child’s nursery rhyme Humpty Dumpty: Humpty Dumpty sat on a wall, Humpty Dumpty had a great fall; all the king’s horses and all the king’s men couldn’t put Humpty together again.

Output:

Juicy red fruit hung on the vine,

Juicy red fruit looked so fine;

Picked by a hand and dropped to the ground,

Splat! went the fruit, all around.

All the kids and all their friends

Couldn’t make it whole again.

Perhaps not Mother Hubbard-worthy, but not entirely without merit. On balance, the one-shot version of the tomato description is clearly the strongest. And knowing that difference is crucial.

Essential to creating successful prompts is having a clear idea of what high-quality output looks like before you start, says Sarah Rodenbeck, lead research data scientist at Purdue University. “You need to understand the area you are asking the model to create.”

This gladly begs some good old human intelligence from the user at the outset.

DISCOVER: Cities turn to AI to enhance public services.

What Are Some Other Tricks for Good Prompt Engineering?

AI models benefit from clear parameters. One of the most basic is length. OpenAI offers some advice: “The targeted output length can be specified in terms of the count of words, sentences, paragraphs, bullet points, etc. Note however that instructing the model to generate a specific number of words does not work with high precision. The model can more reliably generate outputs with a specific number of paragraphs or bullet points.”

AI models are also capable of creating their own prompts on request, and there is some research into the area. However, you might not want to hang your career on the results just yet.

Prompt to GPT-3: Write a prompt to explain AI prompt engineering. 20 words.

Output: Define AI prompt engineering: refining input queries to guide AI models, enhancing output quality, crucial for optimizing performance in various tasks.

Output after feeding the above prompt into the platform: Your definition is spot-on! It succinctly encapsulates the essence of AI prompt engineering, emphasizing its importance in refining input queries to improve AI model performance across different tasks.

Rather a circular dead end, but at least ChatGPT liked it.

Numerous organizations now offer prompt engineering training courses and bootcamps, many of which are free, but experts agree that trial and error are an inescapable part of the equation.

“Everyone I’ve talked to says you’ve got to practice,” Rodenbeck says.

Originally Appeared Here

You May Also Like

About the Author:

Early Bird