The Times Australia
The Times World News

.
Times Media

.

How to perfect your prompt writing for ChatGPT, Midjourney and other AI generators

  • Written by Marcel Scharth, Lecturer in Business Analytics, University of Sydney
How to perfect your prompt writing for ChatGPT, Midjourney and other AI generators

Generative AI is having a moment. ChatGPT and art generators such as DALL-E 2, Stable Diffusion and Midjourney have proven their potential, and now millions are wracking their brains over how to get their outputs to look something like the vision in their head.

This is the goal of prompt engineering: the skill of crafting an input to deliver a desired result from generative AI.

Image created using Midjourney. Prompt: oil painting of a child with their grandparent enjoying a moment together and looking at each other. The child’s face is full of wonder and the grandparent’s face is lined with years of living, nostalgia, happy and sad memories and the wisdom of their years. Detailed faces. – – ar 3:2 – – no glasses

Despite being trained on more data and computational resources than ever before, generative AI models have limitations[1]. For instance, they’re not trained to produce content aligned with goals such as truth, insight, reliability and originality.

They also lack common sense and a fundamental understanding of the world, which means they can generate flawed (and even nonsensical) content.

As such, prompt engineering is essential for unlocking generative AI’s capabilities. And luckily it isn’t a technical skill. It’s mostly about trial and error, and keeping a few things in mind.

Read more: AI art is everywhere right now. Even experts don't know what it will mean[2]

ChatGPT

First, let’s use ChatGPT[3] to illustrate how prompt engineering can be used for text outputs. If it’s used effectively, ChatGPT can generate essays[4], computer code[5], business plans[6], cover letters[7], poetry[8], jokes[9], and more.

Since it’s a chatbot, you may be inclined to engage with it conversationally. But this isn’t the best approach if you want tailored results. Instead, adopt the mindset[10] that you’re programming the machine to perform a writing task for you.

Create a content brief similar to what you might give a hired professional writer. The key is to provide as much context as possible and use specific and detailed language. You can include information about:

  • your desired focus, format, style, intended audience and text length
  • a list of points you want addressed
  • what perspective you want the text written from, if applicable
  • and specific requirements, such as no jargon.

If you want a longer piece, you can generate it in steps. Start with the first few paragraphs and ask ChatGPT to continue in the next prompt. If you’re unsatisfied with a specific portion, you can ask for it to be rewritten according to new instructions.

But remember: no matter how much you tinker with your prompts, ChatGPT is subject to inaccuracies[11] and making things up[12]. So don’t take anything at face value. In the example below, the output mentions a “report” that doesn’t exist. It probably included this because my prompt asked it to use only reliable sources.

I used prompt engineering to get ChatGPT to write this news article, which provides inaccurate information.

Art generators

Midjourney is one of the most popular tools for art generation, and one of the easiest for beginners[13]. So let’s use it for our next example.

Unlike for text generation, elaborate prompts aren’t necessarily better for image generation. The following example shows how a basic prompt combined with a style keyword is enough to create a variety of interesting images. Your style keyword may refer to a genre, art movement, technique, artist or specific work.

The following images were based on the prompt leopard on tree followed by different style keywords. These were (from the top left clockwise) synthwave, hyperrealist, expressionist and in the style of Zena Holloway. Holloway[14] is a British photographer known for capturing her subjects in ethereal and somewhat surreal scenes, most often underwater.

Midjourney generations for _leopard on tree_. Images generated by Midjourney.

You can also add keywords relating to:

  • image qualities, such as “beautiful” or “high definition”
  • objects you want pictured
  • and lighting and colours.

With Midjourney, you can even use certain specific commands for different features, including ––ar or ––aspect to set the aspect ratio[15], ––no to omit certain objects, and ––c to produce more “unusual” results. This command accepts values between 0-100 after it, where the default is 0 and 100 leads to the most unusual result.

You can also use ––s or ––stylize to generate more artistic images (at the expense of following the prompt less closely).

The following example applies some of these ideas to create a fantasy image with a dreamlike and futuristic look. The prompt used here was dreamy futuristic cityscape, beautiful, clouds, interesting colors, cinematic lighting, 8k, 4k ––ar 7:4 ––c 25 ––no windows.

Image generated by Midjourney.

Midjourney accepts multiple prompts for one image if you use a double colon. This can lead to results such as the image below, where I provided separate prompts for the owl and plants. The full prompt was oil painting of an ethereal owl :: flowers, colors :: abstract :: wisdom ––ar 7:4.

Image generated by Midjourney.

A more advanced type of prompting is to include an image as part of the prompt. Midjourney will then take the style of that image into account when generating a new one.

A good way to find inspiration and ideas is to explore the Midjourney gallery[16] and style libraries[17].

Despite stunning results, generative AI is subject to inconsistencies such as the floating branch in this image. Prompt: woman watching the sunset, magical realism, very beautiful, nature, colourful, very detailed – – ar 7:4

A career of the future?

As generative AI models enter everyday life, prompting skills are likely to become more in-demand[18], especially from employers[19] looking to get results using AI generators.

