IT

Prompt Engineering: better results with ChatGPT & Co.

8 min read
May 24, 2024

AI-based tools for creating text or images are the latest development in the digital revolution. Generative AIs such as ChatGPT, Google Bard, Microsoft Bing Chat, and Midjourney already simplify many aspects of everyday office life. Thanks to AI, you can write text, create images, and develop code in the blink of an eye. So what are we waiting for? Let's get started!

But it's not that simple, at least not if you want to get reliable results.

With so many tools and options available, it's important to master the basics. After all, the quality of results depends largely on the prompts. There are some simple but effective tricks that can help you get what you want faster. In this article, you'll find out what these tricks are and what you should keep in mind when using AI tools.

Top AI tools at a glance

ChatGPT

OpenAI's ChatGPT plays a pioneering role in the field of AI text generators and is the market leader in this field (at least as of 2024). Like all AI-based text generators, this chatbot  is based on a pre-trained GPT (Generative Pre-trained Transformer) language model. While ChatGPT-3.5 relies on a database that only goes back to 2021, GPT-4 allows access to current data. ChatGPT version 3.5 is free to use, but the number of prompts that can be used every three hours is limited to 50. ChatGPT-4 is available for a fee.

Google Bard/Gemini

Google's competitor to ChatGPT - Google Bard - is another AI chatbot that can generate all kinds of text. The main difference is that Google Bard uses up-to-date databases.

Microsoft Bing Chat

Microsoft Bing Chat can be accessed and used directly from the Edge browser. This is also a GPT speech model. Bing accesses the Internet in real time to research data. Of particular interest to those who use Microsoft products is that Bing can access all of a user's Microsoft applications.

Midjourney

Midjourney is a generative AI model that creates images based on a variety of training data. Midjourney is controlled by commands to a Discord bot. It synthesizes images in response to a text prompt, as is the case with text-to-text AIs.

How generative AI works

AI chatbots use stochastic processes to generate answers that best match the query posed. The basis for this is the "knowledge" acquired during training. Training aims to process existing data and recognize patterns, such as the continuation of sentences, using various learning methods. A major advantage of AI tools is their speed: while humans often have to painstakingly compile information from various sources, AIs such as ChatGPT-4 and Bing Search sift through huge amounts of data in a matter of seconds.

An AI's ability to learn from the information it finds and from the user's individual prompt design is impressive. As a result, AI-generated text, code, and images are constantly improving. As an indication of AI's ability to learn, Finnish psychologist Eka Roivainen gave ChatGPT an IQ test, which it passed with flying colors. The result: OpenAI's chatbot currently has an IQ of 155, although some critics question the comparability of these results. It is estimated that Albert Einstein's IQ was only slightly higher, at around 160-180.

The apparent biases and reliance on stereotypes of many AI chatbots is concerning from an ethical perspective. OpenAI even acknowledges that its AI "hallucinates" answers that are misleading or even the opposite of the truth. In addition, many AIs are trained on outdated data and sources of information that may be factually incorrect. Those "polluted" data sources are usually unidentifiable and cannot be verified, which compromises the quality of the AI's responses. It's not possible to identify how an original source for an AI's response evaluates facts or how one-sided the original text is. Copyright is often unclear, which can lead to legal problems.

So it's extremely important not to accept AI-generated texts without careful consideration and to check them editorially before publication.

Seven tips for effective prompt design

1. Be clear

ChatGPT on the phone

The basic rule of prompting is that the clearer the prompt, the better the result. Accordingly, you should use clear sentences or questions, while avoiding complex sentences and dialects.

This doesn't mean that you should skimp on context. On the contrary, to get precise answers from AI tools, it helps to formulate several short sentences. Use keywords and give the AI examples and guidelines that are as clear as possible. Specifying the following factors will help:

  • Medium: Where will the text be published?
  • Format: Is it a press release, an email, social media content, etc.?
  • Style: Should the text be written in a witty, formal, casual, or other style?
  • Target audience: Who will be reading the text? Are they professionals, non-specialists, teenagers, or other target groups?
  • Context: What background information and data is available?
  • Purpose: Is the text intended to entertain, inform, or persuade?
  • Form: How long will the text be? How many sections, headings, tables, etc. should be included?

2. Chain prompts for complex tasks

Use "chain prompting" to break large tasks into multiple sections. This makes it easier for the AI to achieve a result that is more specific to you and your topic.

For example, a prompt chain might look like this:

  • Prompt #1: Describe the optimal structure of a promotional newsletter for service XYZ. Field: Email marketing. Target audience: PR & Marketing.
  • Prompt #2: What wording should I avoid in relation to the target audience?
  • Prompt #3: What headlines attract attention? Give me five examples.
  • Prompt #4: Where do I best place the call to action? Give me five examples of CTAs.
  • Prompt #5: Please create a text based on the key points. 700 to 800 words. Four paragraphs. Style: Formal. Target audience: Marketing and PR.

