Few-shot prompting is a technique in artificial intelligence where a model is given a few examples of a task to improve its performance on similar tasks. This can be used after a zero-shot prompt to increase specificity about your topic or generated right from the beginning.
For example:
“Regular exercise improves cardiovascular health by strengthening the heart and increasing circulation. It also enhances mental well-being by reducing stress and boosting mood through endorphin release. Now, describe another benefit of regular exercise.”
It is also an excellent way to find points of comparison or contrast in two or more items.
Enter the prompt statement and include the items to be analyzed in quotation marks.
Classify the sentiment of the third movie review. Use the information from the first two examples:
Review: "This movie was a waste of time." Sentiment: Negative
Review: "I couldn't stop laughing throughout the film!" Sentiment: Positive
Review: "The special effects were amazing, but the plot was confusing. "Sentiment:```?
WARNING: This example does not work well with Consensus which looks at journal articles to find real data. It did work well with Google Gemini, a more generic tool, which provided this response:
The sentiment of the third movie review is: Neutral.
Another example is:
Write a funny limerick about a boy named Sue This contains two ‘shots’ of information, boy and Sue.
A young boy named Sue, quite unique,
Had a name that made everyone shriek.
He'd say with a grin,
"It's not where I've been,
But the stories I've got, so to speak!"
You can try again, over and over until you get something you like
A tough boy named Sue, quite perplexed,
When folks thought his gender was vexed.
He'd just spit on the ground,
"That's a man's name, profound!
Don't you know Johnny Cash? Read the text!"