Some commentators[20] are asking if becoming a “prompt engineer” may be a way for professionals such as designers, software engineers and content writers to save their jobs from automation, by integrating generative AI into their work. Others have suggested[21] prompt engineering will itself be a career.

It’s hard to predict[22] what role prompt engineering will play as AI models advance.

But it’s almost a given that more sophisticated generators will be able to handle more complex requests, inviting users to stretch their creativity. They will likely also have a better grasp of our preferences, reducing the need for tinkering.

Read more: No, the Lensa AI app technically isn’t stealing artists' work – but it will majorly shake up the art world[23]

References

  1. ^ have limitations (theconversation.com)
  2. ^ AI art is everywhere right now. Even experts don't know what it will mean (theconversation.com)
  3. ^ ChatGPT (chat.openai.com)
  4. ^ essays (oneusefulthing.substack.com)
  5. ^ computer code (twitter.com)
  6. ^ business plans (oneusefulthing.substack.com)
  7. ^ cover letters (www.latimes.com)
  8. ^ poetry (medium.com)
  9. ^ jokes (kavishbaghel.com)
  10. ^ adopt the mindset (oneusefulthing.substack.com)
  11. ^ subject to inaccuracies (www.fastcompany.com)
  12. ^ making things up (aisnakeoil.substack.com)
  13. ^ easiest for beginners (www.digitaltrends.com)
  14. ^ Holloway (www.instagram.com)
  15. ^ aspect ratio (docs.midjourney.com)
  16. ^ Midjourney gallery (www.midjourney.com)
  17. ^ style libraries (ckovalev.com)
  18. ^ in-demand (promptbase.com)
  19. ^ employers (www.theatlantic.com)
  20. ^ commentators (www.ft.com)
  21. ^ suggested (shubhamsaboo111.medium.com)
  22. ^ predict (www.deeplearning.ai)
  23. ^ No, the Lensa AI app technically isn’t stealing artists' work – but it will majorly shake up the art world (theconversation.com)

Read more https://theconversation.com/how-to-perfect-your-prompt-writing-for-chatgpt-midjourney-and-other-ai-generators-198776

The Times Features

HCF’s Healthy Hearts Roadshow Wraps Up 2024 with a Final Regional Sprint

Next week marks the final leg of the HCF Healthy Hearts Roadshow for 2024, bringing free heart health checks to some of NSW’s most vibrant regional communities. As Australia’s ...

The Budget-Friendly Traveler: How Off-Airport Car Hire Can Save You Money

When planning a trip, transportation is one of the most crucial considerations. For many, the go-to option is renting a car at the airport for convenience. But what if we told ...

Air is an overlooked source of nutrients – evidence shows we can inhale some vitamins

You know that feeling you get when you take a breath of fresh air in nature? There may be more to it than a simple lack of pollution. When we think of nutrients, we think of t...

FedEx Australia Announces Christmas Shipping Cut-Off Dates To Help Beat the Holiday Rush

With Christmas just around the corner, FedEx is advising Australian shoppers to get their presents sorted early to ensure they arrive on time for the big day. FedEx has reveale...

Will the Wage Price Index growth ease financial pressure for households?

The Wage Price Index’s quarterly increase of 0.8% has been met with mixed reactions. While Australian wages continue to increase, it was the smallest increase in two and a half...

Back-to-School Worries? 70% of Parents Fear Their Kids Aren’t Ready for Day On

Australian parents find themselves confronting a key decision: should they hold back their child on the age border for another year before starting school? Recent research from...

Times Magazine

Sydney Design Week 2024

How can design push boundaries to support sustainable models for living, connection and culture? Sydney Design Week 2024 brings together visionary designers, architects and artists who are creating space for alternative futures. Powerhouse has toda...

The perfect picture: what makes dream Sydney wedding photography?

The photo album is, without a shadow of a doubt, the most important memento from any loving couple’s special day! It’s the keepsake that keeps on giving, the souvenir to saviour, and the perfect reminder of what was one of the biggest - and most jo...

NetApp and Children’s Cancer Institute Unite for CEO Dare to Cure

NetApp, the intelligent data infrastructure company, is proud to announce its partnership with Children’s Cancer Institute as the Presenting Partner of the CEO Dare to Cure Challenge, a major fundraising event supporting critical research into ch...

Craft the Comfort of Childhood With Puppet Toys

Puppet toys have been a beloved form of entertainment for children for centuries. Not only are they incredibly fun for kids, but they also offer valuable developmental benefits. From fostering imaginative play to exploring emotions, puppets can be ...

Harrison.ai launches world leading AI model to transform healthcare

Healthcare AI technology company, Harrison.ai, today announced the launch of Harrison.rad.1, a radiology-specific vision language model. It represents a major breakthrough in applying AI to tackle the global healthcare challenge. The model is now...

Breaking the Stigma: Fostering Mental Health Awareness in the Workplace

In the evolving landscape of modern workplaces, the conversation around mental health is no longer relegated to the sidelines. As awareness grows, organizations are recognizing the profound impact that mental health has on their employees and, cons...