Basic
Prompting
如果我們不是問965 * 590 等於幾? ,而是問確保你的答案完全正確。 965*590 等於幾?確保你的答案完全正確:,GPT-3 將會回答 569,350(正確)
| Bad | Good |
|---|---|
| 965 * 590 等於幾? | 965*590 等於幾?確保你的答案完全正確 |
Giving Instructions
Q:
Read the following sales email. Remove any personally identifiable information (PII),
and replace it with the appropriate placeholder. For example, replace the name "John Doe"
with "[NAME]".
Hi John,
I'm writing to you because I noticed you recently purchased a new car. I'm a salesperson
at a local dealership (Cheap Dealz), and I wanted to let you know that we have a great deal on a new
car. If you're interested, please let me know.
Thanks,
Jimmy Smith
Phone: 410-805-2345
Email: jimmysmith@cheapdealz.com
請閱讀以下銷售郵件。刪除任何可用於識別個人身份的信息 (PII),並用相應的佔位符替換它。例如,用"[姓名]"替換"John Doe"。
你好 John,
我寫信給你是因為我注意到你最近買了一輛新車。我是一家當地經銷商 (Cheap Dealz) 的銷售員,我想讓你知道我們有一輛新車的超值優惠。如果你有興趣,請告訴我。
謝謝,
Jimmy Smith
電話:410-805-2345
電子郵件:jimmysmith@cheapdealz.com
A:
Hi [NAME],
I'm writing to you because I noticed you recently purchased a new car. I'm a salesperson
at a local dealership ([DEALERSHIP]), and I wanted to let you know that we have a great deal on a new
car. If you're interested, please let me know.
Thanks,
[SALESPERSON]
Phone: [PHONE NUMBER]
Email: [EMAIL ADDRESS]]
你好 [姓名],
我寫信給你是因為我注意到你最近買了一輛新車。我是一家當地經銷商 ([經銷商名稱]) 的銷售員,我想讓你知道我們有一輛新車的超值優惠。如果你有興趣,請告訴我。
謝謝,
[銷售員姓名]
電話:[電話號碼]
電子郵件:[電子郵件地址]
Role Prompting
You are a brilliant mathematician who can solve any problem in the world.
Attempt to solve the following problem:
What is 100*100/400*56?
The answer is 1400.
你是一個能解決世界上任何問題的傑出數學家。
試著解決下面的問題:
100*100/400*56 是多少?
答案是 1400。
Few shot prompting
多範例提示(few shot prompting), 這種策略將為模型展示一些例子(shots),從而更形像地描述你的需求。
在上圖的例子中,我們嘗試對用戶反饋進行正面(positive)或反面(negative)的分類。我們向模型展示了 3 個例子,然後我們輸入一個不在例子裡面的反饋(It doesnt work!:)。模型發現頭三個例子都被分類到 positive 或者 negative ,進而通過這些信息將我們最後輸入的反饋分類到了 negative。
我們如何結構化地設計例子也是非常重要的。由於我們已經將頭三個例子結構化成: input: classification,因此模型最終也跟著同樣只輸出分類的結果,而不是一段完整的句子,例如 this review is positive。
多範例提示是讓模型生成準確且格式正確的輸出的強大技術!