数据存储区工具设置

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

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

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

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

您可以使用以下选项:

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

落地

对于根据关联的数据存储区内容生成的每条回答,对话式代理 (Dialogflow CX) 都会计算置信度。此指标用于衡量对回答中所有信息均有数据存储区中的信息支持的信心程度。 您可以选择自己能接受的最低置信度,从而调整允许的回答。您可以选择允许的最低置信度,这样代理就不会返回低于该置信度的回答。

您可以从 5 个置信度级别中进行选择:VERY_LOWLOWMEDIUMHIGHVERY_HIGH

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

选择总结模型

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

模型名称 发布阶段 模型规范
默认 GA 这是推荐的配置,可能会随时间而变化。如果您使用此选项,代理行为可能会发生变化(很可能是改进)。如果您希望代理行为更加一致,请选择特定模型。
gemini-2.0-flash-001 GA Gemini 2.0 Flash
gemini-2.0-flash-lite-001 GA Gemini 2.0 Flash Lite
gemini-2.5-flash 公开预览版 Gemini 2.5 Flash
gemini-1.5-flash-001 旧版 Gemini 1.5 Flash
gemini-1.5-flash-002 旧版 Gemini 1.5 Flash

所有列出的型号均支持所有支持的语言支持的地区。|gemini_20_flash_lite_001_voice_mode | 针对语音进行了优化。支持所有支持的语言 |

总结自定义提示

您可以使用默认的总结提示以及所选的总结模型,也可以自行提供提示。提示是一个文本模板,可能包含预定义的占位符。占位符将在运行时替换为相应的值,最终文本将发送给 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 以重构用户查询,从而执行 重写器

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

模型标识符 语言支持
默认 这是推荐的配置,可能会随时间而变化。如果您使用此选项,代理的行为可能会发生变化(很可能是改进)。如果您希望代理行为更加一致,请选择特定模型。
gemini-1.5-flash-001 支持所有支持的语言
gemini-2.0-flash-001 支持所有支持的语言
gemini-2.0-flash-lite-001 支持所有支持的语言
gemini-xs 支持所有支持的语言
已停用的重写器 支持所有支持的语言

重写器自定义提示

您可以使用默认提示,也可以选择提供自己的提示。提示是一个文本模板,可能包含预定义的占位符。占位符将在运行时替换为相应的值,最终文本将发送给 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
    
  • $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:

载荷设置

借助载荷设置,您可以将数据存储区代码段作为富内容添加到响应载荷中,并在 Messenger 中呈现。您可以选择开启或关闭此功能。