Return to site

GenAI - how to create an effective prompt

As described by Salesforce's Cassy Funk & Brady Sammons at Dreamforce 2023

· TRA Blog

The lunchtime slot for presentations at tech conference is a risky contemplation. Sometimes
brilliant, often mediocre and just occasionally, providing little gems of knowledge
that make flying for 19 hours mostly tolerable.

Kudos to Salesforce for running a short, incredibly useful session on ‘7 Tips for
Getting Started with Prompt Design’, hosted by Cassy Funk (Salesforce UX Snr
Director AI Cloud) and Brady Sammons (Salesforce UX Architect, Experience
Services). This 20 minute session distilled a huge amount of their knowledge, learning, and
experience into a very practical example of how to craft effective prompts for large lanuage models.

Before sharing the tips, one of many AI learnings I picked up at Dreamforce is the importance
of creating grounded prompts that help to create more relevant outputs - context
and structure are both super critical here. Whilst hallucinations will continue
to manifest themselves, knowing how to prompt a LLM will go someway towards
reducing the ‘here’s an answer that I just made up’ response.

Using a simple example of a new member, ‘Embracer’ introducing themselves to their new
team ‘The Friendly Force’, Cassy and Brady showed how output can evolve as the
prompt is refined across 7 steps. The example started with a fairly simple prompt:

I am Embracer’. Write an introduction to my new superhero team ‘The Friendly Force’.

Output: ‘In a world teetering on the brink of chaos where darkness seems to creep into
every corner of our lives, a beacon of hope emerges – ‘The Friendly Force’. Led
by their enigmatic and empathetic leader, Embracer, this new superhero team has
vowed to be the antidote to the despair that plagues our world. With a mission
grounded in compassion and a commitment...

The presenters noted that to create an effective prompt we need to ‘’unlearn what we have
learnt’’ when it comes to writing. Grammer, structure, all those good things
that English (or insert your chosen language here) teachers slaved away to impart
won’t actually help.

The 7 tips?

1. Know that AI doesn’t know you – it’s important to provide clear context on the ‘who’, ‘what’ and ‘purpose’ of the prompt.
2. Always bowl with purpose – provide guidelines or parameters in the prompt to keep ‘AI in its lane’
3. Shuffle the playlist – the order of the prompt or instructions fuels the response.
4. Go full Yoda – Do and do not – you must try – it’s just as important to tell the language model what not to do as what it should do
5. Remember all the world’s a stage –ie. The language model can produce responses in different styles if directed to do so.
6. Use the superhero of clarity – lists.Remember that bit about unlearning what we’ve learnt – this is key. Dump the well-worded sentences and requests, use lists (or for those of you spreadsheet inclined,
think comma separate values). Construct the prompt as a list.
7. Embrace the chaos and interate – AI can be unpredictable, be prepared to ask the same prompt several times, or delete the history and use it again until you get something that works.

The original prompt read as follows: I am Embracer. Write an introduction to my new superhero team ‘The Friendly Force’.

The refined prompt?
Task: Write an introductory message
Topic: Excited to be part of the team
My name: Embracer
Superpowers: Hugs, energy
Team: Friendly Force
Excludeworks: villain, dark
Style: Creative
Tones: Confident, energetic
Length: 50 words

The output?

“Hey Team Friendly Force! Embracer here, thrilled to join our new radiant crew! With superpowers fueled by hugs and boundless energy, I’m all about spreading positivity and light. Let’s ignite our teamwork and brighten the world together!”


broken image

The session finished with a list of some starter resources:

...and the ever useful Salesforce Trailhead:

Artificial intelligence fundamentals

Prompt fundamentals

Prompt studio quick look

Einsten trust layer