数据存储区工具设置

您可以使用以下 数据存储区工具 配置设置。

工具设置(仅限对话代理控制台)

工具设置 下拉菜单中选择一个选项会自动影响其他哪些工具配置可用。

DefaultOptimized for voice 选项是默认设置,会自动配置工具配置菜单中的所有其他参数。

您可以使用以下选项:

工具设置名称 说明
默认 已针对所有代理类型进行优化。
针对语音进行优化 此默认工具类型已专门针对语音代理进行配置。
自定义 选择 Customize 选项后,您可以指定自己的 GroundingRewriterSummarization 参数,而不是使用分配的 DefaultOptimized for voice 默认值。

Grounding

Dialogflow CX 会根据关联的数据存储区的内容为生成的每个回答计算置信度。这用于衡量回答中的所有信息都受数据存储区中的信息支持的置信度。 您可以选择自己可以接受的最低置信度,以调整允许哪些回答。您可以选择允许的最低置信度,代理将不会返回低于该级别的回答。

您可以选择 5 个置信度级别:VERY_LOWLOWMEDIUMHIGHVERY_HIGH

您还可以应用 Grounding 启发式过滤条件。如果启用此过滤条件,系统会抑制包含可能不准确的内容(基于常见幻觉)的回答。

选择摘要模型

您可以选择数据存储区代理用于摘要生成请求的生成模型。下表列出了可用的选项:

模型名称 发布阶段 模型规范
默认 GA 这是推荐的配置,并且可能会随时间而变化。如果您使用此选项,代理行为可能会发生变化(可能会有所改进)。 如果您希望代理行为更加一致,请选择特定模型。
已停用 GA 仅在 Customer Engagement AI 下受支持。停用数据存储区工具下的摘要组件。延迟将有所改善,但质量会降低。
由代理生成摘要 GA 仅在 Customer Engagement AI 下受支持。此选项会将 摘要生成任务委托给代理。它专门针对语音互动进行了优化,延迟也经过优化。
gemini-2.5-flash GA Gemini 2.5 flash
gemini-2.5-flash-lite GA Gemini 2.5 flash lite
gemini-2.0-flash-001 GA Gemini 2.0 flash
gemini-2.0-flash-lite-001 GA Gemini 2.0 flash lite
gemini-2.0-flash-lite-001-voice-mode GA Gemini 2.0 flash lite 针对语音进行了优化。

所有列出的模型都支持所有 受支持的语言受支持的区域

摘要自定义提示

您可以使用默认摘要提示以及所选的摘要模型,也可以提供自己的摘要提示。提示是一个文本模板,可能包含预定义的占位符。占位符将在运行时替换为相应的值,最终文本将发送给大语言模型。

占位符如下所示:

  • $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 不会发生查询重写。延迟将有所改善,但质量会降低。特别是,数据存储区工具可能难以回答需要对话历史记录中的上下文的问题。
rewrite-by-agent。 GA 仅在 Customer Engagement AI 下受支持。此选项会将重写任务委托给代理。它针对语音和文本进行了优化,延迟也经过优化
gemini-2.5-flash GA Gemini 2.5 flash
gemini-2.5-flash-lite GA Gemini 2.5 flash lite
gemini-2.0-flash-001 GA Gemini 2.0 flash
gemini-2.0-flash-lite-001 GA Gemini 2.0 flash lite

所有列出的模型都支持所有 受支持的语言受支持的区域

重写器自定义提示

您可以使用默认提示,也可以选择提供自己的提示。提示是一个文本模板,可能包含预定义的占位符。占位符将在运行时替换为相应的值,最终文本将发送给大语言模型。

占位符和必需文本如下所示:

  • $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:

载荷设置

借助载荷设置,您可以将数据存储区代码段作为富媒体内容添加到回答载荷中,这些内容将在即时通讯应用中呈现。您可以选择开启或关闭此功能。

数据存储区工具搜索配置

您可以配置动态搜索参数,以便根据正在进行的对话中的上下文微调结果。如需了解详情,请参阅 搜索配置文档