אסטרטגיות לעיצוב הנחיות

בדף הזה נציג כמה אסטרטגיות כלליות לעיצוב הנחיות שאפשר להשתמש בהן כאשר לעיצוב הנחיות. אין דרך נכונה או שגויה לעצב הנחיה, אבל יש אסטרטגיות שבהן תוכלו להשתמש כדי להשפיע על התשובות של המודל. עדיין יש בדיקות והערכה קפדניות חיוני לאופטימיזציה של ביצועי המודל.

מודלים גדולים של שפה (LLM) מאומנים לפי כמות עצומה של נתוני טקסט כדי ללמוד את הדפוסים יחסים בין יחידות שפה. כשמזינים טקסט מסוים (ההנחיה), מודלי שפה יכולים הם יכולים לחזות מה צפוי לקרות, למשל כלי מתוחכם להשלמה אוטומטית. לכן, כאשר כשמתכננים הנחיות, חשוב להביא בחשבון את הגורמים השונים שיכולים להשפיע על החיזוי של המודל הבא.

לתת הוראות ברורות וספציפיות

מתן הוראות למודל שמסביר מה לעשות זו דרך יעילה ויעילה להתאים אישית את המודל או התנהגות המשתמשים. חשוב לוודא שההוראות ברורות וספציפיות. ההוראות יכולות להיות כך רשימת הוראות מפורטות או מורכבות כמו מיפוי חוויית המשתמש דפוס חשיבה.

הגדרת המשימה לביצוע

תארו בפירוט את המשימה שרוצים שהמודל יבצע. המשימה יכולה להיות רשימת הוראות מפורטות או מורכבות כמו מיפוי חוויית המשתמש והלך הרוח של המשתמש. ההנחיה הבאה מנחה את המודל לסכם קטע טקסט:

Summarize this text.
Text: A quantum computer exploits quantum mechanical phenomena to perform calculations exponentially
faster than any modern traditional computer. At very tiny scales, physical matter acts as both
particles and as waves, and quantum computing uses specialized hardware to leverage this behavior.
The operating principles of quantum devices is beyond the scope of classical physics. When deployed
at scale, quantum computers could be used in a wide variety of applications such as: in
cybersecurity to break existing encryption methods while helping researchers create new ones, in
meteorology to develop better weather forecasting etc. However, the current state of the art quantum
computers are still largely experimental and impractical.
  
Quantum computers utilize quantum mechanical phenomena to perform computations significantly faster
than traditional computers. By exploiting the particle-wave duality of matter at tiny scales,
quantum computers leverage specialized hardware to solve problems beyond classical physics.
Potential applications include breaking encryption, developing better weather forecasting, and more.
However, current quantum computers are still largely experimental and impractical.
  

ציון מגבלות

מגדירים מגבלות על קריאת ההנחיה או יצירת תשובה. אפשר לומר למודל מה לעשות ומה לא לעשות. מהדוגמה הקודמת, הסיכום קצר יותר מהמקור אבל אולי תרצו שהסיכום יהיה קצר יותר. במקרה הזה, אפשר לציין אילוץ ההנחיה לגבי משך הזמן הרצוי לסיכום:

Summarize this text in two sentences.
Text: A quantum computer exploits quantum mechanical phenomena to perform calculations exponentially
faster than any modern traditional computer. At very tiny scales, physical matter acts as both
particles and as waves, and quantum computing uses specialized hardware to leverage this behavior.
The operating principles of quantum devices is beyond the scope of classical physics. When deployed
at scale, quantum computers could be used in a wide variety of applications such as: in
cybersecurity to break existing encryption methods while helping researchers create new ones, in
meteorology to develop better weather forecasting etc. However, the current state of the art quantum
computers are still largely experimental and impractical.
    

Quantum computers use quantum mechanical phenomena to perform calculations much faster than
traditional computers. They have the potential to revolutionize various fields, but current quantum
computers are still experimental and impractical.
    

