avatarAnnabel Lee

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2820

Abstract

plex task; otherwise models may face reasoning errors when rushed for immediate answers. In OpenAI prompt engineering, tactics like instructing the model to work out its solution step by step, using inner monologue to hide reasoning, and asking the model if it missed anything aim to improve reasoning and provide more reliable responses. These strategies emphasize a thoughtful approach over immediate conclusions.</p><h2 id="5b20">5. Use external tools</h2><p id="ce2e">The effectiveness of models such as ChatGPT is much contingent on their underlying structures. OpenAI’s prompt guide notes that plugins or external tools can offset the model’s weaknesses. OpenAI also recommends leveraging embeddings-based search for efficient knowledge retrieval and employing code execution for more precise calculations. Integrating external tools with these systems can enhance overall performance, augmenting its capabilities — much like how we are using ChatGPT to augment ours!</p><h2 id="099a">6. Test changes systematically</h2><p id="121a">OpenAI recommends that users assess the models they employ to determine if the system produces the desired results. The creators of ChatGPT propose that users consider conducting evaluations, such as presenting various scenarios or questions to the model, to verify its satisfactory performance.</p><h1 id="1bca">Do’s and Don’ts Guide</h1><p id="9fa6">In addition, here are some tips to your OpenAI usage journey:</p><figure id="3f73"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*l8Zb7oJbFX4iOMUx"><figcaption>Photo by Job Savelsberg on Unsplash</figcaption></figure><p id="e465">Dos</p><h2 id="3db4">1. Be specific.</h2><p id="d5c0">Provide clear details about what you’re looking for. Specify the context, desired tone, or format.</p><p id="714e">Good: “Write a creative story about a futuristic city where robots coexist with humans.”</p><p id="ccf2">Bad: “Write something futuristic.”</p><h2 id="a438">2. Ask Open-Ended Questions.</h2><p id="7927">Encourage detailed responses by avoiding yes/no questions.</p><p id="2627">Good: “Explain the impact of artificial intelligence on society, considering both positive and negative aspects.”</p><p id="c864">Bad: “Is ChatGPT good or bad?”</p><h2 id="9d2b">3. Use Descriptive Language.</h2><p id="5ffd">Create a clear and detailed depiction of what you require.</p><p id="176d">Good: “Provide a detailed overview of the prominent patterns and fluctuations observed in the sales figures throughout the preceding year.”</p><p id="cdc8">Bad: “Sales data trends”</p><h2 id="f91e">4. Specify Length of Expected Content.</h2><p id="6e7f">Clearly mention if you want a short paragraph, an essay, or any other specific length. This is particularly useful and affects the generated output.</p><p id="5790">Good:

Options

“Compose a concise poem (10–12 lines) about the beauty of roses.”</p><p id="d104">Bad: “Write a poem about roses.”</p><p id="1f75">Don’ts:</p><h2 id="7796">1. Avoid Ambiguity.</h2><p id="e4b2">Ambiguity is the enemy of ChatGPT. Ensure your prompt has a clear focus to prevent misinterpretation.</p><p id="6509">Good: “Describe the process of rainfall in simple terms.”</p><p id="3e24">Bad: “Explain rain.”</p><h2 id="792c">2. Steer Clear of Compound Requests.</h2><p id="84e6">Keep it focused on one idea to maintain clarity.</p><p id="24b0">Good:</p><p id="8f36">A. “Analyze customer satisfaction survey data to identify key trends.”</p><p id="d390">B. “Based on the analysis, provide recommendations for improving service quality.”</p><p id="7519">Bad: “Analyze customer satisfaction survey data and provide recommendations for improving service quality</p><h2 id="7974">3. Minimize Jargon.</h2><p id="9192">Use simple language to avoid confusion as much as possible and being unnecessarily convoluted.</p><p id="59e6">Good: “Study the data thoroughly and find important insights.”</p><p id="ece7">Bad: “Conduct an exhaustive and all-encompassing analysis of the multifaceted facets inherent in the data, examining its intricacies and elucidating comprehensive insights.”</p><h2 id="1b9f">4. Don’t Assume Prior Knowledge.</h2><p id="4840">Make sure your prompts are accessible to a broad audience.</p><p id="7eb9">Good: “Examine the relationships between variables in the dataset. Identify any patterns or trends that may help in understanding how changes in one variable relate to changes in another.</p><p id="cf7b">Bad: “Analyze the regression coefficients in the dataset.”</p><h1 id="329c">To sum it all up</h1><p id="05d6">Adhering to these outlined principles will contribute to the creation of responses that closely align with your anticipated outcomes. By following these guidelines, you can enhance the likelihood of obtaining replies that better meet your expectations and requirements. Now go try it out 😉</p><figure id="e8dc"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*w2zPvMoyEYu5_KQo"><figcaption>Photo by Jake Lorefice on Unsplash</figcaption></figure><h2 id="2516">References:</h2><p id="acc5"><a href="https://platform.openai.com/docs/guides/prompt-engineering">https://platform.openai.com/docs/guides/prompt-engineering</a></p><p id="951b"><a href="https://community.openai.com/t/openais-dec-17th-2023-prompt-engineering-guide/562526/1">https://community.openai.com/t/openais-dec-17th-2023-prompt-engineering-guide/562526/1</a></p><p id="88ec"><a href="https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api">https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api</a></p></article></body>

Master ChatGPT — OpenAI Prompt Engineering Demystified

