Data summarization API overview (preview)
[This article is prerelease documentation and is subject to change.]
Makers can use the Power Pages summarization API to add page content summarization that uses generative AI. In this way, site users can get an overview of a page's content without having to go through the whole page. The API is built on top of the Power Pages Web API that provides data summarization on the Dataverse tables that are used on pages.
Important
- This is a preview feature.
- Preview features aren’t meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.
Prerequisites
- You must enable the site settings for the Web API.
- Only tables that are supported for the Power Pages Web API are available for summarization. Learn more about the Power Pages Web API in Web API overview.
- The feature isn't available in Government Community Cloud (GCC), Government Community Cloud - High (GCC High), or Department of Defense (DoD) regions.
Site settings
Enable the pages in your Web API, and set the following site settings for the summarization API feature.
Site setting name | Description |
---|---|
Summarization/Data/Enable | Enable or disable the summarization feature. Default: False Valid values: True, False |
Summarization/prompt/{any_identifier} | Use these settings to provide any instructions for summarization. Example: |
Summarization/Data/ContentSizeLimit | Modify the input size limit for the summarization content. Type: integer Default: 100,000 |
API schema
Method | URI | JSON Sample |
---|---|---|
POST | [Site URI]/_api/summarization/data/v1.0/tablesetname | { "InstructionIdentifier":"", "RecommendationConfig":"" } |
Property name | Description |
---|---|
InstructionIdentifier | This property is optional. If you want to pass any other instructions for summarization, use the site settings to add the prompt. You should always provide the site setting name as it was previously defined. |
RecommendationConfig | This property is optional. If you want to pass the prompt that the summarization API recommends, use this property to pass it. The value should be hashed and not modified. |
Note
The API follows the standard Open Data Protocol (OData) specifications that the Power Pages Web API supports. The summarization API supports all read operations that the Power Pages Web API supports.
Sample
Summarize the case type, subject, description, and case history by focusing on key details and critical information.
Request
POST [Power Pages URL]/_api/summarization/data/v1.0/incidents(aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb)?$select=description,title&$expand=incident_adx_portalcomments($select=description)
Content-Type: application/json; charset=utf-8
OData-MaxVersion: 4.0
OData-Version: 4.0
Accept: application/json
{
"InstructionIdentifier": "Summarization/prompt/case_summary"
}
Response
HTTP/1.1 200 OK
OData-Version: 4.0
{
"Summary": "The data results provide information…",
"Recommendations": [
{
"Text": "would you like to know about…?",
"Config": "HSYmaicakjvIwTFYeCIjKOyC7nQ4RTSiDJ+/LBK56r4="
}
]
}
The summarization response provides recommended prompts for fine-tuning the summary. If you want to use these recommendations, pass the configuration value in the request body, without the InstructionIdentifier
property.
Security
The summarization API respects the role-based security that is configured for table and column permissions. Only records that the user has access to are considered for summarization.
Authenticating the summarization API
You don't have to include an authentication code, because the application session manages authentication and authorization. All Web API calls must include a cross-site request forgery (CSRF) token.
Error codes and messages
The following table describes the different error codes and messages that you might encounter when you use the summarization API.
Status code | Error code | Error message |
---|---|---|
400 | 90041001 | Generative AI Features are disabled |
400 | 90041003 | Data summarization disabled for this site. Enable using the site setting. |
400 | 90041004 | Content length exceeds the limit |
400 | 90041005 | No records found to summarize |
400 | 90041006 | Error occurred while summarizing the content. |