Quick Guide to Better Prompt Engineering

Prompt Engineering is a relatively new term associated with the creation of prompts used in guiding AI image generation. It can be kind of confusing when you first get started, because unlike humans, AI uses deep learning machine inference to understand your text, sometimes that can be like trying to speak an alien language.

Let’s dive in and explore how we can better craft our prompts to represent the ideas we intend to to share.

When you build your prompts the general consensus is that starting simple is the best way to explore the concept.

Start with the main subject: A beautiful lush forest scene

You’ll surely get what you asked for, but what it we expand on the text a bit more?

Expand: A beautiful lush forest scene at golden hour, there are wildflowers and mushrooms alongside a pathway

Include some camera details: A beautiful lush forest scene at golden hour, there are wildflowers and mushrooms alongside a pathway, light atmospheric fog, dreamlike, cinematic lighting, rule of thirds, photographed by Annie Liebovitz in a wide-angle shot using an 24mm lens, vintage film aesthetic

Camera details can help the AI to better match your compositional intent, you’ll often get better results in terms of image coherence and fidelity when taking these extra steps. Doing a little research mid-prompt is a generally a good idea.

Include camera details: A beautiful lush forest scene at golden hour, there are wildflowers and mushrooms alongside a pathway, light atmospheric fog, dreamlike, cinematic lighting, rule of thirds, photographed by Annie Liebovitz in a wide-angle shot using an 24mm lens, vintage aesthetic, shot on Kodachrome film, 4K

Including the words Kodachrome and 4K seemed to add a bit more clarity and depth to the overall image, let’s upscale the third image to see what it looks like.

If you don’t know what focal length to use for a given scene, Google it. If you’re making a portrait of a person it’s typically a 50mm or 85mm lens you’ll want to use. If it’s an interior scene or a landscape shot you’ll want something lower like 18mm or 24mm.

Simple example of how focal lengths affect your images.

Including the names of film types can also greatly affect your results, giving you more control over your aesthetic.

There is a case to be made for refining and re-working a prompt. If you’re getting results that look good but something seems off, you can try refining your prompt. Eliminate unnecessary vocabulary and stick to concise details about the subject and the scene. The first words of your prompt are typically the most important, by cleaning up your language and getting right to the details, we can help AI better understand your vision.

Be more descriptive, adjectives have a lot of influence in your results. It takes practice, but with time you’ll start to hone your skills and better predict what word formations give you the results that you desire. Restructuring your prompt, can greatly change something, so if you get a fantastic result, explore it some more and you’ll likely get an even better version.

Here is an upscaled version of one of our results, it isn’t perfect but it illustrates the concepts outlined above:

Don’t be afraid to explore the public spaces, there is so much to learn from more experienced users, these spaces are meant to promote the sharing of ideas, the concept is loosely based on the idea of the “hive mind”, a veritable collection of thoughts and ideas. If you see some cool ideas on the public feeds, copy them and rework them, it doesn’t need to be a clone, make it your own.

When using Midjourney via Discord you can specify an aspect ratio by appending –ar to the end of your prompt (e.g. –ar 16:9, –ar 9:16)

So if we use our example from above and append the argument for aspect ratio, it would look like this: A beautiful lush forest scene at golden hour, there are wildflowers and mushrooms alongside a pathway, light atmospheric fog, dreamlike, cinematic lighting, rule of thirds, photographed by Annie Liebovitz in a wide-angle shot using an 24mm lens, vintage aesthetic, shot on Kodachrome film, 4K –ar 9:16

The resulting images would be in a portrait orientation because we specified that with our aspect ratio selection:

If you want to learn more about prompt craft or prompt engineering you can check out this helpful video that explores these concepts some more.