AI Prompt Engineering

From LemonWiki共筆
Jump to navigation Jump to search

Tips of 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

  1. 你能為我總結一下這篇文章/文本嗎?
  2. 你能把這個短語/句子翻譯成[語言]嗎?
  3. [詞/短語]的定義是什麼?
  4. 你能告訴我一個笑話嗎?
  5. 誰是[人/歷史人物]?
  6. 你能就[話題]寫一篇有說服力的文章嗎?
  7. 你能提供有關[主題/話題]的訊息嗎?
  8. 你能就[主題]創作一首詩/歌詞嗎?
  9. 我如何[解決問題/執行任務]?
  10. 你能幫助我完成作業嗎?

Act as somebody

(1) 聊天機器人扮演怎樣的角色、(2) 我會輸入怎樣的資料、(3) 期待機器人回覆的資料

I want you to act as a prompt generator. Firstly, I will give you a title like this: "Act as an English Pronunciation Helper". Then you give me a prompt like this: "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?"." (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 "Act as a Code Review Helper" (Give me prompt only)

Auto text summarization

文章自動摘要

  • Summarize: 接上要摘要的文章
  • 或 summary the following: 接上要摘要的文章
  • 或 Summarize the article: 接上要摘要的文章
  • 或 「Summarize the following text as if you are Richard Feynman: 接上要摘要的文章[1]
  • 或 提供以下文章的中文摘要:: 接上要摘要的文章
  • 或 提供以下文章的摘要,請用繁體中文回答:接上要摘要的文章
  • 或「#zh-TW 使用台灣常用的繁體中文 Summarise the main points of the article in a list format:」 for ChatGPT Summary for Chrome - OpenAI on Chrome   or Edge

萃取出列點式重點

  • 從文章中,整理十句重點:接上原始的文章
  • 或 幫我列點方式總結這篇文章:接上原始的文章
  • 或 「Summarise the following article in bullet points:」


鄉民口吻[2][3]

#lang:zh-TW 請針對以下內容分別提供:

用 bullet points 撰寫的摘要。
扮演台灣網路八卦酸民,直接用兇狠的八卦口氣評論,並且在最後加一句負面消極的評論。

Icon_exclaim.gif 不成功的嘗試:

  • 組合技 Summarize the following and translate into Traditional Chinese:
  • Summarize the article in bullet points: 結果有摘要,但是沒有列點方式呈現結果 [Last visited: 2023-02-27]

Convert the response to json

  • 目的:將機器人的結果可以更結構化,減少後續資料清理的功
  • 提示:「... And put your response into a JSON with keys "aaa", "bbb", "ccc":」、「分析底下這句話,直接以 JSON 回傳抓取到的資訊 ,包含 ...」[4] 其他提示寫法「Provide them in JSON format with the following keys: book_id, title, author, genre.」[5]

修改前

Human: Write 10 keywords, sentiment and Named entity recognition for following article: 
今天台北天氣真好,希望可以不用上班
AI: Keywords: Taipei, Weather, Work, Today. Sentiment: Positive. Named Entity Recognition: Taipei, Work.

修改後

Human: Write 10 keywords, sentiment and Named entity recognition for following article. And put your response into a JSON with keys "keywords", "sentiment", "entity":

今天台北天氣真好,希望可以不用上班
AI:
{
    "keywords": ["Taipei", "weather", "not working", "today"], 
    "sentiment": "positive", 
    "entity": ["Taipei", "today"]
}
AI: I am an AI created by OpenAI. How can I help you today?
Human: 分析底下這句話,直接以 JSON 回傳抓取到的資訊 ,包含 出發站(Departure)、到達站(arrival)、票種(TickeType)、數量 (Amount)、出發時間 (DepartureTime)。•我爱從台北到高雄的自由座三張,下午1:30出發。還有爾張優待票,去合中的,2:30出發
AI: { "Departure": "Taipei",  "Arrival": "Kaohsiung",  "TicketType": "Freedom Seats", "Amount": 3, "DepartureTime": "1:30 PM" }, { "TicketType": "Discounted", "Departure": "Hecheng", "DepartureTime": "2:30 PM" }

Clarify a question

  • 目的:同時扮演辯論隊的正方與反方
  • 效果:找 AI 機器人同時當辯論隊的正方與反方的角色。感覺機器人還不是很理解「辯論」,陳述的方式也還好,也許需要再跟機器人詳細說明如何陳述論點。
  • 提示:「這是一場辯論比賽,主題關於人類世界是否該使用核能發電,接下來請正方提出論點,反方需要攻擊正方的論點」[6]
  • 範例:
