BOOK: AOD Foundations

6. Writing a Prompt

6.7. Prompt Engineering

The final approach comes from prompt engineering. 

Prompt engineering is the skill of writing an effective question for a generative AI tool, such as ChatGPT. Not all prompts are the same. Some ways of phrasing the request are more likely to yield a good response.

Many of these tricks of prompt engineering would probably apply to writing an effective prompt for a learner audience, since the GenAI learned from our own language use.

Here are some of the tricks of prompt engineering.

  • Objective: State your goal with the question. Whether you're seeking an explanation, a solution, creative input, or factual information, knowing the objective helps the responding person or AI tailor its response to your request.

  • Context: Provide enough background information to frame the question properly. Context helps people and AI to understand the scope and specifics of the question, especially for complex or niche topics.

  • Constraints: Include any constraints or limitations you want the people or AI to adhere to, such as word count, avoiding certain topics, or specific formats (list, paragraph, etc.). Constraints help narrow down the response to fit your responses you seek.

  • Role Assignment: Assigning a role to the person or AI (e.g., as a child, a working professional in the field of finance, a concerned citazen) can influence how the person or AI approaches your question, making the response more aligned with the perspective or expertise you're seeking.

  • Examples: Providing examples or specifying what you're not looking for can guide the person and AI in generating a response that is more aligned with your expectations.