OpenAI dropped the Prompt Engineering guide a few days ago. Hopefully this helps the broader audience get more savvy, and gain insights into more effective ways to interact with OpenAI models for more accurate and desired outputs. Let’s dive straight into it.

Photo by Levart_Photographer on Unsplash

1. Write clear instructions

OpenAI emphasized the importance of users being explicit about their requirements. If you desire brief responses, express that precisely. For more sophisticated answers, request expert-level writing. ChatGPT will write in the persona you specify too. Providing clear instructions helps systems like ChatGPT understand your requirements accurately.

2. Provide reference text

The creators of ChatGPT advocate that providing reference texts can reduce inaccuracies in generated outputs. OpenAI recommends directing the model to respond supplying reference text or include citations from a specified source to achieve this.

3. Split complex tasks into simpler subtasks

Divide and Conquer — an axiom in programming and is still and especially relevant in OpenAI prompt engineering. In this case, it means breaking down a complicated question or problem into smaller, more straightforward components. This approach can help improve the model’s understanding and response accuracy.

E.g. instead of asking a single complex question like “War and its impacts?”, you can split it into simpler subtasks:

A. Historical Conflicts — “Provide some background on wars and historical conflicts, describing the context and evolution of war”

B. Geopolitical Impacts — “Discuss the possible implications of War and Geopolitical Impacts”

C. Humanitarian Impacts “Do the same for War and Humanitarian Impacts” *

By approaching the question in this way, you provide the model with clearer directions, making it more likely to provide accurate and relevant information for each subtask.

* Note: The prompt for item 3C works and is related to the next point — the OpenAI model actually understands your history and context.

Photo by Emiliano Vittoriosi on Unsplash

4. Give the model time to “think”

Much like humans, problem-solving by AI takes time too. In short, be patient with it and let it work through a complex task; otherwise models may face reasoning errors when rushed for immediate answers. In OpenAI prompt engineering, tactics like instructing the model to work out its solution step by step, using inner monologue to hide reasoning, and asking the model if it missed anything aim to improve reasoning and provide more reliable responses. These strategies emphasize a thoughtful approach over immediate conclusions.

5. Use external tools

The effectiveness of models such as ChatGPT is much contingent on their underlying structures. OpenAI’s prompt guide notes that plugins or external tools can offset the model’s weaknesses. OpenAI also recommends leveraging embeddings-based search for efficient knowledge retrieval and employing code execution for more precise calculations. Integrating external tools with these systems can enhance overall performance, augmenting its capabilities — much like how we are using ChatGPT to augment ours!

6. Test changes systematically

OpenAI recommends that users assess the models they employ to determine if the system produces the desired results. The creators of ChatGPT propose that users consider conducting evaluations, such as presenting various scenarios or questions to the model, to verify its satisfactory performance.

Do’s and Don’ts Guide

In addition, here are some tips to your OpenAI usage journey:

Photo by Job Savelsberg on Unsplash

Dos

1. Be specific.

Provide clear details about what you’re looking for. Specify the context, desired tone, or format.

Good: “Write a creative story about a futuristic city where robots coexist with humans.”

Bad: “Write something futuristic.”

2. Ask Open-Ended Questions.

Encourage detailed responses by avoiding yes/no questions.

Good: “Explain the impact of artificial intelligence on society, considering both positive and negative aspects.”

Bad: “Is ChatGPT good or bad?”

3. Use Descriptive Language.

Create a clear and detailed depiction of what you require.

Good: “Provide a detailed overview of the prominent patterns and fluctuations observed in the sales figures throughout the preceding year.”

Bad: “Sales data trends”

4. Specify Length of Expected Content.

Clearly mention if you want a short paragraph, an essay, or any other specific length. This is particularly useful and affects the generated output.

Good: “Compose a concise poem (10–12 lines) about the beauty of roses.”

Bad: “Write a poem about roses.”

Don’ts:

1. Avoid Ambiguity.

Ambiguity is the enemy of ChatGPT. Ensure your prompt has a clear focus to prevent misinterpretation.

Good: “Describe the process of rainfall in simple terms.”

Bad: “Explain rain.”

2. Steer Clear of Compound Requests.

Keep it focused on one idea to maintain clarity.

Good:

A. “Analyze customer satisfaction survey data to identify key trends.”

B. “Based on the analysis, provide recommendations for improving service quality.”

Bad: “Analyze customer satisfaction survey data and provide recommendations for improving service quality

3. Minimize Jargon.

Use simple language to avoid confusion as much as possible and being unnecessarily convoluted.

Good: “Study the data thoroughly and find important insights.”

Bad: “Conduct an exhaustive and all-encompassing analysis of the multifaceted facets inherent in the data, examining its intricacies and elucidating comprehensive insights.”

4. Don’t Assume Prior Knowledge.

Make sure your prompts are accessible to a broad audience.

Good: “Examine the relationships between variables in the dataset. Identify any patterns or trends that may help in understanding how changes in one variable relate to changes in another.

Bad: “Analyze the regression coefficients in the dataset.”

To sum it all up

Adhering to these outlined principles will contribute to the creation of responses that closely align with your anticipated outcomes. By following these guidelines, you can enhance the likelihood of obtaining replies that better meet your expectations and requirements. Now go try it out 😉

Photo by Jake Lorefice on Unsplash

References:

https://platform.openai.com/docs/guides/prompt-engineering

https://community.openai.com/t/openais-dec-17th-2023-prompt-engineering-guide/562526/1

https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api

Artificial Intelligence
Machine Learning
Productivity
Technology
Data Science
Recommended from ReadMedium