Year
Artificial Intelligence
Prompt Engineering

WHAT IS PROMPT ENGINEERING

Prompt engineering encompasses the various methods of instructing a GenAI system to guide its output.

Clarity and precision are crucial, as the prompt serves as the foundation for the AI's generation. When you provide a specific tone or terminology in the prompt, the GenAI will respond in a manner that aligns with your chosen tone and includes relevant terms.

ELEMENTS OF A GOOD PROMPT

Try these two prompts:

  • "What are some general ideas for a party?"
  • "You are a professional party planner. Design an elaborate Halloween party for a group of teens who love horror-themed movies. The party will take place on a budget of $5,000 in Swanbourne, Perth, with 70 guests attending in October."

You can also ask follow-up questions, and engage the GenAI's output in iterative improvement.

Modified from University of Queensland (2023). 'Using Generative AI'

STRUCTURING YOUR PROMPT

Tell it the kind of role, expertise, and language to return with (i.e. "ChatGPT, you are a technology enthusiast addressing fellow enthusiasts..." will get different responses to "ChatGPT, you are a kindergarten teacher speaking to a group of 5-year-old children" when asking about describing quantum computing and why it's fascinating.

  • Tell it the domain or topic

  • Any relevant background information

  • Any specific terminology

  • Constraints and limitations of the specific context

Tell it the topic or activity you want it to write about (i.e. Asking for an analogy to describe quantum computing to primary school children)

  • State your objective or goal

  • Break down the steps involved

  • Put in any details such as information or text that the GenAI needs

How do you want it to respond? What kind of format? What kind of tone (i.e. Formal or Informal, etc.)

  • Specify the format you want the output in

  • How much detail you want

  • Any specific things you want included or excluded from the output

VIDEO

PROMP ENGINEERING FOR IMAGE GENERATION

Prompt engineering for GenAI image generators is similar to engineering for text-based GenAI, except the Context is less important, and the Task and Outcome parts are more visual.

Consider:

  • Composition and Framing: “Close-up,” “Low angle,” etc.
  • Style and Technique: “Art Deco,” “1920s,” etc. Or “Black and white,” “Photography,” "Pixar" etc.
  • Context and Vibe: “Studio shoot,” “Vibrant,” etc.

All this is in addition to the Content.

"Generate a book cover for a fantasy novel set in a magical forest. Feature two main characters – a young sorcerer with a determined expression and an enchanted creature resembling a mystical wolf. The forest should have vibrant, otherworldly colours, and the atmosphere should be both mysterious and inviting. Ensure the title ‘Realm of Enchantment’ is prominently displayed in an elegant font"

 

Some examples prompts for image creation

For example, the prompt:

"Can you make me a close-up photo of a clown in a space suit with dramatic lighting"

Will be very different to:

"Please make a wide-angle image of a clown in a space suit in Cubist style."

 

  • Images created with Microsoft Bing image generator
Login to LibApps