Use a custom data source for generative answers

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

In some cases, your data might not exist in a supported data source. However, you can provide your own data through Power Automate cloud flows or through HTTP requests. This would typically return a JSON object that you can then parse into a Table format to generate answers.

The custom data field takes a Table as an input, with the below properties:

Name Required Description
Content True Source content that is used to be summarized and answer the input question.
ContentLocation Optional URL for the citation of the source content
Title Optional title for the citation of the source content

Here's a sample table in Power Fx format, after a JSON has been parsed:

[
 {
  Content: "This is a sample piece of text that was provided for testing purposes, to be replaced with content of your choice",
  ContentLocation: "https://contoso.com/p1.htm",
  Title: "Contoso Sample"
 },
 {
  Content: "This is a second bit of sample text that can be replaced with content of your choice",
  ContentLocation: "https://fabrikam.com/p2.htm"
 },
 {
  Content: "This is a third bit of sample text that can be replaced with content of your choice",
  Title: "Adventure Works Cycles Sample"
 }
]

Copilot answers are generated from Content and include the link to the data source in ContentLocation. If a Title, is it used for the citation.

Important

Only the first 3 records of the table are used to generate an answer.

Use custom data

  1. Open the Data source configuration pane from one of two places:

    1. On the Create generative answers node, select Edit under Data sources.

      Screenshot that shows where to select the Properties pane.

    2. Alternatively, select the ... in the Create generative answers node, then select Properties to open a pane, and finally select Data source.

  2. In the Custom data field, enter the JSON array you want to use or the variable for the array.

  3. Select Save to save any changes to your topic.

Important

Information sources defined in the Generative answers node take priority at the copilot level. Copilot level sources function as a fallback.