ChatGPT Prompt Engineering helps you get the best out of AI.
Good prompts lead to clearer, more accurate answers and smoother conversations. This set of SSW Rules shares simple best practices for writing prompts that unlock ChatGPT’s full potential.
In ChatGPT prompt engineering, various elements play a critical role in shaping the user's prompt and obtaining the desired output. These elements are role, result, intent, context, and constraint.
The bigger your prompts get, the more challenging they become for the AI to understand.
Using Markdown or XML tags will help an LLM parse your prompts more accurately, leading to higher-quality outputs.
The best part is that it doesn't need to follow any specific syntax. It just helps both humans and AI to have structured prompts.
Ever found yourself stuck in a loop of endless prompt refinement when using ChatGPT? Sometimes getting your style of answer is tricky. By setting up custom instructions correctly, you can save hours.
Assigning a specific role to ChatGPT can help guide the model's responses and ensure they align with the desired expertise or perspective. By providing a clear role, you can focus the generated output on the specific knowledge area or viewpoint you require.
Experimenting with different tones in your prompts can help you receive responses that match your desired communication style. By specifying the tone you want ChatGPT to use, you can ensure the generated output aligns with the context and audience of your request.
Sometimes, ChatGPT may require more context or clarification to provide a helpful response. Encouraging the model to ask questions when it needs more information can improve the quality of its answers and prevent misunderstandings.
Testing and iterating on your prompts is essential for achieving better results with ChatGPT. By evaluating the responses you receive and refining your prompts accordingly, you can fine-tune your questions and requests to elicit more accurate and useful answers.
Utilizing prompt chaining can help you guide ChatGPT through a series of questions or tasks, resulting in more comprehensive and interconnected responses. You do this by replying to ChatGPT's output each time to bring it closer and closer to your desired result.
By creating a sequence of related prompts, you can explore a topic in-depth or complete a multi-step task more effectively.
You can give ChatGPT examples of the type of output you want, including the format. Each example you feed it is known as a “shot”.
Understanding when to use 0-shot, 1-shot, or multi-shot prompts can help you get the most out of ChatGPT. These approaches allow the model to learn from different contexts, making it more likely to generate the desired output.
Introducing a critical agent can help refine the output generated by ChatGPT. By asking the model to critique its own responses and revise them based on the feedback, you can improve the overall quality and usefulness of the information or assistance you receive.
Have you ever received an output from ChatGPT and wondered if it could be improved, but you don't have specific complaints? Reflexion (spelled with an 'x', not a 'ct') is way to improve the output from ChatGPT by having ChatGPT critique itself.
Generating multiple responses from ChatGPT and selecting the most suitable one(s) can lead to better overall results. By comparing different outputs, you can choose the response that best aligns with your needs and objectives.
By getting ChatGPT to think through its answers step by step, you can receive more logical and coherent responses that break down complex topics or tasks into easily understandable components. This is especially useful for mathematical questions.
Imagine you're using ChatGPT and you find that the model's answers lack depth or reasoning. You're not alone. Many users experience this, especially when asking complex questions. Tree of Thought (ToT) prompting can be a game-changer in such scenarios.
Note: If you're on GPT Plus, you can use this custom GPT: Tree of Thought Problem Solver.
Defining your intent clearly in a prompt is crucial for helping ChatGPT understand your goal and provide an appropriate response. When the model has a clear understanding of what you're asking, it's more likely to deliver the information or assistance you're seeking.
When crafting prompts for ChatGPT, it's essential to make them concise and clear. A well-written prompt enables the model to understand your request more accurately and deliver a helpful response. Keeping your prompts brief and focused can help prevent confusion and ensure that you receive the information or assistance you're seeking.
When interacting with ChatGPT, it's important to use natural, conversational language in your prompts. This helps the model generate more accurate and human-like responses. ChatGPT is designed to understand and respond to prompts that resemble human conversation, so crafting your prompts in a natural way can lead to better results.
Choosing the right verbs in your prompts can significantly impact the results you get from ChatGPT. Verbs convey the desired action or result, and using appropriate verbs can help the model understand your intent more clearly.
Leading questions can result in biased or unhelpful answers from ChatGPT. To obtain objective and useful responses, it's important to ask open-ended, unbiased questions that allow the model to explore a topic without being influenced by the phrasing of the prompt.
GPT models utilize "tokens" as their smallest units of text. These tokens can be as small as a single character, like "a," or as large as a word, such as "apple." Interestingly, tokens can also represent parts of a word.
For instance, in GPT's perspective, the word "unhappiness" could be tokenized into three parts: "un," "happi," and "ness." Each of these parts is considered a separate token. This flexible understanding of tokens is what allows GPT models to efficiently break down text data for analysis.