On Generative AI
38 The Art, Craft or Science of Prompting
Bastien Masse
In this section, we aim to develop a methodology that enables us to craft effective prompts using a series of steps, tips, and tricks. It’s essential to note that generative AI systems can produce a wide range of output (eg, images, texts, code, websites, videos, etc). Each platform has its own strengths and limitations, and operates based on a specific logic. So first of all, be sure to use the right model for the right job. The guidelines below are designed as best practices suitable for most scenarios.
Let us begin by defining what constitutes a ‘good prompt’. Ideally, we would want:
- The prompt to yield a response that meets our needs in content, form, and precision;
- The information provided to be accurate, valid, or at least verifiable;
- The generated result to be replicable;
- A minimalistic approach when providing necessary details for crafting the prompt.
Step 1: Define your desired outcome
As with any research, preliminary planning is crucial. You must have a clear understanding of the output you expect. This might be a simple piece of information, or perhaps you might aim to produce a specific kind of content: be it uniquely worded text, an art style in an image, downloadable code, or a data table. The content types generated by AI are diverse and hinge largely on the specificity of your request. So, clarify your intent upfront:
- What is the purpose and objective of my search?
- How will I use the generated response?
- Are there specific constraints or requirements for the produced result?
For instance, in a library, we wouldn’t randomly pick up books hoping to find the exact information needed. A prompt is akin to asking the librarian for specific data, and both machines and humans need certain information before they could process requests.
Example
Objective: Use a text-generating AI to craft exercises for my students.
Usage: Exercise to be distributed in class.
Format: An English exercise for 2nd graders on irregular verbs
Step 2: Provide context
Context is the backbone for generative AIs. Always remember that your prompt will serve as the semantic framework upon which the AI builds its response. Everything it does is based on constructing a logical, coherent, and probable sequence of words following your prompt. Thus, during this crucial step, you can guide the AI by your choice of words, references, or hints. The stronger the context, the more likely you are to receive a response matching your expectations. Just as a librarian’s job becomes much simpler knowing whether you’re a high-school teacher or a middle-school student, whether you already have some knowledge on the subject, what you’ll use the content for, and if you have specific format requirements. Take the time to precisely and thoroughly express your request: purposes, learning objectives, target audience/level, desired actions, format (outline, list, mind map, syntax, language level…).
Example
“I am a primary school teacher. I wish to create an exercise for my 2nd-grade students (6 to 7-year-olds) to do in class. This exercise should cover irregular past tense verbs in English. Provide me with a fill-in-the-blank text of 10 questions on this topic, followed by its correction.”
Step 3: Analyse, verify, and think critically
Once the AI provides its initial response, two scenarios may arise:
- The response does not match your expectations in terms of quality, form or content, or the AI indicates it can’t fulfil your request. In such cases, consider rephrasing, providing more context, or specifying your needs further. It’s also good to know the platform’s capabilities and limitations (for example, a platform that refuses to provide you with external links or certain formats).
- The response broadly aligns with your expectations. Here, verify the provided information against your knowledge, or cross-reference it with external sources. If needed, delve deeper with the AI for further details or sources.
Step 4: Refine and collaborate
This step is mainly available in chat-based generative AIs, but it’s a potent feature when accessible. After the AI’s initial response, if you are satisfied, you can fine-tune the content by offering additional guidance. This can involve adjusting the response’s form and complexity, creating variations, or asking for explanations and sources. It’s like editing a document: you can instruct the AI as if directing an assistant.
Examples
- Introduce two verbs with more complex past tense forms (like ‘go’ becoming ‘went’).
- Add a question about a verb with an unexpected irregular form (like ‘swim’ becoming ‘swam’ and not ‘swimmed’).
- Use longer sentences.
- Incorporate all these verbs into a short story.
- Write the rule for using irregular past tense verbs in a way a 7-year-old would understand.
- Come up with a mnemonic rhyme to help remember some of the trickier verbs.
- Create variations of this exercise.
Step 5: Adapt the content and implement it
By now, you should have a satisfactory piece of content. However, the process doesn’t end there. This content whether text, image, video, website, or code, is just a medium that you need to apply practically in your teaching process. It’s also rare for this type of content to work as it is, so it may be worth modifying it yourself, improving it and adapting it to your particular context. This implementation directly correlates with the objectives outlined in Step 1 namely the ‘why’ and ‘how’ of your approach. As an educator, this is where you can add value, ensuring the content is inspiring, creative, or innovative. You can then explore, structure, and stage your content appropriately.