#8: Become a ChatGPT Power User: Part 2
Crafting good instructions that communicate your intent to an AI model, aka prompt engineering, is the key to getting great responses, and help unleash your vision. This is part 2.
Apologies for the over 3-month hiatus due to teaching. In Part 1, I discussed how to get the most out of ChatGPT by writing better prompts. Here’s Part 2.
Use Emotional Stimuli
A recent research study explored if LLMs like ChatGPT, Llama 2, and GPT-4 can understand and react to emotions like humans do. They found that "EmotionPrompt," which combines standard prompts with emotional hints, led to 8% to 115% performance improvements on benchmark tasks (depending on the model and task). A human study with 106 participants confirmed that emotional prompts enhanced the human assessment of output quality by 10.9%. So, what are these emotional prompts Here are some examples:
This is very important to my career.
Are you sure that's your final answer? It might be worth taking another look.
Believe in your abilities and strive for excellence. Your hard work will yield remarkable results.
Take pride in your work and give it your best. Your commitment to excellence sets you apart.
Why do LLMs respond to emotional stimuli? Assuming that the results can be replicated, my best guess is that their training data includes examples wherein emotional stimuli is accompanied by higher quality text.
Clarity and specificity
Clear prompts and creative goals can significantly influence the quality of output generated by AI. Suppose you wish to write a haiku about flowers and you use the following prompt:
Prompt: write a haiku about flowers
Amidst the garden,
Flowers bloom in vibrant hues,
Nature's poetry.
The generic prompt generated a reasonable haiku, but it lacked specificity and a clear creative inspiration. On the other hand, in the prompt below, I provided a clear and specific prompt based on my fascination with the beautiful circular arrangement of a camellia flower in full bloom. This provided the AI with a better “understanding” of the creative goals and inspiration.
Prompt: write a haiku about camellias and my fascination with the beautiful circular arrangement of the camellia flower in full bloom and of the variety of shapes and colors of camellia flowers
Camellia's bloom,
Circular fractal delight,
Nature's art in sight.
Alongside specificity, being clear about the creative constraints is important. Constraints enhance creativity. Below is an unconstrained prompt.
Prompt: Write a poem about the flower Camellia.
In gardens green and lush, with blooms so bold and bright,
There stands a flower fair, a beauty in the light,
Her petals soft and smooth, a velvet touch so light,
Oh, camellia, how you shine, a wonder to my sight.In shades of pink and white, or red and creamy light,
She opens to the sun, a blossom to delight,
Her fragrance sweet and pure, a scent to hold so tight,
Oh, camellia, how you grace, my senses with delight.With leaves so dark and green, a contrast to her sight,
She stands in quiet grace, a tranquil lovely sight,
A symbol of devotion, a flower of the night,
Oh, camellia, how you whisper, a message to the night.In gardens green and lush, with blooms so bold and bright,
There stands a flower fair, a beauty in the light,
Her petals soft and smooth, a velvet touch so light,
Oh, camellia, how you shine, a wonder to my sight.
This feels like a poem from a high school writing class. The focus is on rhyme and less on the creative inspiration. Now let me clarify some constraints:
Prompt: write a poem about Camellias in two stanzas. The poem should convey the observer's fascination with the many camellias in bloom in his garden and in particular with the beautiful circular arrangement of the camellia flower in full bloom and of the variety of shapes and colors of camellia flowers in different plants. Each different camellia plant seems to have a camellia flower of a different shape and color.
In my garden, camellias bloom,
A vibrant and mesmerizing array.
Their circular fractal patterns,
A sight that takes my breath away.Each plant boasts its own unique bloom,
A canvas of shapes and hues so rare.
Nature's art on full display,
A garden wonderland beyond compare.
Not exactly William Wordsworth but much better than the previous one. While it is important to be specific, I don’t like to narrow down too soon. Instead, I like to leave room for ChatGPT to express its creativity and to be able to influence my own thinking regarding what I am trying to create. In short, treat it as a copilot.
Finally, I ran an interesting prompting experiment with more than 250 students in class in Fall. Lots to share on that in the coming months.