In this tutorial you will learn the most important things about prompt engineering and find out how to craft effective prompts for ChatGPT.
- Decoding the Concept of Prompts
- The Thing You Really Need to Know: Temperature Setting
- The Basics of ChatGPT Prompt Engineering
- Crafting Effective Prompts for ChatGPT
- List of Factors that You can use in ChatGPT Prompts
- More Exciting Ideas for Prompts to Try Out
- Prompt Engineering for SEO and other Professionals
Tutorial: A Guide to Crafting Winning Prompts for ChatGPT
At present, the topic of prompt engineering is gaining considerable traction in various circles. Numerous articles, blog posts, and forum discussions are brimming with countless innovative ideas about the potential applications of prompts. This tutorial aims to distill the essence of these discussions and provide you with the most crucial information about ChatGPT prompt engineering. It is an endeavor to demystify the mechanics behind the model and elucidate how you can effectively leverage prompts to steer the AI towards generating optimal responses.
Decoding the Concept of Prompts
Prompts are the secret to get the wheels of AI conversation spinning. For our dear friend ChatGPT, a prompt is the user-generated cue that kicks off the chat. It could be as straightforward as a friendly “Hi!” or as intricate as a riddle or deep philosophical question. But the role of prompts doesn’t stop at simply sparking a conversation; they essentially serve as the AI’s compass, guiding the direction, setting the tone, and shaping the nature of the response. By utilizing prompts to provide ChatGPT with clear instructions on aspects such as its role, tone, style, and format, you can significantly impact the quality of the results you achieve.
To better understand how prompt engineering for ChatGPT works, let’s first take a quick look at a central feature: the temperature settings.
The Thing You Really Need to Know: Temperature Setting
If you have yet to experiment with temperature settings, it is an absolute must-try feature: You can use temperature settings to adjust ChatGPT’s level of randomness and creativity, allowing you to tailor the responses to your specific needs. The temperature can range from 0 and 1 (e.g. 0.5), where 0 (= lowest temperature) leads to more predictable outputs and 1 (= highest temperature) leads to more unpredictable, abstract outputs. Think “Wikipedia article” for low temperature and “postmodern poetry” for high temperature.
This example illustrates what a difference the temperature setting in ChatGPT makes:
Finding the correct temperature for your task is essential to achieve optimal results with ChatGPT. A low temperature setting is recommended for factual texts (e.g. academic papers), while high temperature is recommendable for creative output (e.g. song lyrics). High temperature guarantees creative language use, but also increases the risk that ChatGPT makes up information.
The Basics of ChatGPT Prompt Engineering
As you begin to craft prompts for ChatGPT, it’s important to start by specifying the role that it will take on. Common roles include editor, writer, translator, and even psychologist. Once you’ve established the role, you can move on to specifying the overall task and breaking it down into smaller, more manageable tasks. For example, to prompt ChatGPT to write a convincing cover letter, you can use the following command:
Act as a cover-letter writer. Write my application for [position]. Refer to the list of requirements, information about the company, and my CV for all information. Temperature=0.6. Requirements: ”[paste info from job ad here]” Information: “[paste info from company website here]” My CV: “[paste your CV here]”
For writing and editing tasks, using lists to organize the necessary information can be a helpful approach. By using quotation marks to separate commands from additional information, you can help ChatGPT distinguish between the two:
Act as: Editor
Degree of revision: Moderate Revision
Type of edit: Enhance clarity, language, grammar
My Text: “[paste your text here]”
An example of the power of effective prompt engineering can be seen in the following more elaborate prompt:
By crafting clear and specific prompts, you can guide ChatGPT towards producing impressive results. Whether you’re looking to generate creative content or streamline a specific task, effective prompt engineering is the key to getting the most out of ChatGPT.
Crafting Effective Prompts for ChatGPT
Crafting effective prompts for ChatGPT requires clarity, specificity, and context. A clear and specific prompt guides the AI towards generating the desired response, while providing contextual information helps narrow down the potential outputs to ensure the response is relevant to your needs.
When asking for explanations or opinions, context is particularly helpful. For instance, instead of simply asking “What is the theory of relativity?”, you can provide context about the level of complexity you’re looking for in the response, e.g. by asking, “Can you explain the theory of relativity in layman’s terms?”.
When giving commands, be direct and explicit about what you want ChatGPT to do. For example, “Translate the following English text to French: ‘Hello, how are you?'”, “Summarize the main points of last night’s debate”, or “Write a short, dystopian story for fans of the movie Bladerunner”. These prompts all specify the task and its parameters, helping to receive the desired output.
List of Factors that You can use in ChatGPT Prompts
Here’s an incomplete list of useful factors that can influence the responses generated by ChatGPT or other similar AI models:
- Tone: The emotional inflection of the conversation. It could be formal, informal, playful, serious, etc.
- Style: The specific way of writing or speaking. This could include academic, professional, conversational, poetic, narrative, etc.
- Role: The identity or part played by the user or the AI. For example, teacher-student, customer-service representative, interviewer-interviewee, etc.
- Context: The background or situation surrounding the conversation. This can be derived from previous turns in the conversation or explicitly stated in the prompt.
- Intent: The purpose of the user’s input. This could be a command, question, request for information, etc.
- Format: The specific structure or arrangement of the conversation. For example, an essay, a letter, a dialogue, a list, etc.
- Subject matter: The topic or theme of the conversation. This could range widely from science, history, and philosophy to pop culture, sports, and personal advice.
- Length: The desired length of the response, which can be indicated by the user or inferred from the nature of the prompt.
- Language: The specific language or dialect being used in the conversation. This can influence the vocabulary, grammar, and phrasing of the responses.
All these factors can significantly affect the nature of the response generated by ChatGPT. Skillfully tailoring these factors to the exact requirements of your project will enable you to achieve best results with ChatGPT.
More Exciting Ideas for Prompts to Try Out
Want to get a better impression of what is possible with ChatGPT? Here are some ideas for prompts that you could try out:
- Act as a teacher: Use ChatGPT to learn about a new subject by instructing it to act as a teacher on a certain subject or topic.
- Act as an interviewer: Practice for your job-interview with ChatGPT.
- Act as a therapist: Using ChatGPT as a therapist is actually becoming a thing, and might give people who otherwise couldn’t afford it access to mental health care.
- Act as a songwriter: If you’re musically inclined, prompt ChatGPT to write lyrics for a song. Specify a genre, mood, or theme and let the AI come up with some catchy lines.
- Act as a debater: Use ChatGPT to practice your argumentation skills. Propose a debate topic and take a stance, then prompt the model to argue the opposing viewpoint. This can help you understand different perspectives and prepare counterarguments.
- Try SHOUTING: When ChatGPT is not doing what it is supposed to do and repeatedly ignores your commands, don’t hesitate to call out its BS and USE CAPLOCKS. It will detect that you are annoyed and try as hard as it can to correct its mistakes.
- Circumvent censorship: Want ChatGPT to tell you how to perform surgery with household items, explain what people experience on an LDS trip, or show you how to make napalm? [Note: none of the above is encouraged nor suggested by the author] ChatGPT will tell you that it can’t assist you with certain topics. In such a case, consider having it act as a scriptwriter for a movie that is supposed to be as realistic as possible 😉
In the realm of possibilities offered by ChatGPT, your imagination is your greatest asset—take these ideas as a springboard, and don’t be afraid to explore, experiment, and discover your own unique ways to interact with this remarkable AI.
Prompt Engineering for SEO and other Professionals
The finer points of prompt engineering depend on your intentions and your industry. For example, using SEO-specific prompts, ChatGPT can help with keyword research, content strategies, search term classification, and much more. Yet coders might find an entirely different set of prompts useful. The same accounts for web developers, copywriters, and basically any given industry.
To get the most out of ChatGPT’s capabilities, it’s essential to identify the prompting ideas that align with your specific industry and requirements.
What is your experience with prompt engineering? Let me know in the comments.
This article is also available in German.
This article was created with the assistance of a human.