# AI ask box 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 Agentic RAG account is required to manage knowledge boxes.

The *AI ask box* widget provides a natural-language input box for visitors to submit queries. The *AI ask box* initiates the search request and passes the query to Progress Agentic RAG via the Sitefinity proxy endpoint. Typically you place it on a landing page or search page. The widget then redirects users to a results page containing the *AI answer* and *AI search results* widgets.

## Configuration options

### **AI ask box setup**

In *AI ask box* setup section, you can do the following:

* **Agentic RAG connection**   - A connection to a specific knowledge box in Progress Agentic RAG. Select which connection this widget should use to search and answer questions. You can manage connections in *Administration » Progress Agentic RAG connections*.
* **Search Configuration**   -  A saved set of search settings that the AI uses to find content. Can be found in Progress Agentic RAG portal Search » Saved configurations.
* **After search is submitted... -**  Select whether you want to stay on the same page or designate a page to redirect to when displaying the answer. The page where the answer is displayed must contain the *AI answer* and/or the *AI results* widget.
* **Suggestions**   - These are example questions or phrases displayed under the *AI ask* box.

### Display settings

In Display setting section, you can do the following:

* **Change the template**\
  To change the template that the *AI ask box* widget uses, select the new template in the *AI ask box* 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.

### Advanced widget settings 

To open the advanced settings, in the upper-right corner of the *AI ask box* page, click ![Settings](https://www.progress.com/documentation/sitefinity-cms/cloud/assets/9bfbba9577a64832e2a0c9ec0a7936cf/image_639077981751738591.png) (*Advanced settings*).

* In *Label*, you can enter a specific name for this widget.\
  This name will be displayed in:
* In *CSS class*, you can enter individual CSS class for the *Intent box* widget.
* In Display on public site for…, you can select which user role can see the widget content when viewing the public site.

### Labels & Messages

In the *Labels & Messages* section, you can do the following:

* In *Label*, you can create a header for the widget visible above the intent input field.
* In *Placeholder text*, you can enter some text to orientate the user for an initial input.\
  For example, you can enter Ask for products, rates, or services... This text is only a guidance for the user and is not submitted as an intent input.
* In *Suggestions* label, you can put a header for the suggestions.

Save your changes.

### Custom widget samples

The *AI ask box* widget is available out of the box as of version Sitefinity CMS 15.4.8626.\
For older Sitefinity 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)
* [Next.js samples](https://github.com/Sitefinity/nextjs-samples/tree/main/src/progress-agentic-rag-widgets)
* [MVC samples](https://github.com/Sitefinity/mvc-samples/tree/master/ProgressAgenticRAGWidgets)