הגדרת הפורמט של התשובה

אפשר גם לספק הוראות שמציינות את פורמט התשובה. לדוגמה, אפשר לשאול שהתשובה תעוצב כטבלה, כרשימה עם תבליטים, כמצגת מכירות למעלית, כמילות מפתח, כמשפט או פסקה. ההנחיה הבאה מורה למודל לתת תבליטים של פרטי המפתח הטקסט:

Summarize this text as bullets points of key information.
Text: A quantum computer exploits quantum mechanical phenomena to perform calculations exponentially
faster than any modern traditional computer. At very tiny scales, physical matter acts as both
particles and as waves, and quantum computing uses specialized hardware to leverage this behavior.
The operating principles of quantum devices is beyond the scope of classical physics. When deployed
at scale, quantum computers could be used in a wide variety of applications such as: in
cybersecurity to break existing encryption methods while helping researchers create new ones, in
meteorology to develop better weather forecasting etc. However, the current state of the art quantum
computers are still largely experimental and impractical.
  
- Quantum computers leverage quantum mechanical phenomena for exponentially faster calculations than
  traditional computers.
- Quantum devices utilize specialized hardware to exploit tiny-scale matter behavior as both
  particles and waves.
- Their operating principles transcend classical physics.
- Potential applications include cybersecurity, weather forecasting, and more.
- Current quantum computers are largely experimental and impractical.
  

סיכום

  • נותנים למודלים הוראות שמסבירות מה לעשות.
  • חשוב שההוראות יהיו ברורות וספציפיות.
  • מציינים אילוצים או דרישות פורמט עבור הפלט.

הוספת דוגמאות עם כמה דוגמאות

אפשר לכלול דוגמאות בהנחיה שמראות איך המודל עובד כמו שצריך. מנסה לזהות דפוסים וקשרים מהדוגמאות וליישם אותם יצירת תגובה. להנחיות שיש בהן כמה דוגמאות נקראות כמה הנחיות few-shot, ואילו הנחיות שלא מספקות דוגמאות נקראות הנחיות מאפס. הנחיות עם כמה דוגמאות לרוב משתמשים בו כדי לווסת את הפורמט, הניסוח, ההיקף או הדפוס הכללי של התשובות במודל. להשתמש בדוגמאות ספציפיות ומגוונות כדי לעזור למודל לצמצם את המיקוד שלו וליצור תוצאות מדויקות יותר תוצאות.

תמיד מומלץ לכלול בהנחיות את הדוגמאות של כמה דוגמאות. הנחיות בלי כמה דוגמאות סביר להניח שדוגמאות יהיו פחות יעילות, כי הן מראות למודל איך ליישם הוראות. לחשבון אפשר להסיר הוראות מההנחיה אם הדוגמאות ברורות מספיק כמה משימות שצריך לבצע.

הנחיות מאפס לעומת כמה דוגמאות

ההנחיה הבאה מציגה אפס-דוגמאות מבקשת מהמודל לבחור את ההסבר הטוב ביותר.

Please choose the best explanation to the question:

Question: How is snow formed?
Explanation1: Snow is formed when water vapor in the air freezes into ice crystals in the
atmosphere, which can combine and grow into snowflakes as they fall through the atmosphere and
accumulate on the ground.
Explanation2: Water vapor freezes into ice crystals forming snow.
Answer:
  
Explanation1
  

אם התרחיש לדוגמה שלכם דורש שהמודל יפיק תשובות תמציתיות, תוכלו לכלול דוגמאות נותנים עדיפות לתשובות תמציתיות.

בהנחיה הבאה מוצגות שתי דוגמאות שמציגות העדפה להסברים הקצרים יותר. לחשבון את התשובה, אפשר לראות שהדוגמאות מנחים את המודל לבחור בהסבר הקצר יותר (הסברים2) בניגוד להסבר הארוך יותר (הסבר1) כמו שהסברנו קודם.

