Skip to content

Ask AI for DTP

Introduction

Ask AI for DTP supports the administrator user by simplifying and speeding up the definition and maintenance of DTP.

In particular, Ask AI supports the administrator user in the following use cases:

  • Data model information: identification of the Analytical Worksapace objects that can be manipulated by the DTP (dataset fields, parameters, functions, etc.).
  • From Text to SQL: definition and maintenance of DTP SQL formulas (present in filters, execution conditions, matching fields, etc.).

IMPORTANT: The functionality is only supported for AWS customers; it is not supported for Azure customers.

Synchronise DTP parameterization

The first step to ensure that Ask AI has all the necessary information to respond to the user is to synchronize the data in the Analytical Workspace.

This operation is performed automatically for specific changes: inserting, modifying and/or deleting metadata—such as a dataset field, a type, AW parameters, or DTP loops—thus allowing the user to work with Ask AI without having to worry about manually synchronizing the data.

IMPORTANT: it is necessary to perform this operation manually in all cases where the environment or Analytical Workaspce is imported or in the case of Disaster Recovery. (Application Database > Navigation Panel > Analytic Information Hub > action menu on workspace tile > Ask AI: sync DTP settings)

Chat Ask AI

IMPORTANT: The Ask AI button is only visible if the user function 0004268 - DTP AskAi Assistant is enabled.

When enabled, the button is only active in the DTP operation and matching fields pages. From both pages, you can use the chat to submit requests related to the 2 use cases: Data model information and From Text to SQL.

The user's request can be entered either manually or by voice command.

When the user's request, entered either manually or by voice command, is sent, the answer is displayed in the chat after being processed. For further details see Working with Chat Ask AI

IMPORTANT: the definition of the data model directly determines the quality of Ask AI chat responses.

When defining the Analytical Workspace, it is therefore important to avoid ambiguous objects, with non-intuitive descriptions, or which refer to system concepts (ex: avoid fields and descriptions referring to system keywords such as 'SOURCE' or 'TARGET').

Data model information

Through the Ask AI chat, the user can make enquiries about the definition of the data model of the Analytical Workspace they are working on, as well as about system parameters or F_ functions related to the Unified SQL syntax. SeeUnified SQL Syntax

The application context for the submitted requests is determined by the operation selected on the page.

Requests in the chat must always refer to the dataset for which information is being requested, using expressions such as 'from the source dataset', 'from the reference dataset', and so on. If the dataset is not specified in the request, the Ask AI chat will retrieve the information from the target dataset of the operation.

Example 1 - Questions on dataset definition

The user can ask questions about the fields in the target dataset of the activity to which the operation belongs, or about the source dataset or the reference dataset of the operation.

Questions of this kind can help when defining SQL filters or matching fields, without the need to open the dataset definition page for the analysis.

Element Description
Give me the text type fields of the source dataset the list of the first 10 field codes of text type, defined in the source dataset, separated by commas.
Give me the description of the FIELD_1 field FIELD_1: field description 0 FIELD_1

IMPORTANT: Ask AI can work by similarity, attempting to retrieve the best match for the given request. This means that if the user makes a typo in the code — for example, entering FIEELD_1 instead of FIELD_1 — the system will still try to detect the best match and suggest the FIELD_1 field. However, it is up to the user to validate the answer provided by the chat.

Similarly, if other fields with similar code exist in the dataset, e.g. FIELD_11 or FIELD_12, the chat will provide a list of those fields.

Example 2 - Questions on AW parameters

The user can ask questions about the parameters defined at the Analytical Workspace level, without having to navigate to their definition page.

The user can refer to these parameters with expressions such as 'parameter AW', 'parameter @', or '@PARAM_NAME@'.

If... ...then

Example 3 - Questions on system parameters

The user can ask questions about system parameters, referring to them with expressions such as 'system parameter', 'context parameter', 'parameter #', '#PARAM_NAME#'.

If... ...then

Example 4 - Questions on F_ functions

The user can make enquiries about the F_ functions used to write SQL formulas with unified syntax; see Unified SQL Syntax

If... ...then
Give me the unified syntax of the isnull Ask AI returns: F_NVL(FIELD, VALUE)
Give me the translation of F_ISNUMERIC for Postgres db Ask AI returns: F_ISNUMERIC(expression): CASE WHEN %1$s ~ '^(-)?\d+(.\d+)?(\,\d+)?$' is true THEN 1 ELSE 0 END
Give me the translation of F_SUBSTR Ask AI returns the translation of the function in the syntax of the current DB vendor.

From Text to SQL

Through the Ask AI chat, the user can make requests on the definition of mathematical formulas, SQL formulas, filters, run conditions, combining dataset fields, F_ functions, AW and system parameters.

The user’s request, expressed in natural language, is interpreted by the Ask AI chat, which retrieves the best matches among dataset codes, parameters, and functions.

The application context for the submitted requests is determined by the operation selected on the page.

Requests made through the chat must always refer to the dataset for which information is requested, using expressions such as 'from the source dataset', 'from the reference dataset', etc. If no dataset is specified in the request, the Ask AI chat will retrieve the information from the target dataset of the operation.

Example 5 - From Text to SQL

If... ...then
When the product is in the 'A' and 'B' list, then divide the price by 100 otherwise apply the discounted price Ask AI returns: CASE WHEN PRODUCT IN ('A', 'B') THEN PRICE / 100 ELSE DISC_PRICE END Where the fields mentioned in the formula are the best matches identified by the chat, corresponding to the descriptions provided in the request. Note: Superscripts are required to indicate text strings to avoid ambiguity with any fields in the dataset.
Multiply the price by the difference between 1 and the discounted price Ask AI returns: (PRICE * (1 - DISC_PRICE)) Where the fields mentioned in the formula are the best matches identified by the chat, corresponding to the descriptions provided in the request.
Apply condition when parameter # scenario contains 2025 Ask AI returns:F_INSTR('#SCENARIOS#', '2025') > 0

Note: the system always tries to construct formulas using a unified syntax, ensuring that the formula is independent of the current database. If the user wishes to use the syntax specific to the database in use, they must indicate in the request that F_ functions should not be used (e.g.: 'Apply condition when parameter # scenario contains 2025; do not use F_').

IMPORTANT: For all the above-mentioned use cases, if the Ask AI chat fails to identify the objects referenced by the user, it will provide an explanatory response indicating which information is missing.

Example 6 - Information Not Found

If... ...then
Give me the description of the FIELD_1 field of the source dataset If the mentioned field is not available in the source dataset, Ask AI returns a message such as: The field 'FIELD_1' is not present in the available data. Note: the answer will be given in the same language as the question.

Error Management for Ask AI

When using Ask AI, there may be instances when a response cannot be obtained. In such cases, error messages are displayed to help better understand the problem that has occurred.

Example 7 - Error Messages

If... ...then the system displays the error message:
the DTP project for Ask AI has not yet been populated with data from CCH Tagetik "The data used in the DTP parameterization are not synchronized. Please perform synchronization to continue using Ask AI"