可用的代理程式設定如下。
連結
系統會為從已連結資料儲存庫內容產生的每個回應計算信心等級,以評估回應中所有資訊是否均由資料儲存庫中的資訊支援。您可以選取允許的最低信賴水準,代理程式就不會傳回低於該水準的回覆。
您可以選擇 5 種信賴水準:極低、低、中、高和極高。
您也可以套用接地法則篩選器。啟用後,系統會抑制含有常見幻覺內容的回應,因為這些內容可能不準確。
資料儲存庫提示
您可以選擇新增服務專員的其他資訊,藉此改善資料儲存庫內容產生的答覆品質,並讓答覆更貼近您的品牌:
- 服務專員名稱:服務專員應稱呼自己的名稱。如果不設定,系統會使用預設值「AI Assistant」。
- 服務專員身分:服務專員的角色。如果不設定,系統會使用預設值「AI Assistant」。
- 公司名稱:設定為貴公司的名稱。這個值應該已在建立服務項目時設定,但可視需要調整。建議您正確設定這個欄位 (尤其是不要留空),以免產生的答案品質受到影響。
- 公司簡介:簡短說明公司提供的服務或產品。
- 代理程式範圍:代理程式可用於哪些位置。如果不設定,系統會使用公司網站的預設值。
部分或全部填寫完這個部分後,您可以在右側的「您的提示」下方,檢查由這些設定衍生的簡短段落。系統會在產生答案時使用這項資訊。
摘要自訂提示
處理使用者查詢時,代理程式會搜尋資料儲存庫,找出合適的來源。然後,代理程式會將使用者查詢和找到的來源傳送至大型語言模型,由後者執行摘要作業。
您可以選取要用於摘要的模型,並視需要提供自己的提示。
選取生成式摘要模型
您可以為摘要產生要求選取資料儲存庫代理程式使用的產生模型。下表列出可用的選項:
型號 ID | 語言支援 |
---|---|
預設 | 這是建議設定,但可能會隨時間變更。如果使用這個選項,可能會發現服務機器人的行為有所變動 (可能會改善)。如要讓服務機器人行為更一致,請選取特定模型。 |
gemini-1.5-flash-001 | 適用於所有支援的語言。 |
gemini-1.5-flash-002 | 適用於所有支援的語言。 |
gemini-2.0-flash-001 | 適用於所有支援的語言。 |
gemini-2.0-flash-lite-001 | 適用於所有支援的語言。 |
自訂摘要提示
您可以為摘要 LLM 呼叫提供自己的提示。提示是文字範本,可能包含預先定義的預留位置。預留位置會在執行階段替換為適當的值,最終文字會傳送至 LLM。
預留位置如下:
$original-query
:使用者的查詢文字。$rewritten-query
:Dialogflow 會使用重寫器模組,將原始使用者查詢重寫為更準確的格式。$sources
:Dialogflow 會根據使用者的查詢,使用 Enterprise Search 搜尋來源。找到的來源會以特定格式轉譯:[1] title of first source content of first source [2] title of second source content of second source
$end-user-metadata
:系統會以以下格式顯示傳送查詢的使用者資訊:The following additional information is available about the human: { "key1": "value1", "key2": "value2", ... }
$conversation
:對話記錄會以以下格式顯示:Human: user's first query AGENT: answer to user's first query Human: user's second query AGENT: answer to user's second query
${conversation USER:"<user prefix>" AGENT:"<agent prefix>" TURNS:<turn count>}
:$conversation
預留位置的參數化版本。您可以自訂使用者前置字元 (USER
)、代理程式前置字元 (AGENT
) 和要納入的前一個回合數量 (TURNS
)。必須指定所有預留位置參數值。例如:
${conversation USER:"Human says:" AGENT:"Agent says:" TURNS:1}
。對話記錄會以以下方式顯示:Human says: user's first query Agent says: answer to user's first query
自訂提示應指示 LLM 在無法提供答案時傳回「NOT_ENOUGH_INFORMATION」。在這種情況下,代理程式會叫用不相符事件。
例如:
Given the conversation between a Human and a AI assistant and a list of sources,
write a final answer for the AI assistant.
Follow these guidelines:
+ Answer the Human's query and make sure you mention all relevant details from
the sources, using exactly the same words as the sources if possible.
+ The answer must be based only on the sources and not introduce any additional
information.
+ All numbers, like price, date, time or phone numbers must appear exactly as
they are in the sources.
+ Give as comprehensive answer as possible given the sources. Include all
important details, and any caveats and conditions that apply.
+ The answer MUST be in English.
+ Don't try to make up an answer: If the answer cannot be found in the sources,
you admit that you don't know and you answer NOT_ENOUGH_INFORMATION.
You will be given a few examples before you begin.
Example 1:
Sources:
[1] <product or service> Info Page
Yes, <company> offers <product or service> in various options or variations.
Human: Do you sell <product or service>?
AI: Yes, <company> sells <product or service>. Is there anything else I can
help you with?
Example 2:
Sources:
[1] Andrea - Wikipedia
Andrea is a given name which is common worldwide for both males and females.
Human: How is the weather?
AI: NOT_ENOUGH_INFORMATION
Begin! Let's work this out step by step to be sure we have the right answer.
Sources:
$sources
$end-user-metadata
$conversation
Human: $original-query
AI:
Rewriter 自備提示
處理使用者查詢時,服務機器人會將使用者查詢和提示傳送至 LLM,以便重構使用者查詢,並執行重寫器。
您可以選取要用於重寫器的模型,並視需要提供自己的提示。
選取重寫器產生模型
您可以為重寫器產生要求選取資料儲存庫代理程式使用的生成模型。下表列出可用的選項:
型號 ID | 語言支援 |
---|---|
預設 | 這是建議設定,但可能會隨時間變更。如果使用這個選項,可能會發現服務機器人的行為有所變動 (可能會改善)。如要讓服務機器人行為更一致,請選取特定模型。 |
gemini-1.5-flash-001 | 適用於所有支援的語言。 |
gemini-2.0-flash-001 | 適用於所有支援的語言。 |
gemini-2.0-flash-lite-001 | 適用於所有支援的語言。 |
gemini-xs | 適用於所有支援的語言。 |
已停用的重寫器 | 適用於所有支援的語言。 |
自訂重寫器提示
您可以為前一節所列的部分重寫器產生模型,為重寫器 LLM 呼叫提供自己的提示。提示是文字範本,可能包含預先定義的預留位置。系統會在執行階段將預留位置替換為適當的值,並將最終文字傳送至 LLM。
預留位置和必填文字如下:
$original-query
:使用者的查詢文字。$conversation
:對話記錄會以以下格式顯示:Human: user's first query AGENT: answer to user's first query Human: user's second query AGENT: answer to user's second query
例如:
Your goal is to perform a search query to help the AI assistant respond to the human's last statement.
* Always output the best search query you can, even if you suspect it's not needed.
* Never generate a query that is the same as the user's last statement.
* Include as much context as necessary from the conversation history.
* Output a concise search query, and nothing else.
* Don't use quotes or search operators.
* The query must be in ${language!}.
Conversation History: $conversation
Human: $original-query
Search Query:
資料儲存庫備用機制
這個部分包含下列設定:
- 備用連結:如果服務專員無法提供答案,請顯示最合適的連結。
- 啟用生成式 AI:允許資料儲存庫在產生結果時使用生成式 AI。