26 Principles of Prompt Engineering

 1 No need to be polite with LLM so there is no need to add phrases like “please”, “if you don’t mind”, “thank you”, “I would like to”, etc., and get straight to the point.

不需要對LLM有禮貌,所以不需要加上「請」、「如果你不介意」、「謝謝」、「我願意」等短語,直接進入觀點。

2 Integrate the intended audience in the prompt, e.g., the audience is an expert in the field.

將目標受眾融入提示中,例如,受眾是該領域的專家。

3 Break down complex tasks into a sequence of simpler prompts in an interactive conversation.

在互動式對話中將複雜的任務分解為一系列更簡單的提示。

4 Employ affirmative directives such as ‘do,’ while steering clear of negative language like ‘don’t’.

使用「做」等肯定性指令,同時避免使用「不」等負面語言。

5 When you need clarity or a deeper understanding of a topic, idea, or any piece of information, utilize the following prompts: - Explain [insert specific topic] in simple terms. - Explain to me like I’m 11 years old. - Explain to me as if I’m a beginner in [field]. - Write the [essay/text/paragraph] using simple English like you’re explaining something to a 5-year-old.

當您需要清晰或更深入地理解某個主題、想法或任何資訊時,請利用以下提示: - 用簡單的術語解釋[插入特定主題]。 - 像我 11 歲一樣向我解釋。 - 像我是[領域]的初學者一樣向我解釋。 - 使用簡單的英文寫[文章/文字/段落],就像向 5 歲的孩子解釋某事一樣。

6 Add “I’m going to tip $xxx for a better solution!”

添加“我將支付 $xxx 小費以獲得更好的解決方案!”

7 Implement example-driven prompting (Use few-shot prompting).

實作範例驅動的提示(使用少量提示)。

8 When formatting your prompt, start with ‘###Instruction###’, followed by either ‘###Example###’ or ‘###Question###’ if relevant. Subsequently, present your content. Use one or more line breaks to separate instructions, examples, questions, context, and input data.

設定提示格式時,請以「###Instruction###」開頭,然後是「###Example###」或「###Question###」(如果相關)。 隨後,展示您的內容。 使用一個或多個換行符號來分隔說明、範例、問題、上下文和輸入資料。

9 Incorporate the following phrases: “Your task is” and “You MUST”.

合併以下短語:「您的任務是」和「您必須」。

10 Incorporate the following phrases: “You will be penalized”.

納入以下短語:「您將受到處罰」。

11 Use the phrase ”Answer a question given in a natural, human-like manner” in your prompts.

在提示中使用短語“以自然、類似人類的方式回答問題”。

12 Use leading words like writing “think step by step”.

使用引導詞,例如寫下「一步一步思考」。

13 Add to your prompt the following phrase “Ensure that your answer is unbiased and does not rely on stereotypes”.

在提示中加入以下短語「確保您的答案公正且不依賴刻板印象」。

14 Allow the model to elicit precise details and requirements from you by asking you questions until he has enough information to provide the needed output (for example, “From now on, I would like you to ask me questions to...”).

讓模型透過向你提問來引出精確的細節和要求,直到他有足夠的資訊來提供所需的輸出(例如,「從現在開始,我希望你問我問題...」)。

15 To inquire about a specific topic or idea or any information and you want to test your understanding, you can use the following phrase: “Teach me the [Any theorem/topic/rule name] and include a test at the end, but don’t give me the answers and then tell me if I got the answer right when I respond”.

要詢問特定主題或想法或任何信息,並且您想測試您的理解程度,您可以使用以下短語:“教我[任何定理/主題/規則名稱],並在最後進行測試,但不要給我答案,然後在我回答時告訴我答案是否正確」。

16 Assign a role to the large language models.

為大型語言模型指派角色。

17 Use Delimiters.

使用分隔符號。

18 Repeat a specific word or phrase multiple times within a prompt.

在提示中多次重複特定單字或短語。

19 Combine Chain-of-thought (CoT) with few-Shot prompts.

將思維鏈 (CoT) 與少樣本提示結合。

20 Use output primers, which involve concluding your prompt with the beginning of the desired output. Utilize output primers by ending your prompt with the start of the anticipated response.

使用輸出引物,其中包括以所需輸出的開頭來結束提示。 透過以預期響應開始結束提示來利用輸出引子。

21 To write an essay /text /paragraph /article or any type of text that should be detailed: “Write a detailed [essay/text /paragraph] for me on [topic] in detail by adding all the information necessary”.

要寫一篇文章/文本/段落/文章或任何類型的應該詳細的文本:“通過添加所有必要的信息,為我詳細寫一篇關於[主題]的詳細[文章/文本/段落]”。

22 To correct/change specific text without changing its style: “Try to revise every paragraph sent by users. You should only improve the user’s grammar and vocabulary and make sure it sounds natural. You should not change the writing style, such as making a formal paragraph casual”.

若要更正/更改特定文字而不更改其樣式:「嘗試修改使用者發送的每個段落。 您應該只提高用戶的語法和詞彙量並確保其聽起來自然。 你不應該改變寫作風格,例如把正式的段落變成隨意的」。

23 When you have a complex coding prompt that may be in different files: “From now and on whenever you generate code that spans more than one file, generate a [programming language ] script that can be run to automatically create the specified files or make changes to existing files to insert the generated code. [your question]”.

當您有可能位於不同檔案中的複雜編碼提示時:「從現在開始,每當您產生跨越多個檔案的程式碼時,請產生一個[程式語言]腳本,該腳本可以執行以自動建立指定檔案或進行更改到現有文件以插入生成的程式碼。 [你的問題]」。

24 When you want to initiate or continue a text using specific words, phrases, or sentences, utilize the following prompt: - I’m providing you with the beginning [song lyrics/story/paragraph/essay...]: [Insert lyrics/words/sentence]’. Finish it based on the words provided. Keep the flow consistent.

當您想要使用特定單字、短語或句子開始或繼續文字時,請使用以下提示: - 我為您提供開頭 [歌詞/故事/段落/文章...]:[插入歌詞/單字/句子]'。 根據提供的單字完成它。 保持流量一致。

25 Clearly state the requirements that the model must follow in order to produce content, in the form of the keywords, regulations, hint, or instructions.

以關鍵字、規定、提示或說明的形式明確說明模型生成內容必須遵循的要求

26 To write any text, such as an essay or paragraph, that is intended to be similar to a provided sample, include the following instructions: - Please use the same language based on the provided paragraph[/title/text /essay/answer]

若要撰寫與提供的範例類似的任何文字(例如文章或段落),請包含以下說明: - 請根據提供的段落使用相同的語言[/title/text /essay/answer]


Popular posts from this blog

一隻有老虎花紋的老鼠

一頭森林裡的大象從桌上的手機螢幕走出來