dotAI Tool

Last Updated: May 2, 2024
documentation for the dotCMS Content Management System

With the [dotAI feature] active, this tool will appear in the dotCMS back end under Dev Tools -> dotAI. It allows the immediate use of AI operations in context, as well as additional management and configuration options.

dotAI Tool tabs.

Enabling Manually

To use dotAI as a core feature, you must have dotCMS 24.04.05 or later, and the dotAI plugin must be undeployed, if previously installed.

If your version does not include the dotAI Tool as enabled by default, go to Settings -> Roles & Tools. Click on any role to make the Tools tab visible.

Roles and Tools: tools tab.

Click on the desired tool group. In the resulting dialog, choose dotAI from the Tools dropdown.

Selecting the dotAI tool.

Click Add, and then click Save. The dotAI Tool is now enabled.

Semantic Content Search and Chat

The first tab in the tool allows the use and testing of search and chat operations. In its simplest expression, select an index to search, a response type, and enter a prompt. Results will be displayed on the right, including the number of matches, relative vectorized semantic distance from the prompt, and an excerpt representing the best match in each entry.

Further options are surfaced behind the Advanced button. See below for the complete list.

FieldDescription
Content IndexSelect one of the indexes defined under Manage Embeddings/Indexes or Auto Index Content Config.
Response TypeChoose between Semantic Search, which uses only dotCMS content to provide results; Streaming Chat, which incorporates more of OpenAI's wider-reaching linguistic capabilities along with dotCMS supporting content to give plain-language responses to open-ended prompts; and REST/JSON Chat, which provides the same results as Streaming Chat, plus a full and untruncated “completion” response JSON object containing a wealth of information about the query, its response, and the information used in its generation. See the REST ai/completions call for an example of such a response.
PromptThe direct user-input search or chat prompt to which the tool will respond.
ModelThe text model used to generate the response.
TemperatureDetermines randomness of the response. Takes a number between 0 and 2, with 0 as the most deterministic and 2 as the most random. Decimal fractions are permitted.
Response LengthThe maximum length of the response, specified in “tokens.” According to OpenAI, each token is approximated at about 4 characters in English, or about 3/4 of an average word — i.e., 100 tokens tends to yield about 75 words.
Vector OperatorDetermines how the semantic distance function is calculated, with the choice of Cosine Similarity, Distance, or Inner Product. The distinction is technical and perhaps a bit esoteric; according to OpenAI, “the choice of distance function typically doesn't matter much.”
Distance ThresholdA number, from 0 to 1, indicating allowable semantic distance. Lower numbers yield more similar results.
SiteAllows limiting results to one Site. Leave blank to include all Sites.
Content TypesAllows limiting results to one or more Content Type, represented as a comma-separated list. Leave blank to include all.

Image Playground

The Image Playground can create graphics on demand; just input a prompt, select a size, and hit Submit.

The right-hand side of the pane will display the resulting image; a Save button underneath, which will immediately capture the image to your system as a dotAsset; and additional information in the form of the rewritten, exact OpenAI prompt that generated the image, and a JSON object containing the original prompt, revised prompt, url, temp file name, etc.

dotAI Tool tabs.

Manage Embeddings/Indexes

This tab provides a view of all indexes configured to interact with the dotAI feature. From here, you can add more indexes, or rebuild or delete existing ones.

When building an index, use the Content to Index by Query field to input the content via Lucene query syntax. Under the Advanced button, two additional options surface: You can use a Velocity Template to specify which fields should be included and in what fashion, or a list of fields by variable to include. Leaving the Advanced fields blank will cause dotCMS to attempt to detect which fields are most relevant for generating content indexes.

To delete any existing index on the table, click the delete link to the right of its row; to rebuild the whole list, click the rebuild db link at the bottom of the table. To rebuild individual indexes, re-specify it using the left-hand menu; deletion is not necessary.

Config Values

This tab contains a table listing all of dotAI's configuration values. These are important because they can override and parameterize the prompts that it sends to OpenAI. All values displayed can be changed via the App configuration, either by altering the settings where a field exists, or by adding a Custom Property.

On this page

×

We Dig Feedback

Selected excerpt:

×