Share via


Create file groups

File groups let you group up to 500 files into a single knowledge source. Agents can narrow their search scope when asked about relevant or related data.

Querying a group of files helps agents find the right content more easily.

File group requirements

  • Only locally uploaded files are supported.

  • Copilot Studio agents require Dataverse search to use this knowledge source. If you can't add a Dataverse-enabled knowledge source, such as uploading a file or adding a Dataverse table to an agent, ask your administrator to turn on Dataverse search in your environment. For more information about Dataverse search and how to manage it, see What is Dataverse search and Configure Dataverse search for your environment.

Note

  • OneDrive and SharePoint files aren't supported.

  • Copilot Studio agents require Dataverse search to use this knowledge source. If you can't add Dataverse files to an agent, ask your administrator to turn on Dataverse search in your environment. For more information about Dataverse search and how to manage it, see What is Dataverse search and Configure Dataverse search for your environment.

File group components

A file group has the following three components:

  1. Name and Description: Fields that help the agent know what the knowledge is about

  2. Instructions: Field that tells the agent how to use this file group for a user query

  3. Knowledge: The files with the information to ground the agent

Differences between file groups and individual files

Each individual file is its own knowledge source. A file group uses multiple files as a single knowledge source and uses instructions to help the agent find the right file and return the right information to the user.

For example, a file group helps when an organization has information that depends on specific individual factors, like geographic location or job title.

When you use individual files as a knowledge source, the agent searches all knowledge sources at the same time. The answer depends on one or more chunks the agent finds in one or more files.

When you use file groups, the agent searches for information in two stages. In the first stage, the agent uses the knowledge instructions to find the right file. In the next stage, the agent looks for the right chunks in the files that satisfy the instruction's requirements to answer the user's question. This approach returns more accurate answers from the right file.

File group example scenario

Context: Contoso International Airlines wants to build a bot for customers to ask questions about upcoming travel. One of the most common questions is about baggage policies.

Example situation: Baggage policies differ based on the type of travel (domestic or international), customer tier (economy, business, or first class), and other attributes.

Example solution: Contoso has a group of PDFs, with each policy written in detail and a document for each customer tier. In this case, each criterion, like "type of flight" and "seat type," can be set up as a variable. These variables help the agent filter the knowledge source to find the most relevant information and give the most accurate answer.

Create a file group using new files

When you select one or more files to be uploaded, the button to upload it in the Add Knowledge dialog is split to indicate the option to add the files to the agent as individual files (individual knowledge sources) or as a file group (single knowledge source containing one or more files).

When you select the option to Upload as a group, the dialog gives you the option to update the file group's name from the generic "File Group 1," its description, and add Instructions to help the agent filter through the group of files for more accurate searches. For more specific instructions, you can add global variables to help the agent find the right knowledge for a given user's situation.

After you add a file group as a knowledge source by selecting Create, a file group icon is displayed in the Overview page (Knowledge section) or in the Knowledge page.

The same file group can be selected at any time to review, add or delete files within, or change the name, description, or instructions fields.

Create a file group using existing files

You can start a file group from an individual file when the agent already has individual files added to it. Select the More icon () of the knowledge source's row and select Create file group.

When a maker uses this option, a dialog displays all of the individual files that were previously uploaded to the agent. However, it doesn't include files from SharePoint or OneDrive knowledge sources. You can select one or more files to the preselected file to create a file group.

Once you select Create, the individual files are no longer displayed as individual knowledge sources in the Overview page (Knowledge section) or in the Knowledge page. They're displayed as files inside of the file group.

View files in a file group

To see details for a file group, such as the individual files it contains, select the file group name or use the hover menu to select Edit. This action takes you to the Knowledge details page.

Add files to a file group

