Prompt Engineering: AI prompts that punch!

What is an AI prompt?

Generative AI tools like ChatGPT, Google Bard and Microsoft Copilot in are becoming increasingly popular among developers, content creators and, now almost any and everyone with the release of Copilot Edge (formerly Bing Enterprise Chat) and of course, Copilot for Microsoft 365.

I often hear “of ChatGPT is better than XYZ or Copilot is better than ABC. The fact is, whilst these tools can yield incredible results, getting started can be challenging, and getting the prompt to do exactly what you “had in mind” takes practice – especially for those who are new to generative AI.

In this blog post, I provide some tips on how to work with generative AI tools like ChatGPT and Copilot, including how to write, and perfect, good AI prompts. Prompts are essentially instructions that are used to tell/ask the AI what you’d like it to do…

Understanding how Generative AI works

Generative AI chatbots use complex language models (LLMs), machine learning algorithms, internet data and organisational data (in the case of Microsoft Copilot) to generate text, create, summarise, rewrite or transform content, write code, generate images and even help people build low code workflows or model driven apps in Power Platform. These GenAI tools do this based on user input and context, known as “prompts”.

Whilst these tools are incredibly smart (having been trained on a decade of data, images, writing styles and even the works of Shakespeare, the results are not perfect and can sometimes generate inaccurate or irrelevant content, known as hallucinations.

These hallucinations are usually caused by a lack of understanding of the ask from the user, conflicting requests or poor data upon which they base their response. Remember these tools can access your company data (under the context of the user) and the web.

Writing good AI prompts – the ingredients

To get the best results from generative AI tools like ChatGPT and Copilot, it’s essential to write good AI prompts. Here are some AI 101 tips on what good AI prompts look like:

  • Be specific with the ask: Make sure you are being clear about what you want the AI model to do. The more specific you are, the better the AI model can understand your prompt and provide accurate results.
  • Avoid using ambiguous language: If what you ask could be interpreted in different ways, you may not get the result you hoped for. Be clear and concise in your prompt to avoid any confusion.
  • Provide context: this is crucial to ensure that the AI model understands the intent behind your prompt. The more context you provide, the better the AI model can understand your prompt.
  • Use simple language: that is easy for the AI model to understand. Avoid using complex words or phrases that the AI model may not be familiar with. Slang words are generally OK but take your time to read the prompt back to make sure it makes sense.
  • Take advantage of turns: A turn is essentially your response to the AI’s answer. You can use this to either rephrase your ask or to fine tune the response and is a good alternative to trying to write long complex prompts in one go.
  • Make it a conversation: Building on the above, think of how you might ask a human to help you with a task. You can use the “turns” to perfect the prompt and even ask the AI why it gave a particular answer or to explain something you don’t understand. This may feel unnatural at first but soon it’s just IM’ing a friend or co-worker.

Good and bad prompt examples

Here are some examples of good and bad AI prompts. Try these and see how you get along.

I’ve included a video which walks though these and shows the differneces in the results based on the prompts we gave. You’ll see we can be quite specific in what we want. The video also showcases how we can “perfect” our answers through additonal turns.

Goal: Create a product update for the Flux Capacitor 2

Bad prompt: “Create me a product update for the Flux Capacitor version 2”.

Good prompt: “Create me a product update for the Flux Capacitor version 2. This is a fictional product, based on the original flux capacitor used in the film Back to the Future 2. Make up some new improvements that the Flux Capacitor V2 could have over the first version. Be creative with improvements.”

Write a product brief in Copilot.

Explanation – the second prompt is better because we have firstly provided context of the ask (this is a fictional product), been specific with the ask (we have told it what we expect).

Goal: Create a Lego avatar of yourself

For this, I am using Microsoft Designer Image creator.

Bad prompt: A picture of a person with brown hair as a Lego man.

Good prompts: A person with short dark brown hair, wearing a tuxedo and holding a glass of champagne sitting on a chair outside a large country house on a cold dusk evening in the summer. Lego Style, illustration, 3d rendered.

Explanation: The second prompt is better (well depending on what we want) because again we have given specific asks about what we want, been specific with the ask, provided some context about what we want to produce and described the image we want.

Goal: Write a story about a dog called Benji

Bad prompt: Write a story about a dog named Benji

Good prompt: Write a story about a dog name Benji. Benji a small puppy and lives a family with four people including two young children called Jack and Jill. Benji is a lazy dog but discovers a passion for going for walks to train stations and barking at trains. Creative Style writing.

Explanation – the second prompt is better because we have firstly provided context of the story we would like and have also given a background to the story. We have guided the AI to how we’d like the story to flow and then left it to the AI to write. We have also specified a mode we want it in “be creative”. We can use another “turn” to make the story shorter or to write a catchy title for the story.

Goal: Extract key information from a document

Note: For this example, I am using a document here: Energy Consumption in the UK 2023 (publishing.service.gov.uk). I have opened this page in Microsoft Edge and am using Copilot in Edge to ask about the document.

Bad Prompt: Tell me about this document.

Good Prompt: Read this document and create a table that shows the main energy usage across different key areas in order of highest to lowest. Also provide a short commentary after the table that describes more about these areas and whether these are increasing over time or reducing.

Using Copilot in Edge to discuss and extract data from a document.

Explanation: the first prompt simply creates a summary of the document. This is useful (try it), but we haven’t told it what we actually want to see (which might be fine) and usually we have a specific thing we are looking for when we analyse a document. The second prompt is much more specific. It gives the AI clear direction (specific ask) about what we want and how we want the data presented.

Perfecting your “Prompts”

Writing good AI prompts is just the first step in working with generative AI tools like ChatGPT and Copilot. To get the best results, you need to perfect your prompts over time and practice. Don’t think of it as a chore. Enjoy it as you learn… You’ll soon become a pro.

Here’s my tips on how to perfect your AI prompts:

  • Timing: I find it best to think of a task you need to perform and use a real example to see if you can get what you need. As an example, if I’m doing a customer demo on AI, I tend to use an example relevant to organisation I am working with and make the request about them (or make up a scenario specific to them).
  • Experiment: Don’t be afraid to experiment with different prompts and see what works best. Try different variations of your prompts and see which ones generate the best results.
  • Adapt: Generative AI tools like ChatGPT and Copilot are constantly evolving and improving, so it’s essential to adapt your prompts to keep up with the latest changes. This also means the result you get from the same prompt may change a week or month later. The data it’s referencing may also change.
  • Enjoy the learning experience: Working with generative AI tools can be challenging, but it can also be a lot of fun. Enjoy the learning experience and don’t be afraid to try new things.
  • Use image creation as a fun way to learn whilst text-based requests are usually caused hat we need to do, practicing on image creation using something like Microsoft Designer is great fun and people tend to share their prompts on social media… Here is an example of one I shared.
Bing Image Creator in Designer.

Conclusion

Working with generative AI tools like ChatGPT and Copilot can be challenging, but it can also be rewarding. By following the tips outlined in this blog post, you can write and perfect good AI prompts that generate accurate and useful results. Remember to experiment, adapt, and enjoy the learning experience.

With practice, anyone can become proficient in working with generative AI tools.

The video I have included hopefully provides more context – feel free to follow along in Copilot in Edge or ChatGPT

Copilot to get GPT-4 Turbo and more in early 2024

Microsoft announced yesterday (5th Dec 2023) that Microsoft Copilot will soon be updating again and is set to include new enhancements which include transition to GPT-4 Turbo, a new advanced Code Interpreter, and the integration of the latest DALL-E 3 image creation model.

At ignite, Microsoft also consolidated their various AI services such as Microsoft 365 Copilot, Bing Chat Enterprise etc, under a unified brand – Microsoft Copilot in a view to create a consistent message, branding and look and feel. Microsoft is investing more than ever in their AI quest and has recently revealed plans to introduce a host of new AI features across the board. In early 2024, we can expect to see many upcoming additions to Microsoft Copilot, including the integration of GPT-4 Turbo, a new Code Interpreter, and the latest DALL-E 3 model. We will also see increased plug in and extensibility features which will be accessible via the newly announced Copilot Studio and other developer tools.

Its worth noting that GPT-4 is already used in many places across the Microsoft eco system including Bing, Copilot, Image Creator from Designer, and is already in use in regular web result ranking in Bing.

What new features are coming to Copilot in early 2024?

  • GPT-4 Turbo – Microsoft has confirmed in their AI blog post that Copilot will soon leverage OpenAI’s latest model, GPT-4 Turbo. This will bring signifcant enhancements to chat and allow users to use Copilot to handle lengthier and more intricate tasks. This could launch to early access users users by the end of December with wider availability from early 2024.
  • DALL-E 3 – the updated image creation model available now in Bing Image Creator and Designer. and Copilot in Edge (Bing Chat). This enhanced image model brings enhanced capabilities and will allow to generate more relasitic, higher quality and more accurately matched images based on user prompts and requests. These features are available now and can be accessed from Copilot in Edge (and Microsoft Designer) to create impressive images through prompts.
  • Inline Compose is a new feature in Microsoft Copilot for Edge that allows users to highlight/select specific text on a website (such as email compose or a blog) and have Copilot rewrite it or modify it. Copilot will then rewrite the selected text accordingly and provide options to tune the way it rewrites it. This is available now in Copilot in Edge.
  • Code Interpreter – Similar to what is already available in ChatGPT, Copilot will soon get a Code Interpreter which will enable users to undertake complex tasks such as precise calculations, complex coding, data analysis, visualisations, and mathematical operations. This is currently in provate preview and is expected to be rolled out in early 2024.
  • GPT-4 powered search – Microsoft have said they will soon be merging the capabilities in GPT-4 powered search with vision – integrating Bing image search and web search data. This integration will enhance image understanding for user queries and provide an improved search experience. This is due in early 2024.
  • Deep Search – Ok, so I saved the best till last! Deep Search will soon be integrated into Copilot, leveraging the latest capabilities of GPT-4. With this, you can get better search results for complex topics and explore the web in more depth and detail. Deep Search will not replace Bing Search but instead will provide an additional option for users. Note: while regular search results are returned in less than a second, Deep Search may take up to thirty seconds to complete – Microsoft say that although this may seem like a long time compared to normal search, it delivers significant more specific and comprehensive answers. This is due to be released in early 2024.
Deep Search in Copilot - Image (C) Microsoft.
Deep Search in Copilot – image (C) Microsoft.

No increase in pricing for GPT-4 in Copilot

Like Bing Chat, Copilot remains a free experience with access to GPT-4 and DALLE-3 on its platform. By contrast, ChatGPT and GPT-4 Premium both require paid subscriptions to access either of those abilities from within its chatbot.

What is GPT-4?

GPT-4 is a state-of-the-art generative AI LLM (Large Language Model) that can create natural language text from any input. It is built by Open AI and can be bought or licensed directly or via many Microsoft AI services including Azure Open AI and Microsoft Copilot.

.