資料儲存庫工具設定

您可以使用下列資料儲存庫工具設定。

工具設定 (僅限 Conversational Agents 控制台)

從「工具設定」下拉式選單中選取選項,會自動影響可用的其他工具設定。

DefaultOptimized for voice 選項是預設設定,會自動設定工具設定選單中的所有其他參數。

可用的選項如下:

工具設定名稱 說明
預設 適用於所有類型的代理程式。
語音最佳化 這個預設工具類型專為語音代理程式設定。
自訂 選擇 Customize 選項後,您就能指定自己的「基礎」、「重寫」和「摘要」參數,而不必使用 DefaultOptimized for voice 指派的預設值。

連結

Conversational Agents (Dialogflow CX) 會針對從連結資料儲存庫內容產生的每個回應,計算信賴度。這項指標會評估回覆中所有資訊是否都有資料庫中的資訊佐證。您可以選取可接受的最低信賴度,調整允許的回應。您可以選取允許的最低信賴度,這樣一來,智慧助理就不會傳回低於該信賴度的回覆。

你可以選擇 5 個信心水準:VERY_LOWLOWMEDIUMHIGHVERY_HIGH

您也可以套用基礎啟發式篩選器。啟用後,系統會抑制含有可能不準確內容的回覆 (根據常見的幻覺)。

選取摘要模型

您可以選取資料儲存庫代理程式用於摘要生成要求的生成模型。下表列出可用的選項:

模型名稱 推出階段 模型規格
預設 GA 這是建議設定,且可能會隨時間變更。如果使用這個選項,代理程式的行為可能會有所變更 (通常是改善)。如要讓代理程式行為更一致,請選取特定模型。
gemini-2.5-flash 正式發布版 Gemini 2.5 Flash
gemini-2.5-flash-lite 正式發布版 Gemini 2.5 Flash Lite
gemini-2.0-flash-001 正式發布版 Gemini 2.0 Flash
gemini-2.0-flash-lite-001 正式發布版 Gemini 2.0 Flash Lite
gemini-2.0-flash-lite-001-voice-mode GA Gemini 2.0 Flash Lite 專為語音功能最佳化。
gemini-1.5-flash-001 舊版 Gemini 1.5 Flash
gemini-1.5-flash-002 舊版 Gemini 1.5 Flash

所有列出的模型均支援所有支援的語言支援的區域

摘要自訂提示

您可以搭配所選摘要模型使用預設摘要提示,也可以自行提供提示。提示是文字範本,可能包含預先定義的預留位置。系統會在執行階段將預留位置替換為適當的值,並將最終文字傳送至 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:

選取重寫模型

處理使用者查詢時,代理程式會將使用者查詢和提示傳送至 LLM,以重構使用者查詢,執行重寫器

您可以選取資料儲存庫代理程式用於重寫生成要求的生成模型。下表列出可用的選項:

模型名稱 推出階段 模型規格
預設 GA 這是建議設定,且可能會隨時間變更。如果使用這個選項,代理程式的行為可能會有所變更 (通常是改善)。如要讓代理程式行為更一致,請選取特定模型。
已停用重寫器 GA 系統不會重寫查詢。延遲時間會縮短,但品質會降低。特別是需要對話記錄脈絡的問題,資料儲存庫工具可能無法回答。
gemini-2.5-flash 正式發布版 Gemini 2.5 Flash
gemini-2.5-flash-lite 正式發布版 Gemini 2.5 Flash Lite
gemini-2.0-flash-001 正式發布版 Gemini 2.0 Flash
gemini-2.0-flash-lite-001 正式發布版 Gemini 2.0 Flash Lite
gemini-1.5-flash-001 舊版 Gemini 1.5 Flash
gemini-1.5-flash-002 舊版 Gemini 1.5 Flash

所有列出的模型均支援所有支援的語言支援的區域

Rewriter 自訂提示

你可以使用預設提示,也可以自行提供提示。提示是文字範本,可能包含預先定義的預留位置。系統會在執行階段將預留位置替換為適當值,並將最終文字傳送至 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
    
  • ${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
    
  • $end-user-metadata:傳送查詢的使用者資訊會以以下格式呈現:

    The following additional information is available about the human: {
    "key1": "value1",
    "key2": "value2",
    ...
    }
    

例如:

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:

酬載設定

酬載設定可讓您在回應酬載中加入資料存放區程式碼片段做為豐富內容,並在即時通訊中顯示。您可以選擇開啟或關閉這項功能。