Please choose the best explanation to the question:

Question: Why is sky blue?
Explanation1: The sky appears blue because of Rayleigh scattering, which causes shorter blue
wavelengths of light to be scattered more easily than longer red wavelengths, making the sky look
blue.
Explanation2: Due to Rayleigh scattering effect.
Answer: Explanation2

Question: What is the cause of earthquakes?
Explanation1: Sudden release of energy in the Earth's crust.
Explanation2: Earthquakes happen when tectonic plates suddenly slip or break apart, causing a
release of energy that creates seismic waves that can shake the ground and cause damage.
Answer: Explanation1

Question: How is snow formed?
Explanation1: Snow is formed when water vapor in the air freezes into ice crystals in the
atmosphere, which can combine and grow into snowflakes as they fall through the atmosphere and
accumulate on the ground.
Explanation2: Water vapor freezes into ice crystals forming snow.
Answer:
  
Explanation2
  

מצאו את המספר האופטימלי של דוגמאות

תוכלו להתנסות במספר הדוגמאות שיספקו בהנחיה תוצאות. מודלים כמו PaLM ו-Gemini יכולים בדרך כלל לזהות דפוסים באמצעות כמה דוגמאות, אבל ייתכן שיהיה צורך להתנסות עם מספר הדוגמאות שיובילו לתוצאות הרצויות. למודלים פשוטים יותר כמו BERT, יכול להיות שתצטרכו עוד דוגמאות. במקביל, אם תכללו יותר מדי דוגמאות, המודל עשוי להתחיל ב- להחליף את התשובה לדוגמאות.

כדאי להשתמש בדוגמאות כדי להראות דפוסים במקום אנטי-דפוסים

עדיף להשתמש בדוגמאות כדי להראות למודל דפוס שצריך לעקוב אחריו מאשר להשתמש בדוגמאות כדי להראות למודל אנטי-דפוס שיש להימנע ממנו.

דפוס שלילי:

Don't end haikus with a question:
Haiku are fun
A short and simple poem
Don't you enjoy them?
  

דפוס חיובי:

Always end haikus with an assertion:
Haiku are fun
A short and simple poem
A joy to write
  

שימוש בפורמט עקבי בכל הדוגמאות

ודאו שהמבנה והפורמט של דוגמאות מכמה שוטים זהים כדי להימנע מתשובות. בפורמטים לא רצויים. אחת המטרות העיקריות של הוספת דוגמאות של כמה שוטים בהנחיות היא להראות למודל את פורמט התשובה. לכן חשוב לשמור על פורמט עקבי את כל הדוגמאות, במיוחד את תשומת הלב לתגי XML, רווחים לבנים, שורות חדשות ודוגמאות ומפצלים.

סיכום

  • הכללת דוגמאות לפרומפט-תשובות בהנחיה עוזרת למודל ללמוד איך להגיב.
  • תנו למודל דוגמאות של הדפוסים הבאים, במקום דוגמאות לדפוסים להימנע מהם.
  • כדאי להתנסות במספר ההנחיות להכללה. בהתאם למודל, מעט מדי דוגמאות לא יעיל בשינוי התנהגות של מודל. יותר מדי דוגמאות יכולות לגרום למודל לבצע שינויים יתר על המידה.
  • שימוש בפורמט עקבי בכל הדוגמאות

הוספת מידע לפי הקשר

תוכלו לכלול בהנחיות את ההנחיות והמידע שהמודל צריך כדי לפתור במקום להניח שהמודל כולל את כל המידע הנדרש. ההקשר עוזר למודל להבין את המגבלות והפרטים של מה שאתם מבקשים ממנו לעשות.

בדוגמה הבאה מוצגת בקשה מהמודל לספק הנחיות לפתרון בעיות בנתב:

What should I do to fix my disconnected wifi? The light on my Google Wifi router is yellow and
blinking slowly.
  
