資料儲存庫工具設定

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

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

從「Tool settings」(工具設定) 清單中選取選項,會自動影響其他可用的工具設定。

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

可用選項如下:

工具設定 說明
預設 適合所有代理類型。
專為語音最佳化 這項預設工具類型是專為語音代理設定。
自訂 選擇 Customize 選項,即可指定自己的基準、重寫工具和摘要參數,而非使用 Default 和 Optimized for voice 指派的預設值。

建立基準

只要輸入簡潔的內容,就能盡量減少幻覺,並提高回覆的準確度和一致性。

Dialogflow CX 會根據連結資料儲存庫的內容,計算每則回覆的信賴水準。這項指標會評估回覆中的所有資訊是否都有資料儲存庫中的資訊佐證。您可以選取可接受的最低信賴水準,調整允許的回覆,代理就不會傳回低於該水準的回覆。

有五種可選的信賴水準:VERY_LOW、LOW、MEDIUM、HIGH 和 VERY_HIGH。

您也可以套用基準啟發式篩選器。啟用後,如果回覆內容可能不準確 (依據常見的幻覺現象判斷),代理就會隱藏回覆。

選取摘要模型

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

模型名稱 推出階段 模型規格
Default GA 這是建議設定,日後可能會有異動。如果使用這個選項,代理行為可能會有所變化 (通常是改善)。如要讓代理行為更一致,請選取特定模型。
Disabled GA 僅適用於 Customer Engagement AI。停用資料儲存庫工具下的摘要元件。延遲時間會縮短,但畫質會降低。
代理摘要 GA 僅適用於 Customer Engagement AI。這個選項會將摘要作業委派給代理。這款模型經過最佳化調整,可提供更流暢的語音互動體驗。
gemini-2.5-flash 正式發布版 Gemini 2.5 Flash
gemini-2.5-flash-lite 正式發布版 Gemini 2.5 Flash Lite
gemini-3.1-flash-lite 正式發布版 Gemini 3.1 Flash Lite
gemini-3.5-flash-lite 正式發布版 Gemini 3.5 Flash-Lite

所有列出的模型都支援所有支援的語言和支援的地區。

摘要自訂提示

您可以使用預設摘要提示詞搭配所選摘要模型,也可以自行提供提示詞。提示詞是文字範本,可包含預先定義的預留位置。預留位置會在執行階段替換為適當的值,最終文字則會傳送至 LLM。

預留位置如下:

  • $original-query:使用者的查詢文字。
  • $rewritten-query:Dialogflow 會使用重寫模組,將原始使用者查詢重寫為更準確的格式。
  • $sources:Dialogflow 會使用企業搜尋,根據使用者查詢搜尋來源。找到的來源會以特定格式顯示:

    [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,使用重寫器重構查詢。

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

模型名稱 推出階段 模型規格
Default GA 這是建議設定,日後可能會有異動。如果使用這個選項,代理行為可能會有所變化 (通常是改善)。如要讓代理行為更一致,請選取特定模型。
停用重寫工具 GA 系統不會重寫查詢。延遲時間會縮短,但畫質會降低。尤其是需要對話記錄脈絡的問題,資料儲存庫工具可能難以回答。
rewrite-by-agent GA 僅適用於 Customer Engagement AI。這個選項會將重寫作業委派給代理。這款模型經過最佳化調整,可同時處理語音和文字,並縮短延遲時間
gemini-2.5-flash 正式發布版 Gemini 2.5 Flash
gemini-2.5-flash-lite 正式發布版 Gemini 2.5 Flash Lite
gemini-3.1-flash-lite 正式發布版 Gemini 3.1 Flash Lite
gemini-3.5-flash-lite 正式發布版 Gemini 3.5 Flash-Lite

所有列出的模型都支援所有支援的語言和支援的地區。

重寫工具自訂提示

您可以使用預設提示,也可以自行提供。提示是文字範本,可包含預先定義的預留位置。執行階段值會取代預留位置,最終文字會傳送至 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",
      ...
    }
    

例如:

You observe conversations between a human and an AI assistant working at ${customer!}${business_description!}.
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:

酬載設定

透過酬載設定,您可以在回應酬載中,將資料儲存庫程式碼片段新增為多媒體內容,並在通訊軟體中算繪。您可以啟用或停用這項功能。

資料儲存庫工具搜尋設定

您可以設定動態搜尋參數,根據進行中對話的內容微調結果。詳情請參閱搜尋設定說明文件。