AI Prompt Engineering: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 5: Line 5:
{{LanguageSwitcher | content = [[ChatGPT prompts | EN]], [[ChatGPT prompts in Mandarin | 漢字]] }}
{{LanguageSwitcher | content = [[ChatGPT prompts | EN]], [[ChatGPT prompts in Mandarin | 漢字]] }}


<span id="most-popular-chatgpt-prompts"></span>
== Most Popular ChatGPT Prompts ==
== Most Popular ChatGPT Prompts ==


Most Popular ChatGPT Prompts And How To Improve Them https://www.forbes.com/sites/tjmccue/2023/02/26/most-popular-chatgpt-prompts-and-how-to-improve-them/?sh=45a8fee73064
Most Popular ChatGPT Prompts And How To Improve Them https://www.forbes.com/sites/tjmccue/2023/02/26/most-popular-chatgpt-prompts-and-how-to-improve-them/?sh=45a8fee73064


<span id="role-playing"></span>
 
== Role Playing ==
== Role Playing ==


<span id="act-as-somebody"></span>
=== Act as Somebody ===
=== Act as Somebody ===


Line 19: Line 17:


<pre>I want you to act as a prompt generator. First, I will give you a title like this: &quot;Act as an English Pronunciation Helper&quot;. Then you give me a prompt like this: &quot;I want you to act as an English pronunciation assistant for Chinese speaking people. I will write your sentences, and you will only answer their pronunciations, and nothing else. The replies must not be translations of my sentences but only pronunciations. Pronunciations should use Chinese letters for phonetics. Do not write explanations on replies. My first sentence is 'how the weather is in Istanbul?'&quot; (You should adapt the sample prompt according to the title I gave. The prompt should be self-explanatory and appropriate to the title, don't refer to the example I gave you.). My first title is &quot;Act as a Code Review Helper&quot; (Give me prompt only)</pre>
<pre>I want you to act as a prompt generator. First, I will give you a title like this: &quot;Act as an English Pronunciation Helper&quot;. Then you give me a prompt like this: &quot;I want you to act as an English pronunciation assistant for Chinese speaking people. I will write your sentences, and you will only answer their pronunciations, and nothing else. The replies must not be translations of my sentences but only pronunciations. Pronunciations should use Chinese letters for phonetics. Do not write explanations on replies. My first sentence is 'how the weather is in Istanbul?'&quot; (You should adapt the sample prompt according to the title I gave. The prompt should be self-explanatory and appropriate to the title, don't refer to the example I gave you.). My first title is &quot;Act as a Code Review Helper&quot; (Give me prompt only)</pre>
<span id="format-conversion"></span>
 
== Format Conversion ==
== Format Conversion ==


<span id="convert-response-to-json"></span>
=== Convert Response to JSON ===
=== Convert Response to JSON ===


Line 48: Line 45:
     &quot;entity&quot;: [&quot;Taipei&quot;, &quot;today&quot;]
     &quot;entity&quot;: [&quot;Taipei&quot;, &quot;today&quot;]
}</pre>
}</pre>
<span id="structure-the-reply-in-nested-json-format"></span>
 
=== Structure the Reply in Nested JSON Format ===
=== Structure the Reply in Nested JSON Format ===


Desired format:
Desired format:


<syntaxhighlight lang="json">{
<pre>{
   "output": {
   "output": {
     "keywords": ["keyword1", "keyword2", "keyword3", "..."],
     "keywords": ["keyword1", "keyword2", "keyword3", "..."],
     "summary": "A concise overview that captures the key elements and core ideas of the subject."
     "summary": "A concise overview that captures the key elements and core ideas of the subject."
   }
   }
}</syntaxhighlight>
}</pre>
The prompt:
The prompt:


Navigation menu