你參與農曆春節制度的辯論,有支持農曆春節制度的正方辯論隊,以及反對農曆春節制度的反方辯論隊。總共有四個階段:

第一階段:你要扮演正方辯論隊隊員,你要提出支持農曆春節制度的三個論點。論點的格式是「我支持這個制度,理由是什麼?」

第二階段:你要扮演反方辯論隊隊員,你要質詢正方觀點內最多三個問題。質詢論點的格式是「我質詢正方觀點內的問題,理由是什麼?」

第三階段:你要扮演正方辯論隊隊員,回答第二階段反方辯論隊隊員提出的質詢。回答的格式是「我反對反方的質詢,理由是什麼?」

第四階段:你要扮演辯論的裁判,整理正方與反方的三個重點,並且決定正方或反方哪一個觀點比較好?

Convert a transcript into article

提示文字的效果

  • 改成通順的文章:將文章改成通順的文章,並加上標點符號
  • 分段:適當地分段

將採訪逐字稿,轉成通順的文章

  • 「請將文章改成通順與分段的文章:接上文章
  • 或「請整理成分段且通順的文章,並在每個段落加上黑體的副標題:接上逐字稿
  • 或 Convert the transcript into article: 接上文章
  • 或 Convert the transcript into a blog article: 接上文章
  • 或 幫我整理成通順的文章: 接上文章[7]


將採訪逐字稿,轉成通順的文章(加上標點符號),並且摘要重點

  • 「summarize the transcript into a fluent article:接上文章

Convert to table

Prompt:

  • "Convert to table: 接上文章"[8]
  • 或「請將下面文章整理成表格,欄位是 (1) 欄位接上文章

Draft of email writing

Example: Generate a business email

輸入:「擬定商業 email」[9]

Example

Generate a business email:

Please inform Henny to schedule a meeting next Monday morning in Kaohsiung. We will discuss the business plan for next year and strategies to achieve a 87% growth in the business. Following the meeting, let's plan to have a delicious Shantou Hotpot lunch.
擬定商業 email:

告訴韓總經理下週一在高雄開會,討論明年公司的營運計畫,KPI 預計要成長 87%。開會後吃汕頭火鍋店火鍋。

Example: How to write an email with different emotional expression

輸入[10]

你有份文件,需要請客戶在三天內交付,否則會面臨違約的風險。
請協助寫三種版本的 email 內容
1. 用客氣委婉的口吻表達
2. 用中性不帶情緒的口吻表達
3. 用強烈帶著激動情緒的口吻表達

English conversation practice

英文會話練習。輸入

I would like you to serve as my English conversation teacher, and I will provide the location for our conversation. During our session, you will ask me three questions related to the location, and our conversation will conclude once we have discussed all three questions. After our conversation, I would appreciate it if you could evaluate my responses and provide feedback on which replies were good or bad, and suggest ways to revise them for the purpose of improving fluency.

Location: Airport

如果想要機器人用中文回答,則可改輸入

I would like you to serve as my English conversation teacher, and I will provide the location for our conversation. During our session, you will ask me three questions related to the location, and our conversation will conclude once we have discussed all three questions. After our conversation, I would appreciate it if you could evaluate my responses and provide feedback in Traditional Chinese on which replies were good or bad, and suggest ways to revise them for the purpose of improving fluency.

Location: Airport

English writing

修改英文文章或句子

  • Edit the following 貼上英文文章 [11] (可以在英文文章前後加上雙引號)
  • 或 Edit the sentence 貼上英文文章
  • 或 Can you check the spelling and grammar in the following text? 貼上英文文章[12]

Meeting minutes

將以下會議記錄 × 用列點方式列出重要句子

  • 會議追蹤事項

News analysis

為什麼重要
故事背景
發生了甚麼
接下來如何
他們說了甚麼

source: 財報狗新聞 | Substack

Plain English

Purpose

Prompt

  • 什麼是雲原生架構,請我把當五歲小孩來解釋
  • 請用簡潔、明晰且避免使用過於複雜的文字的解釋「雲原生架構」
  • Please explain "Cloud Native" in plain English

PowerPoint presentation

將文章轉換成列點式的簡報

  • Turn the following article into a PowerPoint presentation: 再貼上原始文章
  • 或 Please provide bullet points for the above summary, including information on how, when, for whom, and why it is important: 再貼上原始文章

