{"id":466,"date":"2024-10-24T01:29:49","date_gmt":"2024-10-23T17:29:49","guid":{"rendered":"https:\/\/cliffordjuan.com\/?p=466"},"modified":"2024-10-24T01:29:49","modified_gmt":"2024-10-23T17:29:49","slug":"prompt-engineering-guide-by-chatgpt","status":"publish","type":"post","link":"https:\/\/cliffordjuan.com\/index.php\/2024\/10\/24\/prompt-engineering-guide-by-chatgpt\/","title":{"rendered":"Prompt Engineering guide by ChatGPT."},"content":{"rendered":"\n<p>I&#8217;ve asked ChatGPT a guide in asking a better questions and here&#8217;s what it says.<\/p>\n\n\n\n<p>Prompt engineering is about crafting questions or instructions in a way that maximizes the quality of the response you get. Here\u2019s a step-by-step guide to help you ask better questions and improve prompt clarity:<\/p>\n\n\n\n<h3>1. <strong>Be Clear and Specific<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Make sure the question or task is clearly stated.<\/li><li><strong>Why<\/strong>: It reduces ambiguity, helping me understand exactly what you&#8217;re looking for.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cTell me about Azure.\u201d<\/li><li>Good: \u201cExplain how Azure Copilot assists in managing resources.\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>2. <strong>Provide Context<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Include any relevant information or background that would help me tailor the answer.<\/li><li><strong>Why<\/strong>: It improves the response accuracy by considering your environment or needs.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cHow do I sync data?\u201d<\/li><li>Good: \u201cHow do I sync data between my on-premise Windows Server 2022 and Microsoft Entra ID using Azure AD Connect?\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>3. <strong>Specify the Format of the Response<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Tell me how you\u2019d like the answer (e.g., bulleted list, code snippet, table).<\/li><li><strong>Why<\/strong>: It ensures the response fits your needs for easier consumption or implementation.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cHow do I create a virtual machine?\u201d<\/li><li>Good: \u201cHow do I create a virtual machine in Azure using the CLI? Provide the necessary commands.\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>4. <strong>Ask One Thing at a Time (or Group Related Tasks)<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Focus on one question or a closely related set of questions.<\/li><li><strong>Why<\/strong>: It avoids confusion and ensures each aspect gets sufficient attention.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cHow do I deploy VMs and set up network security in Azure?\u201d<\/li><li>Good: \u201cHow do I deploy a virtual machine in Azure? Follow-up: How do I configure basic network security rules for it?\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>5. <strong>Iterate on Responses<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: If a response isn&#8217;t clear or detailed enough, ask follow-up questions or request more specifics.<\/li><li><strong>Why<\/strong>: It refines the answer and ensures all points are covered.<\/li><li><strong>How<\/strong>:<ul><li>Start: \u201cHow do I configure Azure AD Connect for password writeback?\u201d<\/li><li>Follow-up: \u201cCan you explain what settings I need to configure on the on-premise server?\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>6. <strong>Use Examples<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Provide examples of what you mean to clarify your intent.<\/li><li><strong>Why<\/strong>: It ensures I understand exactly what you\u2019re asking about.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cHow do I automate a task?\u201d<\/li><li>Good: \u201cI want to automate starting and stopping VMs on Azure based on a schedule. What automation options are available for that?\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>7. <strong>Use Constraints or Guidelines if Needed<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Specify any restrictions or preferences (e.g., a specific tool, platform, or version).<\/li><li><strong>Why<\/strong>: It helps me narrow the scope and deliver relevant solutions.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cShow me an example of IaC.\u201d<\/li><li>Good: \u201cShow me an example of using Terraform to deploy an Azure VM with a specific virtual network.\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3>8. <strong>Indicate Your Knowledge Level<\/strong><\/h3>\n\n\n\n<ul><li><strong>Goal<\/strong>: Tell me whether you need a beginner-level explanation, advanced guidance, or something in between.<\/li><li><strong>Why<\/strong>: It ensures I don\u2019t oversimplify or overcomplicate my response.<\/li><li><strong>How<\/strong>:<ul><li>Bad: \u201cHow do I set up network security?\u201d<\/li><li>Good: \u201cI have intermediate knowledge of Azure Networking. How do I set up advanced network security groups for multiple subnets?\u201d<\/li><\/ul><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3>Example: Putting It All Together<\/h3>\n\n\n\n<p><strong>Before<\/strong>:<\/p>\n\n\n\n<ul><li>&#8220;How do I configure Azure AD?&#8221;<\/li><\/ul>\n\n\n\n<p><strong>After<\/strong>:<\/p>\n\n\n\n<ul><li>&#8220;I\u2019ve connected my on-premise Windows Server 2022 domain to Microsoft Entra ID using Azure AD Connect. What\u2019s the process for configuring user provisioning and password writeback for cloud apps like Microsoft 365? Can you provide step-by-step guidance?&#8221;<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Following this guide will help you frame your questions in a way that results in more precise and useful responses!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve asked ChatGPT a guide in asking a better questions and here&#8217;s what it says. Prompt engineering is about crafting questions or instructions in a way that maximizes the quality of the response you get. Here\u2019s a step-by-step guide to help you ask better questions and improve prompt clarity: 1. Be Clear and Specific Goal: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/cliffordjuan.com\/index.php\/2024\/10\/24\/prompt-engineering-guide-by-chatgpt\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Prompt Engineering guide by ChatGPT.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[32],"tags":[28,30,31],"_links":{"self":[{"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/posts\/466"}],"collection":[{"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/comments?post=466"}],"version-history":[{"count":2,"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/posts\/466\/revisions\/468"}],"wp:attachment":[{"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cliffordjuan.com\/index.php\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}