UiPath Documentation
agents
latest
false
智能体用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

上下文

Add an index or a set of Data Fabric entities as an agent context, then configure its search strategy, scope, or entity type to control what your agent retrieves.

在智能体中使用索引

索引使智能体可以访问经过许可的知识库。这有助于智能体使用业务专属数据进行推理。有关有效利用上下文的指导,请参阅“上下文工程最佳实践”。

要为上下文锚定功能配置自定义模型,请参阅“配置 LLM”。

To add an index as context for your agent, take the following steps in the Contexts section:

  1. Select Add context, then select Context Grounding Indexes.
  2. 从可用列表中选择一个索引,或选择新建,在 Orchestrator 中新建索引。有关详细信息,请参阅“索引”。
  3. 请为您的上下文提供描述
  4. 使用“属性”面板配置 搜索策略。 您可以使用以下设置控制查询类型、精度和相关性:
    • 语义:如果您正在使用文本数据源,请选择此选项进行语义查询。
      • 相关性评分阈值:指在检索和重新排序相关数据块后应用的相似度评分阈值。评分低于此阈值的任何相关数据块都不会返回。使用此字段可提高结果的精确性。将数字提高,上下文锚定就会仅筛选出分数最高的提示词,并将其作为基础。
      • 生成的最多结果:指上下文锚定从用户的查询中返回的块数。 它有助于减小 LLM 生成的基础负载(LLM 调用的总令牌大小),并且可以帮助您对从上下文锚定获得的结果进行额外筛选。随着结果数增加,返回的数据块数量也会增加。
      • 查询 – 搜索策略的查询。此字段支持静态值、静态模式、参数模式和动态模式。
    • 结构化 (预览):如果您使用的是表格数据源,请为结构化查询选择此选项。 支持 CSV 数据格式。
    • DeepRAG:选择此选项以启用高级多文档合成和检索。 有关详细信息,请参阅“使用 DeepRAG”
      • 启用引用 – 启用 DeepRAG 查询的引用功能。
      • 提示词 – DeepRAG 查询的提示词。此字段支持静态值、静态模式、参数模式和动态模式。
  5. 使用以下设置限制搜索作用域:
    • 文件夹路径前缀 – 使用此字段指定存储目标文档的文件夹路径。您可以手动输入静态路径(如 /documents/project),或使用动态参数,使智能体能够根据 runtime 输入搜索不同的文件夹。
    备注:

    默认情况下,仅会对直接位于指定文件夹中的文件进行索引。 存储在子文件夹中的文件不会自动包括在内。 要包含子文件夹中的文件,请将 /** 附加到路径中(例如 /documents/project/**)。如果不包含子文件夹中的文件,您可能会看到以下错误:“没有可用于 DeepRAG 的有效文件。请更新并重新同步您的索引,或使用其他匹配模式。”

    • 文件扩展名 – 选择索引中包含的文件类型。对于 DeepRAG,仅支持 PDF 文件。

Using Data Fabric entities in agents

Besides indexes, agents can use Data Fabric entities directly as context. This lets an agent query a system of record directly from enterprise systems, and reason over the current values without you having to create or maintain an index.

Native and Federated entity types are supported to be added as a context. A Native entity stores its records in UiPath, while a Federated entity holds no data of its own and reads live from an external system or from a Native entity each time it's queried. For a full comparison of what each type supports, refer to Entity types. For details on creating and configuring entities, refer to Creating an entity.

To add a Data Fabric entity set as a context for your agent, take the following steps in the Contexts section:

  1. Select Add context, then select Data Fabric Entities.
    备注:

    This view displays folder-level entities only.

  2. Search for and select up to five entities from the list. Entities are grouped into In current solution and Available resources, and each shows a Native or Federated label. You can optionally use the View button to view an entity's details.
  3. Select Add to add the selected entities to your agent.
    备注:

    Federated entities that connect to an external system may have required parameters, depending on what that system's connector needs to read data. If the entity you added has any, its properties panel lists them. Enter the values for required parameters before the agent can query that entity.

The entities appear as context for your agent, each carrying its Native or Federated label and ready to be queried.

  • 在智能体中使用索引
  • Using Data Fabric entities in agents

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新