UiPath Documentation
agents
latest
false
Agents user guide

Contexts

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.

Using indexes in agents

Indexes give agents access to permissioned knowledge bases. This helps agents reason using business-specific data. For guidance on effectively leveraging context, refer to Best practices for context engineering.

To configure a custom model for Context Grounding features, refer to Configuring LLMs.

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. Select an index from the available list or Create new to create a new index in Orchestrator. For details, refer to Indexes.
  3. Provide a Description for your context.
  4. Configure the Search Strategy using the Properties panel. You can control the query type, precision, and relevance of the context using the following settings:
    • Semantic: Select this option for semantic queries if you are using text data sources.
      • Relevance score threshold: Refers to a similarity score threshold applied after the retrieval and re-ranking of relevant chunks. Any relevant chunks that are scored below this threshold are not returned. Use this field to make results more precise. As you increase this number, Context Grounding filters and grounds prompts with only the best scores.
      • Max results generated: Refers to the number of chunks returned by Context Grounding from a user's query. This helps with making the grounding payload of the LLM generation (overall token size of the LLM call) smaller and can help act as an additional filter on the results you get from Context Grounding. Increasing the number of results increases the amount of chunks that are returned.
      • Query – The query for the search strategy. This field supports static values, Static, Argument, Dynamic modes.
    • Structured (Preview): Select this option for structured queries if you are using tabular data sources. Supports CSV data format.
    • DeepRAG: Select this option to enable advanced multi-document synthesis and retrieval. For details, refer to Using DeepRAG.
      • Enable citations – Enable for citations for DeepRAG queries.
      • Prompt – The prompt for the DeepRAG query. This field supports static values, Static, Argument, Dynamic modes.
  5. Limit the search scope using the following settings:
    • Folder path prefix – Use this field to specify the folder path where your target documents are stored. You can either manually enter a static path, such as /documents/project, or use a dynamic argument, allowing the agent to search different folders based on runtime inputs.
    Note:

    By default, only files located directly in the specified folder are indexed. Files stored in subfolders are not included automatically. To include files from subfolders, append /** to the path (for example, /documents/project/**). If files in subfolders are not included, you may see the following error: "No valid files to use for DeepRAG. Please update and resync your index, or use a different matching pattern."

    • File extension – Select the file types contained in the index. For DeepRAG, only PDF files are supported.

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.
    Note:

    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.
    Note:

    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 indexes in agents
  • Using Data Fabric entities in agents

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated