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
Open the Data source configuration pane from one of two places:
On the Create generative answers node, select Edit under Data sources.
Alternatively, in the Create generative answers node select the
...
, then select Properties and select Data source.
Select the Class data options.
In the Custom data field, enter the JSON array you want to use, or the variable for the array.
Select Save to save any changes to your topic.