When using any generative AI program, the hope is that the program will produce the perfect response. Without prompt engineering, the likelihood of getting the intended outcome is low. Prompt engineering uses specific instructions or carefully worded questions to guide the AI system into giving the desired response.
When crafting your prompt:
1. Be Specific—Tell it what you want, how long it should be, and who or what it is for. For example, "Create the rules for a 52-deck card game that focuses on memory for elementary children to use"
2. Provide Context—List what relevant needs should be included. For example, "I'm struggling to remember music notes for treble clef. I need two examples of how to remember the notes."
3. Give Feedback—If the program is not giving you what you need, tell it to change in specific ways. Or give it examples of what NOT to do. For example, "shorten the summary to four sentences and don't use bullet points"
Below is an example of how prompt engineering can help when using ChatGPT:
User: "What is photosynthesis?"
ChatGPT:
Photosynthesis is the biological process by which green plants, algae, and some bacteria convert light energy into chemical energy in the form of glucose. This process takes place primarily in the chloroplasts of plant cells, specifically in the chlorophyll-containing chloroplasts. The equation for photosynthesis is:
6 CO2 + 6 H2O + light energy → C6H12O6 (glucose) + 6 O2
In simpler terms, during photosynthesis, carbon dioxide (CO2) and water (H2O) are converted into glucose (C6H12O6) and oxygen (O2) in the presence of light energy, which is absorbed by chlorophyll. Glucose serves as the primary energy source for the plant, and oxygen is released as a byproduct, which is essential for aerobic respiration in plants and animals. Photosynthesis is crucial for the sustenance of life on Earth, as it produces oxygen and organic compounds that serve as food for other organisms.
User: "Explain photosynthesis in three sentences"
ChatGPT:
Photosynthesis is a vital biological process in which plants, algae, and some bacteria convert light energy into chemical energy in the form of glucose. This process occurs in specialized organelles called chloroplasts, utilizing chlorophyll, the green pigment found in plants, to capture light energy. Through the combination of carbon dioxide and water, plants produce oxygen as a byproduct, essential for sustaining life, while generating glucose to fuel their growth and metabolism.
User: "Write again for a middle school student to understand"
ChatGPT:
Photosynthesis is like a magic trick plants do to make their own food using sunlight. They have a special green pigment called chlorophyll that helps them capture sunlight. With some water and carbon dioxide from the air, they mix up a special sugar called glucose and give off oxygen as a bonus. So, plants use sunlight to cook up their meals, and in the process, they give us the air we need to breathe!