Use a custom data source for generative answers nodes

There might be scenarios where your data might not reside in one of the supported knowledge sources. In these scenarios, you can provide your own data through Power Automate flows or through HTTP requests. These options typically return a JSON object literal, which you can then parse into a Table format to generate answers.

Important

Knowledge sources defined in generative answers nodes take priority over knowledge sources at the copilot level. Copilot level sources function as a fallback.

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

Name Required Description
Content Required Source content used to summarize 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, using a parsed JSON object literal:

[
 {
  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 three 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, in the Create generative answers node select the ..., then select Properties and select Data source.

  2. Select the Class data options.

    Screenshot that shows the options available under Classic data.

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

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