Here’s how to get the best prompts for ChatGPT and image-generating AI

Some basic steps can help ensure you get the best outputs from the powerful AI models.

As large, powerful generative AI models like GPT-4 and DALL-E have become better and more available, a niche element of AI has similarly grown in prominence: prompt engineering, the art/science of getting AI to make what you want.

GPT-4 has already been shown to have a wide range of creative uses, from conjuring a website sketched on a napkin to optimizing dating profiles. Getting exactly what you want from the AI takes a bit of finesse, however. Prompt engineering is a bit like casting a spell, Anna Bernstein, a prompt engineer for Copy.ai, explained to Insider. If you get one thing a little wrong, and the result may be a little wrong.

But if you get the prompt right, you just may be able to coax the AI into making whatever is in your head a reality — or something even better.

Luckily for the majority of us, prompt engineering isn’t a purely technical skill; Bernstein is a poet and had a background in freelance writing before becoming an AI whisperer. While prompt engineering has more than a bit of the ol’ trial-and-error to it, there are certain things to keep in mind that can give you the best shot at getting what you want.

Prompt engineering is the art/science of getting generative AI like ChatGPT to make what you want.

Prompt engineering for ChatGPT and other text-generating AI: Because it’s a chatbot — I mean, it’s right there in the name — you may at first be inclined to ask things of ChatGPT conversationally. 

But that’s the wrong way to go about it, says University of Sydney Business School lecturer Marcel Scharth, who studies machine learning.

“Instead, adopt the mindset that you’re programming the machine to perform a writing task for you,” Scharth wrote in The Conversation. “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.”

That context could include spelling out the points you want made, the format, style, and intended audience, what perspective you want it written from (e.g. first-person), and specific guidance like “no jargon.”

Longer pieces can be broken down into sections, with new instructions given to ChatGPT each time.

When it comes to crafting those instructions, the language you use matters, Bernstein said. Using a verb that makes your intentions clear is key, Bernstein told Insider; “condense this” would be a better prompt than “write it shorter.” ChatGPT is also good at recognizing intent, so introducing what you want it to do right off the bat can help finesse a better result.

Pinning down the right wording and approach can take trial and error; keep in mind prompt engineering is a bit of an art. 

“Don’t give up on a concept just because your first prompt didn’t get the result you wanted,” Bernstein said. “Often, finding the right word or phrasing can unlock what you’re doing.”

Prompt engineering for Midjourney: According to Scharth, image-generating AIs don’t need elaborate and detailed prompts to get good results — sometimes a basic prompt followed by the right stylistic keyword, like a bowl of fruit, hyperrealistic or the word ChatGPT, in the style of Ed Ruscha will suffice.

“After I have a rough idea of what I want to accomplish, I try to narrow things down to people, places and things – the core actors or main drivers in the scene I’m trying to construct,” Justin Reckling, who creates prompts for purchase on PromptBase, told The Verge.

While prompt engineering has more than a bit of the ol’ trial-and-error to it, there are certain things to keep in mind that can give you a better shot.

Reckling then uses the AI to create a few basic versions of his prompt, which he can then refine until getting what he likes. “You start with the big important strokes and then work in the finer details,” Reckling said.

Midjourney has specific prompts which can alter aspects of the image, Scharth wrote. Using “—ar” and then a value will set the aspect ratio, “—no” will omit objects you tell it to, and “—stylize” ups the artistic ante but sacrifices following the instructions exactly. The command “—c” produces more uncanny results, using a 0 to 100 scale; the closer to 100, the wilder the AI gets.

Check out the library: Finally, if you just can’t be bothered to do it on your own or are struggling to get what you want, there are multiple prompt libraries and marketplaces popping up online, like the aforementioned PromptBase, the GPT prompt-producing plugin Arvin, and this collection of over 500 ChatGPT prompts broken into categories, which includes translations into Spanish.

Libraries that look to assist in prompt engineering while helping to establish patterns and codes exist to help you out as well, like Microsoft’s prompt engine.

We’d love to hear from you! If you have a comment about this article or if you have a tip for a future Freethink story, please email us at tips@freethink.com.

Related
GitHub CEO says Copilot will write 80% of code “sooner than later”
GitHub CEO Thomas Dohmke goes in depth to answer questions about how AI-powered development will change the future of innovation itself.
No, AI probably won’t kill us all – and there’s more to this fear campaign than meets the eye
A dose of scepticism is warranted when considering the AI doomsayer narrative — there are commercial incentives to manufacture fear of AI.
To fear AI is to fear Newton and Einstein. There are no “dragons” here. 
Who’s afraid of utopia? AI doubters have cold feet. History can warm them.
What is an AI black box? A computer scientist explains
AI black boxes refer to AI systems with internal workings that are invisible to us. What are the implications of working without transparency?
4 dangers of artificial intelligence—and why they won’t end the world
AI doomsday fears are vague. This framework for the future of AI offers concrete solutions.
Up Next
Subscribe to Freethink for more great stories