การออกแบบพรอมต์คือกระบวนการสร้างพรอมต์ที่กระตุ้นให้เกิดการตอบสนองที่ต้องการจากโมเดลภาษา การเขียนพรอมต์ที่มีโครงสร้างที่ดีเป็นส่วนสำคัญในการรับรองคำตอบที่ถูกต้องและมีคุณภาพสูงจากโมเดลภาษา หน้านี้จะแนะนำแนวคิดพื้นฐาน กลยุทธ์ และแนวทางปฏิบัติแนะนำเพื่อให้คุณเริ่มออกแบบพรอมต์
ข้อความแจ้งคืออะไร
พรอมต์เป็นคำขอเป็นภาษาธรรมชาติที่ส่งไปยังโมเดลภาษาเพื่อรับการตอบกลับ พรอมต์อาจมีคำถาม วิธีการ ข้อมูลตามบริบท ตัวอย่าง และข้อมูลอินพุตบางส่วนเพื่อให้โมเดลเสร็จสมบูรณ์หรือดำเนินการต่อ หลังจากที่โมเดลได้รับข้อความแจ้ง ทั้งนี้ขึ้นอยู่กับประเภทของโมเดลที่ใช้ โมเดลจะสามารถสร้างข้อความ การฝัง โค้ด รูปภาพ วิดีโอ เพลง และอื่นๆ
ประเภทเนื้อหาของข้อความแจ้ง
พรอมต์อาจมีเนื้อหาประเภทต่อไปนี้อย่างน้อย 1 ประเภท
อินพุต
อินพุตคือข้อความในพรอมต์ที่คุณต้องการให้โมเดลตอบกลับ และเป็นประเภทเนื้อหาที่จำเป็น อินพุตอาจเป็นคำถามที่โมเดลตอบ (อินพุตคำถาม) งานที่โมเดลดำเนินการ (อินพุตงาน) เอนทิตีที่โมเดลดำเนินการ (อินพุตเอนทิตี) หรืออินพุตบางส่วนที่โมเดลดำเนินการหรือดำเนินการต่อ (อินพุตที่เสร็จสมบูรณ์)
ป้อนคำถาม
อินพุตคำถามคือคำถามที่คุณถามโมเดลที่โมเดลมีคำตอบ
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
- โปรดดูหัวข้อกลยุทธ์ข้อความแจ้งเพื่อทำความเข้าใจเกี่ยวกับการออกแบบพรอมต์ให้ลึกซึ้งยิ่งขึ้น
- ดูข้อมูลเกี่ยวกับข้อความแจ้งแบบหลายโมดัลได้ที่ข้อความแจ้งด้วยไฟล์สื่อ