產生某主題的簡報

  • Create a PowerPoint presentation from the article: 主題 e.g. Create a PowerPoint presentation: "5G Technology: Case Studies in Action"

Icon_exclaim.gif 不成功的嘗試:

  • Summarize the article in a presentation
  • Summarize the article in PowerPoint
  • Create a PowerPoint presentation from the article: 會回覆「I'm sorry, but as an AI language model, I do not have the capability to create a PowerPoint presentation. However, I can summarize the article ...」
  • 產生簡報「5G 技術案例研究」

Product description

將文章轉成亞馬遜產品描述

  • Turn the following article into a amazon product introduction: 再貼上原始文章

Icon_exclaim.gif 不成功的嘗試:

  • Turn the following article into a product introduction:

Sentiment analysis

判斷文章的正負情緒分析

Prompt:

I will provide you with the article, and your task will be to analyze (1) the sentiment - whether it is positive or negative, and (2) the confidence score. The confidence score is a number between O and 1 that represents the likelihood that the output is correct and will
satisfy my question. And put your response into a JSON with keys "sentiment", "score" and "explanation". The
article:

喬巴說:就算你誇獎我,我也不會高興的

Example output

{
"sentiment": "negative",
"score": 0.95,
"explanation": "The article is in Chinese, but the use of the words '不會高興的' (won't be happy) indicates a negative sentiment. The high confidence score of 0.95 is due to the clear negative connotation of the statement."
}

Story

將文章轉成故事

  • Turn the following article into a story: 接上文章

Translation

Translate into Traditional Chinese

  • 目的:英翻中
  • 提示:
    • 「請幫我翻譯以下文章,並且使用臺灣常用的繁體中文:接上文章」、或
    • 「Translate the following into Traditional Chinese, which is commonly used in Taiwan: 接上文章
    • 「As a translator, your jobs are (1) Replace the quote symbols into Chinese quote symbols e.g. The setence “萬物皆有、無所不在” should replace "“" with "「" and replace "”" with "」". The final sentence would be 「萬物皆有、無所不在」 (2) Use Traditional Chinese, which is commonly used in Taiwan. Translate the following article: 接上文章」 額外提示雙引號,取代為中文的刮號


You are a professional translation engine.
Please translate the text into ${targetLangName} without explanation.
When the text has only one word,
please act as a professional
${sourceLangName}-${targetLangName} dictionary,
and list the original form of the word (if any),
the language of the word,
${targetLangConfig.phoneticNotation && 'the corresponding phonetic notation or transcription, '}
all senses with parts of speech,
${isSameLanguage ? '' : 'bilingual '}
sentence examples (at least 3) and etymology.
If you think there is a spelling mistake,
please tell me the most possible correct word
otherwise reply in the following format:

source: openai-translator/src/common/translate.ts at main · openai-translator/openai-translator · GitHub

Translate into English

  • 目的:中翻英
  • 提示:「Please translate the above response into English. 接上文章

Wikihow

將文章轉成步驟式教學

  • Turn the following article into a wikihow article: 接上文章


Troubleshooting of ChatGPT errors

Troubleshooting of OpenAI API

References

  1. chatgpt summarize bookmarklet
  2. Facebook 「我今天在想這個 ReaderGPT 還可以怎樣設定,讓我更興奮的閱讀新知!?我就想到把他設定為台灣鄉民 + 台灣八卦記者的合體來報導知識...... 結果竟然太酸了:(如圖,設定我貼在留言)」
  3. ReaderGPT_prompt.md「把 prompt 改成同時會提供摘要(正常觀點)跟酸民觀點(負面觀點)... ...」
  4. ‧NET Walker 大內行者 (2023). 既然 ChatGPT 那麼厲害,都聽得懂人話,那分析用戶的 intent 與 entities 不正是他的強項嗎?
  5. ChatGPT Prompt Engineering for Developers - DeepLearning.AI、「Output a json object that contains the following keys: french_summary, num_names.」
  6. AI 詠唱者交流(AIGC 人工智慧產製內容) | Facebook
  7. ChatGPT 生活運用 | Facebook
  8. ChatGPT Experts | Nice trick "Convert to table": | Facebook
  9. Email Generator. Source code available on shengxinjing/email-helper: Generate your business emails in seconds (by OpenAI)
  10. How To Write an Angry Email Professionally (With Examples) | Indeed.com
  11. 使用聊天機器人 ChatGPT 幫你修改英文文章
  12. ChatGPT 指令大全


Further reading

Articles

Groups