「提示設計」是指建立提示來促成所需流程的程序 語言模型的回應撰寫條理分明的提示相當重要 能確保語言模型提供準確且高品質的回覆。這個 頁面會介紹一些基本概念、策略和最佳做法,助您達成目標 再開始設計提示
什麼是提示
「提示」是指提交至語言模型的自然語言要求 並獲得回覆提示可以包含問題、指示、情境 資料、範例,以及模型完成或繼續的部分輸入內容 模型收到提示後,視使用的模型類型而定 能生成文字、嵌入項目、程式碼、圖像、影片、音樂
提示內容類型
提示可包含下列一或多種類型的內容:
輸入
「輸入內容」是指您希望模型生成回覆的提示文字 這是必要的內容類型輸入內容可以是模型 就是指模型執行的工作 (工作輸入), 模型進行作業 (實體輸入) 或模型完成的部分輸入 繼續 (完成輸入)。
輸入問題
問題輸入就是您對模型 產生各種回應
What's a good name for a flower shop that specializes in selling bouquets of dried flowers? 1. Everlasting Blooms 2. Timeless Petals 3. Dried Flower Paradise 4. Eternal Flora 5. Vintage Floral Treasures 6. Rustic Bloom Gallery 7. Ardent Adornment 8. Potpourri Dreams 9. Dried Daisy Days 10. Forever Floral Art |
工作輸入內容
工作輸入是指您希望模型執行的工作。適用對象 例如,您可以指示模型提供某些內容的想法或建議。
Give me a simple list of things that I must bring on a camping trip. 1. Tent 2. Sleeping bag 3. Sleeping pad 4. Pillow 5. Lantern or flashlight 6. Headlamp 7. Camp stove 8. Fuel for camp stove 9. Cooking pot and utensils 10. Food and water 11. First aid kit 12. Sunscreen 13. Insect repellent 14. Toiletries 15. Toilet paper 16. Fire starter 17. Map 18. Compass 19. Whistle 20. Multi-tool 21. Tarpaulin 22. Rope 23. Garbage bags 24. Camera 25. Binoculars |
實體輸入
實體輸入內容是指模型對其執行動作的行為,例如 分類或總結這類輸入資料會因納入 操作說明。
Classify the following items as [large, small]. Elephant Mouse Snail - Elephant: Large - Mouse: Small - Snail: Small |
完成輸入
「完成」輸入內容是指模型預期會完成的文字 繼續。
Some simple strategies for overcoming writer's block include 1. **Take a Break:** Step away from your writing for a bit. Go for a walk, listen to music, or do something else that helps you relax and clear your mind. When you come back to your writing, you may find that your thoughts are more organized and your ideas are flowing more easily. 2. **Change Your Environment:** Sometimes, a change of scenery can help spark creativity. Try writing in a different location, such as a coffee shop, a library, or a park. Being in a new environment can help you see things from a different perspective and break out of your writer's block. 3. **Freewrite or Brainstorm:** Set a timer for 10-15 minutes and just write whatever comes to mind, without worrying about grammar or spelling. This can help you get started and generate new ideas. You can also try brainstorming by writing down a list of words or phrases that are related to your topic. This can help you to free associate and come up with new ideas. 4. **Read or Research:** Sometimes, the best way to overcome writer's block is to read or research your topic. Reading can help you to learn new things and get inspired. Research can help you to gather information and facts that you can use in your writing. 5. **Talk to Someone:** Talk to a friend, family member, or writing partner about what you're struggling with. Sometimes, just talking about your ideas can help you to clarify them and see them from a new perspective. You can also ask for feedback and suggestions, which can help you to move forward with your writing. 6. **Try a Different Writing Style:** If you're stuck in a rut, try experimenting with a different writing style. For example, if you're used to writing formal essays, try writing a poem or a short story. Changing your writing style can help you to break out of your comfort zone and come up with new ideas. 7. **Set a Deadline:** Sometimes, the best way to overcome writer's block is to set a deadline for yourself. This can help you to focus and motivate yourself to finish your writing. When you know that you have a deadline, you're more likely to start writing and keep going until you're finished. |
背景資訊
情境可以是下列其中一項:
- 指定模型行為模式的指示。
- 模型使用或參照以產生回應的資訊。
需要提供資訊時,在提示中加入情境資訊 或是將回應範圍限制在 提示。
Marbles: Color: red Number: 12 Color: blue Number: 28 Color: yellow Number: 15 Color: green Number: 17 How many green marbles are there? There are 17 green marbles. |
範例
例如,您可以加入提示中的輸入/輸出組合 模擬理想的回覆範例包含範例 提示是自訂回應格式的有效策略
Classify the following. Options: - red wine - white wine Text: Chardonnay The answer is: white wine Text: Cabernet The answer is: red wine Text: Moscato The answer is: white wine Text: Riesling The answer is: white wine |
後續步驟
- 瞭解提示的設計後,不妨開始撰寫 輸入 Google AI Studio 的提示
- 如果想深入瞭解提示設計,請參閱 提示策略主題。
- 如要瞭解多模態提示,請參閱 使用媒體檔案發出提示。