# AI answer widget

## Overview

> info  **PREREQUISITES**:
>
> * This widget is available out of the box as of version Sitefinity CMS 15.4.8626. For older supported versions, you can use the custom widget samples.
> * A Progress Agentirc RAG account is required to manage knowledge boxes.

The *AI answer wiget* displays the AI-generated summary for the current query. This widget can be used only with the *AI ask box* widget or embedded in a results layout with the *AI Search results* widget.

> info **NOTE**: Personalization of this widget is not supported.

## Search configuration requirements

The *AI answer* widget generates answers through the Progress Agentic RAG `/ask` endpoint. The widget uses the search configuration selected in the *AI ask box* widget that submits the query:

* If no search configuration is selected, the widget uses the default settings. You can place the *AI answer* and *AI search results* widgets on the same page.
* If a custom search configuration is selected, it must use the `simple-rag` search mode. Because the *AI search results* widget requires a configuration in `search` mode, place the *AI answer* widget on a separate page with its own *AI ask box* widget.

For more information, see [AI Search](https://www.progress.com/documentation/sitefinity-cms/ai-search#search-configurations-and-widget-placement).

## Configuration options

### AI answer setup

* **Answer label**   - Label shown above the AI-generated text.
* **Icon**   - Select or upload an icon to be displayed on the front-end page for the widget.
* **Include**   - Select what should be displayed in the results page:
  * Searched phrase - Select whether the phrased used for the search is displayed.
  * Sources - In AI-generated answer, display links to sources of information.
  * Notice - Text displayed under the answer, informing users that they are interacting with AI.
* **Enable visitor feedback**   - If enabled, site visitors can provide feedback on the generated answer.

### Display settings

In *Display setting* section, you can do the following:

* Change the template\
  To change the template that the *AI Answer* widget uses, select the new template in the *AI answer template* dropdown box.\
  You must first have created a custom template.\
  For more information, see [Next.js pages and templates](https://www.progress.com/documentation/sitefinity-cms/next.js-pages-and-templates) and [ASP.NET Core pages and templates](https://www.progress.com/documentation/sitefinity-cms/create-an-asp.net-core-page).
* Configure the widget margins\
  In *Margins*, you can choose the margins between the text and the column where it is placed.\
  Choose from the predefined values of *none*, *small*, *medium*, or *large*.

Save your changes.

## Custom widget samples

The *AI answer widget* is available out of the box with Sitefinity CMS 15.4.8626 and newer versions.\
For older versions or a custom implementation, you can use these samples in GitHub:

* [ASP.NET Core samples](https://github.com/Sitefinity/sitefinity-aspnetcore-mvc-samples/tree/master/src/progress-agentic-rag-widgets)<https://github.com/Sitefinity/nextjs-samples/tree/main/src/progress-agentic-rag-widgets>
* [Next.js samples](https://github.com/Sitefinity/nextjs-samples/tree/main/src/progress-agentic-rag-widgets)  <https://github.com/Sitefinity/nextjs-samples/tree/main/src/progress-agentic-rag-widgets>
* [MVC samples](https://github.com/Sitefinity/mvc-samples/tree/master/ProgressAgenticRAGWidgets)
