استراتيجيات التصميم الفوري

تقدم لك هذه الصفحة بعض الاستراتيجيات العامة لتصميم الطلبات التي يمكنك استخدامها عند تصميم المطالبات. على الرغم من عدم وجود طريقة صحيحة أو خاطئة لتصميم مطالبة، إلا أن هناك استراتيجيات شائعة يمكنك استخدامها للتأثير على ردود النموذج. ويظل الاختبار والتقييم الصارم مهمين لتحسين أداء النموذج.

ويتمّ تدريب النماذج اللغوية الكبيرة (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.
  

ملخّص

  • قدِّم للنماذج تعليمات بشأن ما يجب تنفيذه.
  • اجعل التعليمات واضحة ومحددة.
  • حدِّد أي قيود أو متطلبات تنسيق للمخرجات.

قم بتضمين أمثلة قليلة

يمكنك تضمين أمثلة في الطلب تعرض النموذج الصحيح. يحاول النموذج تحديد الأنماط والعلاقات من الأمثلة وتطبيقها عند إنشاء رد. تُسمى الطلبات التي تحتوي على بعض الأمثلة طلبات لقطات قليلة، بينما الطلبات التي لا تقدّم أي أمثلة تُسمى طلبات اللقطات الثابتة. غالبًا ما يتم استخدام المطالبات ذات اللقطات القليلة لتنظيم تنسيق استجابات النموذج أو صياغتها أو تحديد نطاقها أو النمط العام لها. استخدِم أمثلة محدّدة ومتنوعة لمساعدة النموذج في تضييق نطاق تركيزه والحصول على نتائج أكثر دقة.

ننصحك دائمًا بتضمين أمثلة قليلة في طلباتك. من المحتمل أن تكون المطالبات التي لا تحتوي على أمثلة قليلة فعالة، لأنها توضح للنموذج كيفية تطبيق التعليمات. في الواقع، يمكنك إزالة التعليمات من طلبك إذا كانت الأمثلة لديك واضحة بما فيه الكفاية في عرض المهمة المطروحة.

الطلبات التي تستخدم لقطات سريعة مقابل الصور المصغّرة

يطلب الطلب التالي الذي يستخدم نقطة انعدام من النموذج اختيار أفضل تفسير.

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
  

إذا كانت حالة الاستخدام تتطلب استخدام النموذج لإنتاج ردود مختصرة، يمكنك تضمين أمثلة في الطلب تعطي الأولوية للردود الموجزة.

يقدم الطلب التالي مثالين يوضحان الأفضلية للتفسيرات الأقصر. في الرد، يمكنك أن ترى أن الأمثلة وجّهت النموذج لاختيار التفسير الأقصر (Explanation2) بدلاً من الشرح الأطول (Explanation1) كما كان في السابق.

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.
  

ملخّص

  • إذا قدّمت بيانات جزئية للنموذج، سيكمل النموذج ذلك الإدخال استنادًا إلى أي أمثلة متوفرة أو سياق في الطلب.
  • قد يكون أحيانًا إكمال النموذج للإدخال أسهل من وصف المهمة بلغة طبيعية.
  • يمكن أن تؤدي إضافة إجابة جزئية إلى الطلب إلى توجيه النموذج لاتّباع النمط أو التنسيق المطلوبَين.

تقسيم المطالبات إلى مكونات بسيطة

في حالات الاستخدام التي تتطلّب مطالبات معقدة، يمكنك مساعدة النموذج في إدارة هذا التعقيد عن طريق تقسيم الأشياء إلى مكونات أبسط.

تعليمات التقسيم

بدلاً من الحصول على العديد من التعليمات في طلب واحد، يمكنك إنشاء طلب واحد لكل تعليمات. يمكنك اختيار المطالبة التي تريد معالجتها بناءً على إدخال المستخدم.

الطلبات الخاصة بالسلاسل

بالنسبة إلى المهام المعقدة التي تتضمن خطوات متسلسلة متعددة، اجعل كل خطوة مطالبة وسلسلة المطالبات معًا في تسلسل. في السلسلة التسلسلية من الطلبات، يصبح ناتج طلب واحد في التسلسل إدخال الطلب التالي. ناتج المطالبة الأخيرة في التسلسل هو الإخراج النهائي.

الردود المجمّعة

التجميع هو عندما تريد أداء مهام متوازية مختلفة على أجزاء مختلفة من البيانات وتجميع النتائج لإنتاج المخرجات النهائية. على سبيل المثال، يمكنك أن تطلب من النموذج إجراء عملية واحدة على الجزء الأول من البيانات، وإجراء عملية أخرى على بقية البيانات وتجميع النتائج.

ملخّص

  • قسِّم التعليمات المعقّدة إلى طلب لكل تعليمات وحدِّد الطلب الذي تريد تطبيقه استنادًا إلى ملاحظات المستخدم.
  • قسِّم عدة خطوات تسلسلية إلى طلبات منفصلة، ورتِّبها في سلسلة لكي تصبح النتيجة في الطلب السابق مُدخلًا للطلب التالي.
  • قم بتقسيم المهام المتوازية وتجميع الردود لإنتاج المخرجات النهائية.

تجربة قيم معلَمات مختلفة

يتضمن كل طلب ترسله إلى أحد النماذج قيم معلَمات تتحكم في كيفية إنشاء النموذج للاستجابة. يمكن أن ينتج عن النموذج نتائج مختلفة لقيم المعلمات المختلفة. جرّب قيم معلمات مختلفة للحصول على أفضل القيم للمهمة. قد تختلف المعلمات المتاحة للنماذج المختلفة. في ما يلي المعلمات الأكثر شيوعًا:

  • الحد الأقصى من الرموز المميّزة للإخراج
  • درجة الحرارة
  • أعلى ك
  • أعلى نقطة

الحد الأقصى من الرموز المميّزة للإخراج

الحدّ الأقصى لعدد الرموز المميّزة التي يمكن إنشاؤها في الردّ الرمز المميز هو ما يقرب من أربعة أحرف. يتوافق 100 رمز مميز مع ما يقرب من 60-80 كلمة.

حدد قيمة أقل للردود الأقصر وقيمة أعلى للردود الأطول.

درجة الحرارة

تُستخدم درجة الحرارة في أخذ العيّنات أثناء إنشاء الاستجابة، ويحدث ذلك عند تطبيق السمتَين topP وtopK. تتحكم درجة الحرارة في درجة العشوائية في اختيار الرمز المميز. تتناسب درجات الحرارة المنخفضة مع الطلبات التي تتطلب استجابة أكثر حتمية وأقل مفتوحة أو إبداعية، في حين أن درجات الحرارة الأعلى يمكن أن تؤدي إلى نتائج أكثر تنوعًا أو إبداعًا. درجة الحرارة 0 مؤكدة، مما يعني أنه يتم دائمًا اختيار الاستجابة الأعلى للاحتمالية.

في معظم حالات الاستخدام، جرِّب البدء بدرجة حرارة تبلغ 0.2. إذا عرض النموذج استجابة عامة جدًا أو قصيرة جدًا أو إذا كان النموذج يقدّم استجابة احتياطية، حاوِل زيادة درجة الحرارة.

أعلى ك

يغير Top-K كيفية اختيار النموذج للرموز المميزة للمخرجات. يعني حرف 1 الأول أن الرمز المميّز التالي هو الأكثر احتمالاً من بين جميع الرموز المميّزة في مفردات النموذج (وهو ما يُسمّى أيضًا فك الترميز الجشعين)، في حين تعني القيمة الأعلى من 3 أنّه يتم اختيار الرمز المميّز التالي من بين أكثر ثلاثة رموز محتمَلة عن طريق استخدام درجة الحرارة.

لكل خطوة من خطوات اختيار الرمز المميّز، يتم أخذ عيّنات من أفضل K من الرموز المميّزة ذات الاحتمالات الأعلى. ثم تتم تصفية الرموز المميزة بناءً على الجزء العلوي P مع تحديد الرمز المميز النهائي باستخدام عينات درجة الحرارة.

قم بتحديد قيمة أقل للردود العشوائية الأقل وقيمة أعلى للردود العشوائية الأكثر. الحد الأقصى التلقائي لمتوسط التصنيف هو 40.

أعلى نقطة

يغير الجزء العلوي من الصفحة كيفية تحديد النموذج للرموز المميزة للمخرجات. يتم اختيار الرموز المميزة من الأكثر (انظر أعلى K) إلى الأقل احتمالاً إلى أن يساوي مجموع احتمالاتها قيمة P العليا. على سبيل المثال، إذا كانت الرموز المميزة A وB وC لها احتمال 0.3 و0.2 و0.1 وكانت قيمة P هي 0.5، سيختار النموذج A أو B كرمز مميّز تالي باستخدام درجة الحرارة ويستبعد C كمرشّح.

قم بتحديد قيمة أقل للردود العشوائية الأقل وقيمة أعلى للردود العشوائية الأكثر. القيمة التلقائية لأعلى مستوى أرباح هي 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]

الردود الاحتياطية

الاستجابة الاحتياطية هي استجابة يعرضها النموذج عندما يؤدّي الطلب أو الردّ إلى تفعيل فلتر السلامة. مثال على الرد الاحتياطي هو "لا يمكنني المساعدة في ذلك، لأنني مجرد نموذج لغوي".

إذا كان النموذج يستجيب باستجابة احتياطية، جرِّب زيادة درجة الحرارة.

أمور يجب تجنّبها

  • تجنَّب الاعتماد على النماذج لإنشاء معلومات وقائعية.
  • يجب استخدامها بعناية في المسائل الرياضية وعلم المنطق.

الخطوات التالية