בדף הזה נסביר על פתיחים מותאמים אישית ואיך כותבים פתיחים כדי לשפר את איכות התשובות שמתקבלות מ-Answer API.
ההקדמה מגדירה את ההקשר והציפיות הראשוניים של מודל ה-LLM לפני שהוא מעבד את מסמך הקלט. ההקדמה משפיעה על איכות הסיכומים שנוצרים. יש פתיח שמוגדר כברירת מחדל, והוא מופיע בכל פעם שמפעילים את השיטה answer. עם זאת, אתם יכולים לציין הקדמה משלכם במקום להשתמש בהקדמה שמוגדרת כברירת מחדל.
הוראות לאופן ציון ההקדמה בהפעלת method של התשובה מפורטות במאמר ציון הקדמה בהתאמה אישית.
לדוגמה, אפשר להשתמש במבוא כדי:
מציינים מילים שהמודל יכול להשתמש בהן ומילים שהוא לא יכול להשתמש בהן.
מציינים נושאים שהמודל יתמקד בהם או יימנע מהם.
מציינים את הסגנון, הטון והפורמט של התשובה.
התאמה אישית של ההקדמה יכולה לשפר משמעותית את איכות הסיכומים.
ההקדמה צריכה לכלול שני חלקים:
תיאור המשימה שמתאר את המשימה שמבקשים מ-LLM לבצע. דוגמאות לתיאורי משימות
הוראות נוספות שה-LLM צריך לפעול לפיהן. דוגמאות וטיפים להוראות נוספות
דוגמאות לתיאורי משימות
ריכזנו כאן כמה דוגמאות לתיאורי משימות. התרחיש הוא שהעובדים שלכם רוצים לקבל תשובות ממאגר נתונים שמכיל הרבה מסמכים של החברה.
דוגמה 1
תיאור המשימה לציטוט מקיף של מקורות:
Given a user query and a list of sources, write a response that cites individual
sources as comprehensively as possible.
דוגמה 2
תיאור המשימה כדי להבין את המשתמש ולהתמקד במתן עזרה:
You are an enterprise LLM summarization tool. Your task is to understand the
true intent of a user question in the context of enterprise search and
summarization, and provide a helpful answer to the user's question.
דוגמה 3
תיאור המשימה לסיכום שיחה בין לקוח לבין עוזר דיגיטלי:
Given the conversation between a customer and a helpful assistant with some
search results, create a final answer for the assistant.
דוגמאות וטיפים להוראות נוספות
ההוראות הנוספות צריכות לכלול את הדרישות הספציפיות שלכם לגבי המפתח.
בטבלה הבאה מופיעות דוגמאות להוראות נוספות שאפשר לספק אחרי תיאור המשימה, סוג הבעיות שכל דוגמה פותרת והסבר למה הפתיח פותר את הבעיה.
| הבעיה שצריך לפתור | פתרון | דוגמאות |
|---|---|---|
| התשובות צריכות להיות מותאמות יותר לצרכים העסקיים | כדאי לספק הקשר והוראות נוספים כדי לוודא שהסיכום מותאם לתרחיש השימוש הספציפי ולקהל היעד. |
דוגמה 1
Utilize the specific context of the workspace (e.g. meeting notes, public
guidance, FAQ) to provide more accurate and relevant summaries.
דוגמה 2
Summarize customer feedback, focusing on their pain points, feature
request and overall satisfaction. Highlight any actionable insights that
can help improve our product or service.
דוגמה 3
For input documents of troubleshooting website, please summary the
problem statement, step-by-step solutions and any relevant tips or
warnings.
דוגמה 4
"XYZ" is an internal forum for engineers to discuss technical problems,
you can use it to summarize technical issues, proposed solutions and any
unresolved challenges or next steps identified in the discussion.
|
| התשובה צריכה להיות בסגנון מסוים | צריך לציין בבירור את הסגנון או הטון ואת קהל היעד. |
דוגמה 1
Summarize troubleshooting guide for customer support agent in a clear and
concise manner. The summary should be easy for a non-technical user to
understand.
דוגמה 2
Summarize the technical documents for engineers. Focus on the core
functionality, system architecture, and potential challenges.
|
| התשובה צריכה להיות בפורמט מסוים | ציון פורמט הפלט |
דוגמה 1
Use bullet points for steps, numbered lists for rankings, tables for
comparisons, code block for coding example
דוגמה 2
Summarize the key takeaways in a numbered lists
|
| התשובה צריכה להיות קצרה | מנחים את ה-LLM באופן מפורש ליצור סיכומים "תמציתיים" או "קצרים". אפשר גם לציין את מספר המילים או המשפטים, אם רלוונטי. |
דוגמה 1
Please keep summaries concise and focused, providing only the most
essential information to address the user's query.
דוגמה 2
The answer should be less than 200 words.
|
| התשובה צריכה להיות מקיפה יותר | מעודדים את מודל ה-LLM לכלול פרטים חשובים ונקודות מרכזיות. |
דוגמה
Please ensure key details are included.
|
| הכללה של נושאים אסורים | הגדרת אופן התגובה של המודל במצבים מסוימים. |
דוגמה
For political questions, the most helpful way is to politely refuse to
answer the question.
|
| הפחתת הזיות (מידע שגוי) | להדגיש את החשיבות של דיוק ולהנחות את מודל ה-LLM לפעול בהתאם למידע שמוצג בטקסט. |
דוגמה 1
Keep the summary accurate, ensuring all claims are verifiable within the given context.
דוגמה 2
Use exact words from the context if possible.
|
דוגמאות לפרמבולה מלאה
הנה עוד כמה דוגמאות לפרמבולה מלאה, שמורכבת מתיאור המשימה וההוראות הנוספות.
דוגמה 1
תבקש סיכום תמציתי, מדויק ורלוונטי, ותציג אותו בפורמט ידידותי למשתמש.
You are an enterprise LLM summarization tool. Your task is to understand the
true intent of a user question in the context of enterprise search and
summarization, and provide a helpful answer to the user's question. Please keep
summaries concise and focused, providing only the most essential information to
address the user's query.
Please also structure and format the summary by
1) prioritize most relevant and accurate information to user's question
2) highlight critical information
3) structure the response and adapt the formatting to be user friendly (e.g.,
use bullet points for steps, numbered lists for rankings, tables for
comparisons, code block for coding example, etc).
דוגמה 2
תספק תשובה סופית תמציתית, ידידותית ומועילה לשאילתת לקוח על סמך שיחה.
Given the conversation between a customer and a helpful assistant with some
search results, create a final answer for the assistant.
The answer should addresses the query accurately and concisely (less than 10
sentences), while also being friendly and helpful. If the search results don't
provide enough information to fully answer the question, suggest additional
resources or steps the customer can take.
דוגמה 3
לספק תשובות מקיפות ומובנות ולצטט את המקורות שצוינו. מסרבים בנימוס לענות על שאלות פוליטיות.
Given a user query and a list of sources, write a response that cites individual
sources as comprehensively as possible.
The response should be suitable for a non-expert audience.
For political questions, the response should be a polite refusal to answer the
question.
שיטות מומלצות
ריכזנו כאן כמה שיטות מומלצות לכתיבה ולשיפור של פתיח:
שיפור איטרטיבי: כדאי להתנסות בגרסאות שונות של פתיח ולבחון את ההשפעה על איכות התשובה.
משוב מהמשתמשים: כדאי לאסוף משוב מהמשתמשים כדי לזהות בעיות שחוזרות על עצמן ותחומים שצריך לשפר.
התעדכנות: היעילות של שינוי ההגדרות המקדימות יכולה להשתנות בהתאם לגרסת המודל ולסוג המסמכים. כדי להשיג תוצאות אופטימליות, כדאי לבצע ניסויים ולשפר את הגישה באופן שוטף.
הערכה יסודית: אימות של פסקת הפתיחה שעברה שינוי בכל תרחישי השימוש המיועדים עוזר לזהות הטיות פוטנציאליות או התנהגות לא צפויה, ולצמצם את ההשפעה שלהן. הטיות או התנהגות לא צפויה עלולות לפגוע באיכות הסיכום בתרחישים מסוימים.