Explicitness: Being more explicit in your prompt can help in getting more accurate or specific answers. For instance, instead of asking “Tell me about apples,” you might ask “Provide a detailed overview of the history, cultivation, and nutritional benefits of apples.”
Prompt Length: Sometimes, longer prompts can provide more context to the model, leading to better answers. However, there’s a balance to strike, as overly verbose prompts might not necessarily yield better results.
Iterative Refinement: Prompt engineering often involves iteratively refining the prompt based on the model’s outputs. By observing how the model responds to different phrasings or structures, one can optimize the prompt for better results.
Prompt Templates: For repeated tasks or applications, one might develop templates that have proven to elicit good responses from the model. For example, for fact-checking, a template might be: “Fact-check the following statement: [Statement here].”
Leading and Bias: It’s essential to be aware that prompts can introduce bias. If you lead the model too much or phrase things in a biased way, the output will reflect that. For instance, asking “Why is X bad?” versus “What are the pros and cons of X?” will likely yield different responses.
Systematic Approaches: As the field matures, researchers and practitioners are developing more systematic approaches to prompt engineering, using techniques from active learning, reinforcement learning, and other areas to automate or semi-automate the process of finding effective prompts.
Prompt engineering is crucial because, in many applications, slight changes in the prompt can lead to significantly different outputs. As such, understanding how to effectively communicate with models like ChatGPT is an important skill for users and developers.
Examples
1.
Hiking is more than just a physical activity; it’s a journey of the soul. As one ventures into the wilderness, each step brings them closer to nature and further from the hustle and bustle of daily life. The sound of leaves crunching underfoot, the distant chirping of birds, and the gentle rustling of trees in the wind are a symphony of serenity.
In conclusion, hiking is not just about reaching a destination; it’s about the journey, the experiences, and the memories made along the way. So, lace up those boots and hit the trails!
2.
The first light of dawn paints the sky in hues of pink and orange. As the world slowly awakens, there’s a unique feeling of anticipation in the air. It’s the perfect time to embark on a summer hiking adventure.
Starting a hike in the early morning is magical. The air is crisp, and the world feels untouched. Dew-kissed leaves shimmer in the sunlight, and the trail is quiet, save for the occasional chirp of a bird or the distant call of a mountain critter.
By noon, after hours of trekking, there’s no better reward than reaching a mountaintop. The panoramic views are breathtaking, and the sense of accomplishment is unparalleled. With a gentle breeze as company, it’s time to unpack a lunch and savor it amidst nature’s grandeur.
The descent, though tiring, is filled with a sense of contentment. Every muscle might ache, but the heart is full. The setting sun casts a golden glow on the path, making every step feel like a walk in a fairy tale.
Coming home after such a day, one is undoubtedly exhausted. But it’s a good kind of tired. The kind where you sink into your bed with a smile on your face, memories of the day flooding your mind, and a heart full of gratitude for the beauty of the world.
In order to use custom instructions, click the three dots by your account icon (bottom left) and select
Custom Instructions
from the menu. You can use this feature to tell ChatGPT about your use case and what kind of response you wish to receive.
Giving ChatGPT Context
Basic prompt:
Write a tweet about hiking.
Contextual prompt:
Components of a Good Prompt
Example of previous prompt with a constraint added:
Be Explicit:
Specify the Format:
Provide Context:
Ask Open-ended Questions:
Avoid Leading or Biased Prompts:
Iterative Refinement:
Use Role-playing:
Set Constraints:
Experiment and Iterate:
Continued…