Use a custom data source for generative answers
In some cases, your data might not exist in a supported data source. However, you can provide your own data through Power Automate flows or through HTTP requests. This would typically return a JSON object literal 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 |
Required | 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 object literal 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
Open the Data source configuration pane from one of two places:
On the Create generative answers node, select Edit under Data sources.
Alternatively, select the
...
in the Create generative answers node, then select Properties to open a pane, and finally select Data source.
Open 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.
Important
Information sources defined in the Generative answers node take priority at the copilot level. Copilot level sources function as a fallback.