1. **Check the Cables:**
- Make sure that all cables are securely connected to your Google Wifi router and modem.
- Try replacing the cables with new ones to ensure they are not faulty.


2. **Reboot the Router:**
- Unplug your Google Wifi router and modem from the power outlet.
- Wait for at least 30 seconds.
- Plug the modem and router back in and wait for them to start up.


3. **Factory Reset the Router:**
- Resetting the router will restore it to its default settings.
- Find the small reset button on the back of the router.
- Press and hold the reset button with a paper clip or similar object for 10 seconds.
- Release the button and wait for the router to restart.


4. **Check Your Internet Connection:**
- Use a wired connection to connect a device directly to your modem.
- If the internet works, the issue may be with your router.
- If the internet still doesn't work, contact your Internet Service Provider (ISP).


5. **Update Router's Firmware:**
- Check if there is a firmware update available for your Google Wifi router.
- Download and install the latest firmware update from the Google Wifi app.


6. **Interference and Obstacles:**
- Make sure the router is not near electronic devices that can cause interference, like microwaves or cordless phones.
- Remove any obstacles between the router and your devices, such as furniture or thick walls.


7. **Change Wi-Fi Channel:**
- In the Google Wifi app, go to Settings > Network & General > Advanced Networking.
- Try changing the Wi-Fi channel to a less congested one.


8. **Contact Google Support:**
- If you've tried the above steps and the issue persists, contact Google support for further assistance.
  

התגובה נראית כמו מידע כללי לפתרון בעיות שאינו ספציפי לנתב או הסטטוס של נוריות ה-LED.

כדי להתאים אישית את התשובה לנתב הספציפי, אפשר להוסיף להנחיות של הנתב המדריך לפתרון בעיות בתור הקשר שאליו צריך להתייחס בעת מתן תשובה.

Answer the question using the text below. Respond with only the text provided.
Question: What should I do to fix my disconnected wifi? The light on my Google Wifi router is yellow and blinking slowly.

Text:
Color: Slowly pulsing yellow
What it means: There is a network error.
What to do:
Check that the Ethernet cable is connected to both your router and your modem and both devices are turned on. You might need to unplug and plug in each device again.

Color: Fast blinking yellow
What it means: You are holding down the reset button and are factory resetting this device.
What to do:
If you keep holding down the reset button, after about 12 seconds, the light will turn solid yellow. Once it is solid yellow, let go of the factory reset button.

Color: Solid yellow
What it means: Router is factory resetting.
What to do:
This can take up to 10 minutes. When it's done, the device will reset itself and start pulsing white, letting you know it's ready for setup.

Color: Solid red
What it means: Something is wrong.
What to do:
Critical failure. Factory reset the router. If the light stays red, contact Wifi customer support.
  
Check that the Ethernet cable is connected to both your router and your modem and both devices are turned on. You might need to unplug and plug in each device again.
  

סיכום

  • כוללים מידע (הקשר) בהנחיה שבה רוצים שהמודל ישתמש כדי ליצור תשובה.
  • נותנים למודל הוראות לשימוש במידע לפי ההקשר.

הוספת תחיליות

קידומת היא מילה או ביטוי שמוסיפים לתוכן ההנחיה ויכולה לשרת כמה מטרות, בהתאם למיקום שבו מוסיפים את הקידומת:

  • קידומת לקלט: הוספת קידומת לאותות הקלט בעלי משמעות סמנטית של הקלט למודל. לדוגמה, הקידומות "אנגלית:" וגם 'צרפתית': לסמן שתיים בשפות שונות.
  • קידומת פלט: אף על פי שהפלט נוצר על ידי המודל, אפשר להוסיף תחילית לפלט בהנחיה. קידומת הפלט מספקת למודל מידע על מצופה כתגובה. לדוגמה, קידומת הפלט "JSON: " אותות למודל הפלט צריך להיות בפורמט JSON.
  • קידומת לדוגמה: בהנחיות עם כמה שוטים, הוספת קידומות לדוגמאות מאפשרת תוויות שהמודל יכול להשתמש בהן במהלך יצירת הפלט, וכך קל יותר לנתח את הפלט תוכן.

