数据存储区工具设置

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

工具设置(仅限 Conversational Agents 控制台)

从工具设置列表中选择一个选项会自动影响其他哪些工具配置可用。

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

您可以使用以下选项:

工具设置 说明
默认 已针对所有类型的智能体进行优化。
针对语音进行了优化 此默认工具类型专为语音智能体配置。
自定义 选择 Customize 选项后,您可以指定自己的接地、重写器和摘要参数,而不是使用 Default 和 Optimized for voice 分配的默认值。

接地

Dialogflow CX 会为根据关联数据存储区的内容生成的每个回答计算置信度。这可以衡量回答中的所有信息都得到数据存储区中信息支持的置信度。您可以选择您能接受的最低置信度,从而调整允许的回答,智能体不会返回低于该水平的回答。

有五个置信度级别可供选择:VERY_LOW、LOW、MEDIUM、HIGH 和 VERY_HIGH。

您还可以应用接地启发法过滤器。如果您启用此功能,代理会根据常见幻觉抑制包含可能不准确内容的回答。

选择摘要模型

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

模型名称 发布阶段 模型规范
默认 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-3.1-flash-lite GA Gemini 3.1 Flash Lite
gemini-3.5-flash-lite GA Gemini 3.5 Flash Lite

列出的所有模型均支持所有支持的语言和受支持的国家/地区。

摘要自定义提示

您可以将默认摘要提示与所选摘要模型搭配使用,也可以提供自己的提示。提示是一个文本模板,可以包含预定义的占位符。占位符将在运行时替换为适当的值,最终文本将发送到 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 这是推荐的配置,可能会随时间而变化。如果您使用此选项,可能会遇到代理行为的变化(可能是改进)。如果您希望智能体的行为更加一致,请选择特定模型。
已停用 Rewriter 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-3.1-flash-lite GA Gemini 3.1 Flash Lite
gemini-3.5-flash-lite GA 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:

载荷设置

通过载荷设置,您可以将数据存储区代码段作为富媒体内容添加到响应载荷中,该载荷会在 Messenger 中呈现。您可以开启或关闭此功能。

数据存储区工具搜索配置

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