本頁將說明自訂前言,以及如何撰寫前言來提升生成答案的品質。
前言會為 LLM 設定初始背景資訊和預期結果,再處理輸入文件。前言會影響生成的摘要品質。呼叫 answer 方法時,系統會提供預設前言。不過,您可以選擇指定自己的前言,而非使用預設前言。
如要瞭解如何在答案方法呼叫中指定前言,請參閱「指定自訂前言」。
舉例來說,您可以使用前言執行下列操作:
指定模型可使用和不可使用的字詞。
指定要特別關注或避免的主題。
指定回覆的樣式、語氣和格式。
調整前言可大幅提升摘要品質。
前言應包含兩部分:
工作說明範例
以下列舉幾個工作說明範例。假設您的員工想從包含許多公司文件的資料儲存庫中取得解答。
範例 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.
最佳做法
以下是撰寫及調整前言的最佳做法:
反覆修正:嘗試不同的前言變體,觀察對答案品質的影響。
使用者意見:收集使用者意見,找出重複發生的問題和需要改進的地方。
隨時掌握最新資訊:前言微調的成效可能因模型版本和文件性質而異。持續進行實驗並調整做法,爭取最佳成效。
全面評估:在所有預期用途中驗證修改過的前言,有助於找出並減輕潛在偏誤或非預期行為,避免在特定情境中對摘要品質造成負面影響。