Prompt Engineering Definition:
- Prompt engineering is the process of structuring text, that can be interpreted and understood, by a Generative AI Model. A prompt is natural language text describing the task that an AI should perform.
- Prompt engineering may involve phrasing a query, specifying a style, providing relevant context or assigning a role to the AI such as “Act as a native French speaker”. A prompt may include a few examples for a model to learn from, an approach called few-shot learning.
– Wikipedia
Creating an effective image generator prompt is an art in itself. It requires a blend of creativity, and an understanding of the Foundation Model’s capabilities.
These prompts and techniques can be applied to any of the Generative AI Platforms and Foundation Models for Images, including Amazon Bedrock, Open AI’s DALL-E/DALL-E 2, or Google Gemini.
Here are some things to consider when your are writing prompts for images:
- Clear Objective
- Image style
- Artistic Style
- Emotional Tone
- Use of Color
- Level of Abstraction
Clear Objective
For example, simply asking an AI to “generate an image of a lion“ will produce a generic image like the one below. But this may not meet your specific needs.
Prompt: “generate an image of a lion”
Image style
One way to guide the FM with a well-crafted prompt is to specify the image style.
Examples of image style:
- Photorealistic: These images have a high level of detail and look very realistic.
- Sketch: These images have a more simplistic style and are often used to create concept art.
- Watercolor: These images look like watercolor paintings and have a more fluid and organic feel, with a lot of blending and soft edges.
- Oil Painting: These images have a more textured and layered feel, with thick brushstrokes and visible brushwork.
- Cartoon: These are images that are generated to look like cartoons. They have a more stylized and exaggerated feel, with bold lines and bright colors.
- Pop Art: These are images that are generated to look like pop art, with bold colors and graphic shapes.
Prompt Example: “generate a photorealistic image of a lion”
Artistic Style
Style is basically the manner in which an artist portrays his or her subject matter and how the artist expresses his or her vision.
Consider the artistic style you want the FM to emulate. This could be a specific art movement (like Impressionism or Cubism), a particular artist’s style, or even a unique aesthetic (like minimalism or surrealism).
Prompt Example: “Create a digital painting of a lion at sunset in the style of Impressionism.”
Emotional Tone
Emotions are conscious mental reactions, subjectively experienced as strong feelings, which can be accompanied by physiological and behavioral changes in the body.
Some emotions, in alphabetical order, are admiration, adoration, aesthetic appreciation, amusement, anger, anxiety, awe, awkwardness, boredom, calmness, confusion, craving, disgust, empathic pain, entrancement, excitement, fear, horror, interest, joy, nostalgia, relief, romance, sadness, satisfaction, sexual desire and surprise.
Art is all about evoking emotions. What feeling do you want the image to convey?
Including an emotional tone in your prompt can guide the AI in creating artwork that resonates on an emotional level.
Prompt Example: “Create a digital painting of a lion at sunset in the style of Impressionism that evokes a sense of tranquility.”
Use of Color
Color can dramatically influence the mood and impact of an artwork. Do you want vibrant, bold colors? Or perhaps a monochromatic palette? Specifying the use of color in your prompt can help achieve the desired visual effect.
Prompt Example: “Create a digital painting of a lion at sunset in the style of Impressionism, using warm and vibrant colors to evoke a sense of tranquility.”
Level of Abstraction
Finally, consider the level of abstraction you want in the artwork. Do you want a realistic representation or something more abstract? This can greatly influence the final output of the AI.
Prompt Example: “Create a semi-abstract digital painting of a lion at sunset in the style of Impressionism, using warm and vibrant colors to evoke a sense of tranquility.”
Add additional complexity:
To construct a more detailed prompt, you can refine the core prompt by adding more instructions. Adding more complexity to the prompt can further refine the generated image. For instance, you could describe the environment around the lion, such as whether it’s indoors or outdoors, what the weather is like, or what the lion is doing
And we earlier mentioned artistic style, but you can also specify a particular artist’s style, such as:
- Leonardo da Vinci,
- Van Gogh,
- Picasso
Combining complexity and the specific style of an artist, you could say, “generate a Van Gogh-style painting of a lion playing with a ball of yarn.”