בדוגמה הבאה, 'Text' (טקסט): היא קידומת הקלט "התשובה היא:" הוא הפלט .

Classify the text as one of the following categories.
- large
- small
Text: Rhino
The answer is: large
Text: Mouse
The answer is: small
Text: Snail
The answer is: small
Text: Elephant
The answer is:
  
large
  

לאפשר למודל להשלים קלט חלקי

מודלים גנרטיביים של שפה פועלים כמו כלי מתקדם של השלמה אוטומטית. אם מציינים חלק התוכן, המודל יכול לספק את שאר התוכן או מה שלדעתו הוא המשך של התוכן הזה תוכן כתגובה. לצורך כך, אם כוללים דוגמאות או הקשר, המודל את הדוגמאות או ההקשרים האלה בחשבון.

בדוגמה הבאה מוצגת הנחיה עם הוראה וקלט ישות:

For the given order, return a JSON object that has the fields cheeseburger, hamburger, fries, or
drink, with the value being the quantity.

Order: A burger and a drink.
  
```
{
"cheeseburger": 0,
"hamburger": 1,
"fries": 0,
"drink": 1
}
```
  

למרות שהמודל ביצע לפי ההנחיה, לפעמים כתיבת ההוראות בשפה טבעית עשויה הוא מאתגר, והוא משאיר הרבה לפרשנות של המודל. לדוגמה, תפריט של מסעדות מכיל פריטים רבים. כדי להקטין את הגודל של תגובת ה-JSON, כדאי להשמיט את הפריטים לא הוזמנו. במקרה הזה, אפשר לתת דוגמה וקידומת לתשובה ולאפשר למודל משלימים אותה:

Valid fields are cheeseburger, hamburger, fries, and drink.
Order: Give me a cheeseburger and fries
Output:
```
{
  "cheeseburger": 1,
  "fries": 1
}
```
Order: I want two burgers, a drink, and fries.
Output:
  
```
{
"hamburger": 2,
"drink": 1,
"fries": 1
}
```
  

שימו לב איך 'צ'יזבורגר' לא נכלל בפלט כי הוא לא היה חלק מההזמנה.

מבקשים מהמודל לעצב את התשובה שלו

אסטרטגיית ההשלמה יכולה גם לעזור לעצב את התשובה. בדוגמה הבאה מוצגת כדי ליצור תיאור כללי של מאמר:

Create an outline for an essay about hummingbirds.
  
I. Introduction
A. Hook: Begin with an intriguing fact or description of hummingbirds.
B. Provide some background information on hummingbirds.
1. Mention their small size and long, thin beaks.
2. Highlight their unique ability to hover and fly backward.

II. Body
A. Anatomy and Physiology
1. Elaborate on their tiny size, making comparisons to other animals.
2. Describe their wings and how they enable hovering and swift flight.
3. Discuss their metabolism and energy requirements, emphasizing their caloric needs.

B. Feeding Habits and Diet
1. Explain their primary food source, nectar, and how they extract it from flowers.
2. Describe their ability to feed from a wide variety of flowers.
3. Mention their consumption of insects and the nutritional value they provide.

C. Migration Patterns
1. Discuss the incredible long-distance migrations of some hummingbird species.
2. Explain the phenomenon of seasonal migration and the environmental factors driving it.
3. Describe the routes taken by different species during migration.

D. Conservation and Threats
1. Highlight the importance of hummingbirds in ecosystems as pollinators.
2. Discuss the challenges and threats they face, such as habitat loss, nectar scarcity, and climate change.
3. Mention conservation efforts and ways to support hummingbird populations.

III. Conclusion
A. Summarize the main points covered in the essay.
B. Reinforce the importance of hummingbirds and their ecological role.
C. Provide a final thought or call to action to protect these fascinating creatures.
  