At any time, new files can be added to a file group. Either drag and drop files, or browse your device and select more files to add them to the file group. This latter option is only available if there are individual files added to the agent. If there are already other types of knowledge sources, even if they're files, Select from uploaded files is turned off.

  1. On the Overview or Knowledge page, select the file group you want.

  2. On the Knowledge page for the file group, select the Edit button or select on the name of the file group.

  3. Drag and drop or select the option to upload one or more desired files, or use the Select from uploaded files option.

    Note

    Every change to a file group must be saved using the Save button.

Update or replace a file within a file group

To update a file in a file group, remove the old file and add the new file to the file group.

  1. On the Overview or Knowledge page, select the file group you want.

  2. On the Knowledge page for the file group, select the Edit button.

  3. Select the trash icon to delete the file.

  4. Drag and drop or select the option to upload one or more desired files, or use the Select from uploaded files option.

    Note

    Every change to a file group must be saved using the Save button.

Remove files from a file group

You can remove files from an existing file group until only one file remains. A file group needs at least one file.

To remove a file from a file group:

  1. On the Overview or Knowledge page, select the desired file group.

  2. On the Knowledge page of the file group, select the Edit button.

  3. Select the trash icon to delete the file.

  4. Repeat these steps for each file you want to remove.

Important

Deleting the files also deletes the name, description, instructions, and indexed data from the agent. This action is permanent and can't be undone. To restore the files, reupload the files. Every change to a file group must be saved using the Save button.

Remove a file group

A file group can be deleted from the Overview , **Knowledge page, or the Knowledge details page.

  • Overview or Knowledge page: hover over the knowledge source to show a menu. Select the option to delete the file group.

  • Knowledge details page: Select the More icon () next to the Save button, and select the option to delete the file group.

Important

Deleting the file group also deletes the files, name, description, instructions, and indexed data. This action is permanent and can't be undone. To restore the files, reupload a new file group.

File group instructions

Instructions are a rich text field where users can include global variables like a user’s location or date of birth to create requirements for the agent to perform a knowledge search.

  • Geographical scenario: If a file group has multiple files about a subject that varies by location of residence, the user can request the agent to search only within the knowledge for the user’s location.

File groups without instructions

If instructions aren't provided in a file group, the agent searches all the knowledge sources in that file group instead of using specific requirements to find the most relevant information within a subset of files.

Differences between instructions and descriptions

Descriptions help the agent using generative orchestration pick the right knowledge source for an answer. Instructions add requirements to help the agent pick the right knowledge source based on a global variable, so the experience is more tailored to the end user’s needs.

File group FAQs

When to create a file group

Create a file group when you add new knowledge by selecting the Add knowledge button or have individual files added as individual knowledge sources.

File groups are helpful in the following scenarios:

  • The agent relies on numerous static files that aren't updated often.
  • The agent needs to reach an unauthenticated audience.
  • When the maker has to use global variables to narrow the scope of the agent's searches.

Can you create file groups and upload individual files at the same time?

You can either start a file group from new files or existing files. While it isn't possible to start a file group using both newly and previously uploaded files, it's possible to add new or existing files to an existing file group.

Can you create multiple file groups?

Create up to 25 file groups per agent. Create each group one at a time.

How many files can a file group contain?

A file group can contain up to 500 files, each up to 512 MB.

Can you select a folder to upload a file group?

You can't upload a folder directly, but you can select all files in a folder to create a file group. For file requirements, see Upload files as a knowledge source.

Is it possible to ungroup a file group?

Yes, it's possible to ungroup the file group if the total number of knowledge sources is 500 or less per agent. This step converts a single knowledge source into one or more knowledge sources, depending on the number of files a file group contains.

A file group can be ungrouped from the Overview, Knowledge page, or the Knowledge details page.

  • Overview or Knowledge page: hover over the knowledge source to show a menu. Select the option to ungroup the file group.

  • Knowledge details page: Select the More icon () next to the Save button, and select the option to delete the file group.

Can I group or add instructions to other types of knowledge sources?

You can't create file groups or add instructions to other types of knowledge sources.