If you want the AI to create a text using chain prompting, first ask for the structure of the text. The second step is to formulate a few key points, which you then specify as the basic structure for the text.

3. Chain of thought prompting

"Chain of thought prompting" makes it possible to understand the approach of AI tools, at least to some extent. By giving instructions such as "Explain to me step by step how you arrived at the result" or "... why you chose these five headings", you can instruct the tool to list a comprehensible chain of reasoning. The results of chain-of-thought prompts are often more sophisticated than normal prompts. 

4. Restart the chat

There are both pros and cons to entering many prompts on a topic, and the chat getting longer and longer as a result. On the positive side, the AI will base its search and elaboration on the chat history, making it more targeted. On the other hand, if the chat history is too detailed and/or the beginning of the chat is no longer provided as context, there's a risk that the chatbot will mix old and new requests.

AIs operate in a limited context, which can lead to meaningless or repetitive results. In the case of chain prompting, this can lead to a rapid deterioration in the quality of the results, as essential information is dropped from the context. It's therefore advisable to restart the chat from time to time.

5. Allow it to think

Let the AI come up with solutions on its own, rather than giving the supposedly correct answer directly in the prompt. This encourages more creative and varied results. For example, instead of asking whether a certain fact is correct by writing the result in the prompt, let the AI first work out its own solution and then compare it with the supposedly correct answer.

6. Check for completeness

Large sources can lead to incomplete answers. For example, if you ask the AI to list excerpts from such a source that are relevant to a particular question, the model may stop too early and not list all the relevant excerpts. After listing each excerpt, the model must decide whether to start writing another excerpt or stop the process. For large source documents, you can often achieve better performance by instructing the model with follow-up queries to find any extracts that were missed in previous runs.

7. Write prompts in English

Keep in mind that the number of English language information sources is much larger than the number of other language texts. ChatGPT is mainly trained with English data. Submitting English prompts will usually lead to better results. The generated content can then be translated with the next prompt or, for example, with DeepL. Alternatively, you can hire a professional to do the translation.

Pay attention to privacy

Sensitive company data does not belong in a prompt of a GPT language model. On the one hand, this is due to the fact that common AI chatbots cannot guarantee 100% data security. On the other hand, there is a possibility that some voice models may re-use the entered data for other purposes. Therefore, pay special attention to the terms of service. Although the data entered isn't visible to other users, it can be viewed by the company providing the AI.

A good practice is to replace sensitive data with wildcards. For example, use "customer XYZ" or fictitious numbers for sensitive financial data. You should also make sure that the data cannot be deduced from the context. Change not only the customer name, but also the industry, region, products, and/or other details.

ChatGPT on the laptop

Adapting prompts for AI using Midjourney as an example

Depending on whether you're using AI tools for text generation and research, or whether you're using Midjourney to generate images, the prompts need to be formulated properly.

  • With Midjourney, basic prompts usually give the best results. Chatbots like Bing Chat, Google Bard or ChatGPT can often handle longer and more complex input better. However, Midjourney's prompt design also works with additional parameters such as URLs to sample images, text content and/or emoticons. These additional inputs have a direct influence on the image design.
  • Midjourney is controlled by commands to a Discord bot. To generate a new image, the command “/imagine” is used, followed by the actual prompt. This command recognition isn't required for other AI tools.
  • Instead of text commands, you can also use image commands to generate images. So Midjourney also works as an image-to-image generator.
  • It's more effective to describe what you want to see than what you don't want to see. For example, if you type "wedding party without cake" as a prompt, an image of a wedding party with a cake will probably be created. You should avoid such negative information in Midjourney prompts altogether, or use the "--no" parameter to exclude certain content.
  • You can also specify the aspect ratio by adding "--ar" after the text command. Otherwise Midjourney creates images in a square 1:1 ratio by default.
  • You can use the “multi-prompts” function to give different elements in your image different weights. This is especially useful for words that are strung together and separated by colons (::).
  • While ChatGPT & co. work well with other languages, in Midjourney you'll get the best results with English prompts. If you write Midjourney prompts in another language, use keywords

Optimizing prompt design: a conclusion

AI tools already make work much easier in many areas, and this is just the beginning. Experts predict that artificial intelligence will have a learning curve that we cannot imagine in terms of time and scope. Even so, we still provide the learning material for AIs - everything we've put online so far and will continue to do in the future. And with every prompt we write!

At first glance, using an AI like ChatGPT may seem simple. However, the best results are achieved when you take a closer look at the design of the prompts. You'll certainly learn a lot from trial and error. But some basic principles for effective prompt engineering will help you get the desired result faster.

Finally, we emphasize one of the most important rules when working with AI tools: post-processing is key! Read and double-check everything the AI shows you. Cross-check and fact-check. Ideally, professional copywriters and/or translators should proofread the texts before you use or publish them.

Do you have any further questions? Then please write to us!

New call-to-action

Subscribe to our newsletter