בהנחיה לא צוין הפורמט של המתאר והמודל בחר בשבילך פורמט. כדי לקבל את המודל כדי להחזיר קווי מתאר בפורמט מסוים, אפשר להוסיף טקסט שמייצג את את המתאר ולאפשר למודל להשלים אותו בהתאם לדפוס שהתחלתם.

Create an outline for an essay about hummingbirds.
I. Introduction
   *
  
I. Introduction
* Capture the reader's attention with an interesting anecdote or fact about hummingbirds.
* Provide a brief background on hummingbirds, including their unique characteristics.
* State the main points that will be covered in the essay.

II. The Unique Characteristics of Hummingbirds
* Discuss the hummingbird's exceptionally rapid wing-beat, allowing them to hover and fly backward.
* Highlight their tiny size, making them the smallest birds in the world.
* Describe their long, slender beaks and tongues, allowing them to reach deep into flowers to extract nectar.
* Explain their iridescent plumage, which creates brilliant and vibrant colors.

III. Hummingbird Migration and Distribution
* Discuss the extensive migration patterns of hummingbirds, covering vast distances across continents.
* Describe the different habitats where hummingbirds can be found, including tropical rainforests, deserts, and urban areas.
* Explain the seasonal changes that influence hummingbird migration and habitat selection.

IV. Hummingbird Diet and Feeding Habits
* Focus on the hummingbird's primary food source, which is nectar from flowers.
* Describe their ability to consume insects, spiders, and other small invertebrates for protein.
* Explain how hummingbirds use their long, slender tongues to extract nectar from flowers.
* Discuss the importance of flowering plants in providing sustenance for hummingbirds.

V. Reproduction and Nesting Behavior
* Describe the mating rituals and courtship behavior of hummingbirds.
* Explain the process of nest-building, including the materials used and the unique characteristics of hummingbird nests.
* Discuss the role of the female hummingbird in laying and incubating eggs.
* Describe the development of hummingbird chicks and the role of both parents in providing care.

VI. Threats to Hummingbirds and Conservation Efforts
* Highlight habitat loss, climate change, and deforestation as significant threats to hummingbird populations.
* Describe the role of habitat conservation initiatives in protecting hummingbird habitats.
* Explain the importance of creating hummingbird-friendly gardens and landscapes.
* Discuss the efforts of organizations and individuals working to conserve hummingbird populations.

VII. Conclusion
* Summarize the main points covered in the essay, emphasizing the unique characteristics, migration patterns, diet, reproduction, and conservation of hummingbirds.
* Provide a closing statement that leaves a lasting impression on the reader and reinforces the significance of these fascinating creatures.
  

סיכום

  • אם נותנים למודל קלט חלקי, המודל משלים את הקלט הזה על סמך כל דוגמאות או הקשר בהנחיה.
  • לפעמים קל יותר לקבל מהמודל קלט מאשר לתאר את המשימה בשפת היעד.
  • אם מוסיפים תשובה חלקית להנחיה, המודל מתחיל לפעול לפי הדפוס הרצוי או הפורמט.

פירוק הנחיות לרכיבים פשוטים

בתרחישים לדוגמה שדורשים הנחיות מורכבות, אפשר לעזור למודל לנהל את המורכבות הזו על ידי: מפרק דברים לרכיבים פשוטים יותר.

הוראות מפורטות

במקום להכיל הרבה הוראות בהנחיה אחת, כדאי ליצור הנחיה אחת לכל הוראה. אפשר כדי לבחור איזה פרומפט לעבד על סמך הקלט של המשתמש.

הנחיות שרשרת

במשימות מורכבות שכוללות כמה שלבים רציפים, צריך להפוך כל שלב להנחיה ולשרשר את הקוד הנחיות ביחד ברצף. בשרשרת ההנחיות הרציפה הזו, הפלט של הנחיה אחת הופך לקלט של ההנחיה הבאה. הפלט של ההנחיה האחרונה ברצף הוא הפלט הסופי.

תשובות מצטברות

צבירת נתונים היא כשרוצים לבצע משימות מקבילות שונות בחלקים שונים של ולצבור את התוצאות כדי להפיק את הפלט הסופי. לדוגמה, אפשר להנחות את המודל לבצע פעולה אחת בחלק הראשון של הנתונים, לבצע פעולה נוספת על שאר הנתונים ונתונים מצטברים על התוצאות.

סיכום

  • פרקו הוראות מורכבות להנחיה לכל הוראה, והחליטו איזו הנחיה יחולו על סמך הקלט מהמשתמש.
  • צריך לפצל כמה שלבים רציפים להנחיות נפרדות ולשרשר אותם, כך שהפלט בהנחיה הקודמת, הופך לקלט של ההנחיה הבאה.
  • תוכלו לחלק משימות מקבילות ולצבור את התשובות כדי להפיק את הפלט הסופי.

ניסוי עם ערכי פרמטרים שונים

כל קריאה שאתם שולחים למודל כוללת ערכי פרמטרים שקובעים איך המודל יוצר תשובה. המודל יכול ליצור תוצאות שונות לערכי פרמטרים שונים. ניסוי ערכי פרמטרים שונים כדי לקבל את הערכים הטובים ביותר למשימה. הפרמטרים הזמינים עבור עשויים להיות הבדלים בין מודלים שונים. הפרמטרים הנפוצים ביותר הם:

  • אסימוני פלט מקסימלי
  • טמפרטורה
  • למעלה מ-K
  • ראשון

אסימוני פלט מקסימלי

המספר המקסימלי של אסימונים שאפשר ליצור בתשובה. אסימון הוא כארבעה תווים. 100 אסימונים מקבילים לכ-20 מילים.

אפשר להגדיר ערך נמוך יותר לתשובות קצרות יותר וערך גבוה יותר לתשובות ארוכות יותר. תשובות מדויקות.

טמפרטורה

הטמפרטורה משמשת לדגימה במהלך יצירת התגובה, שמתרחשת כשמחילים את העמודות topP ו-topK. אמצעי בקרה לטמפרטורה רמת הרנדומיזציה בבחירת האסימון. טמפרטורות נמוכות יותר מתאימות ל הנחיות שמחייבות שימוש דטרמיניסטי יותר ופחות יצירתי או פתוח תגובה, בעוד שטמפרטורות גבוהות יותר יכולות להוביל למגוון או ליצירתיות יותר תוצאות. טמפרטורה של 0 היא דטרמיניסטית, כלומר תמיד נבחרת התגובה עם הסבירות הגבוהה ביותר.

ברוב תרחישי השימוש, כדאי להתחיל בטמפרטורה של 0.2. אם המיקום שהמודל מחזיר תשובה כללית מדי או קצרה מדי, או שהמודל תשובה חלופית. יש לנסות להעלות את הטמפרטורה.

למעלה מ-K

ה-Top-K משנה את האופן שבו המודל בוחר אסימונים לפלט. ב-100 מעלות המשמעות של 1 היא שהאסימון הבא שנבחר הוא בעלי הסבירות הגבוהה ביותר באוצר המילים של המודל (נקרא גם פענוח באמצעות אלגוריתם חמדן), המשמעות של 3 היא שהאסימון הבא נבחר אסימונים בעלי סבירות גבוהה באמצעות הטמפרטורה.

בכל שלב של בחירת אסימונים, K האסימונים המובילים עם ההסתברויות נדגמות. לאחר מכן האסימונים מסוננים נוספים על סמך P מאפשר האסימון הסופי שנבחר באמצעות דגימת טמפרטורה.

מציינים ערך נמוך יותר לתשובות אקראיות פחות וערך גבוה יותר עבור יותר בתשובות אקראיות. ערך ברירת המחדל של הערכים המובילים הוא 40.

ראשון

ההיבט העליון (P) משנה את האופן שבו המודל בוחר אסימונים לפלט. נבחרו אסימונים מהגבוה לנמוך (ראו למעלה-K) לסבירות הנמוכה ביותר עד סכום ההסתברויות שלהם שווה לערך P. לדוגמה, אם לאסימונים A, B ו-C יש הסתברות של 0.3, 0.2 ו-0.1 והערך P הוא 0.5, אז המודל בוחרים את A או B כאסימון הבא באמצעות הטמפרטורה, ולא כוללים את C. מועמד או מועמדת.

מציינים ערך נמוך יותר לתשובות אקראיות פחות וערך גבוה יותר עבור יותר בתשובות אקראיות. ערך ברירת המחדל העליון (P) הוא 0.95.

אסטרטגיות של חזרה על הצעה לפעולה

עיצוב פרומפטים הוא תהליך איטרטיבי שלרוב דורש כמה חזרות לפני שמקבלים את התשובה הרצויה באופן עקבי. בקטע הזה מפורטות הנחיות לגבי כמה דברים שאפשר לנסות שעברתם על ההנחיות שלכם.

שימוש בניסוח שונה

כשמשתמשים במילים שונות או בניסוחים שונים בהנחיות, בדרך כלל מקבלים תשובות שונות מהמודל למרות שהמשמעות של כולן זהה. אם אתם לא מקבלים את התוצאות הצפויות תנסו לנסח אותה בצורה שונה.

Version 1:
How do I bake a pie?

Version 2:
Suggest a recipe for a pie.

Version 3:
What's a good pie recipe?
  

מעבר למשימה מקבילה

אם אתם לא מצליחים לגרום למודל לבצע את ההוראות לביצוע משימה, נסו לתת לו הוראות משימה מקבילה שמשיגה את אותה התוצאה.

ההנחיה הזו מנחה את המודל לסווג ספר באמצעות קטגוריות מוגדרות מראש.

Which category does The Odyssey belong to:
thriller
sci-fi
mythology
biography
  
The answer: mythology

Explanations:

The Odyssey is an epic poem in ancient Greek literature. It is one of two major ancient Greek epic
poems attributed to Homer. The Odyssey is an epic poem that tells the story of Odysseus, a Greek
hero who fought in the Trojan War and then spent ten years trying to return home to Ithaca. The
Odyssey is a work of mythology.
  

התשובה נכונה, אבל המודל לא עמד בגבולות האפשרויות. בנוסף, כי אני רוצה שהמודל יענה רק עם אחת מהאפשרויות, ולא רק במשפט מלא. במקרה הזה, אפשר לנסח מחדש את ההוראות כשאלה אמריקאית ולבקש מהמודל לבחור כאפשרות.

Multiple choice problem: Which of the following options describes the book The Odyssey?
Options:
- thriller
- sci-fi
- mythology
- biography
  
The answer is: mythology
  

שינוי הסדר של תוכן ההנחיות

לפעמים, הסדר של התוכן בהנחיה יכול להשפיע על התשובה. אפשר לנסות לשנות את סדר התוכן ולראות איך זה משפיע על התשובה.

Version 1:
[examples]
[context]
[input]

Version 2:
[input]
[examples]
[context]

Version 3:
[examples]
[input]
[context]

תשובות חלופיות

תגובה חלופית היא תשובה שהמודל מחזיר כשההנחיה או התשובה מפעיל מסנן בטיחות. דוגמה לתשובה חלופית היא "אין לי אפשרות לעזור בעניין הזה, כי אני רק מודל שפה".

אם המודל משיב כתשובה חלופית, כדאי לנסות להעלות את הטמפרטורה.

דברים שיש להימנע מהם

  • לא להסתמך על מודלים כדי ליצור מידע עובדתי.
  • צריך להפעיל שיקול דעת כשמשתמשים בבעיות מתמטיות ולוגיות.

השלבים הבאים