Assisted Query¶
This functionality allows the Data Catalog users to generate a query by explaining their needs in their own language. This feature is available from the Assisted query tab.
Note
This feature is only available with the subscription bundle Enterprise Plus. To find out the bundle you have, open the About dialog of the Design Studio or the Administration Tool. See more about this in the section Denodo Platform - Subscription Bundles.
Important
Prior to using this feature, you will need to configure both the AI Integration API Configuration and the AI Integration Assisted Query Configuration
In this section we will see:
How to generate a query.
How to execute the generated query.
Generating a Query¶
In this section, the process of generating a query is going to be introduced.
The Assisted query tab lets you explain your needs in natural language via the Natural language query input. Providing more details not only refines the search results but also elevates the quality of the displayed information. This extends also to the metadata of the view. This data is sent including, among other details, the following:
The name of the view.
The name of the view’s database.
For each field, the following information:
The name of the field.
The logical name of the field if it is configured.
The type of the field.
The description of the field.
Information regarding if the field is a primary key.
Information regarding if the field is nullable.
If the data usage is enabled, data samples of the view are also included.
The description of the view.
For each direct association, the same information as for the view.
Warning
Generating a query will send metadata information to the LLM. Only if the data usage is enabled, data of the view is also going to be processed and sent to the LLM in order to improve the results. Make sure your organization is aware and agrees on this.
Data Catalog collects and sends the metadata of Denodo views to the LLM for processing. Only if the data usage is enabled, data of the view is also collected and sent. This metadata includes information such as view names, view descriptions, field names, field descriptions, data types, and relationships.
If a view contains too much information, some of the view’s information may need to be excluded before being sent to OpenAI or Azure OpenAI Service to avoid exceeding the token limit supported by the model. Please note that excluding such details may impact the accuracy or completeness of the response provided. In extreme cases this may cause the generation process to stop. When these situations occur a suitable notification will be shown.
Note
The Natural language query input accepts text to a maximum of 1000 characters.
Once the Natural language query input is set there are two options to generate the query depending of the configuration of the execution mode: manual or automatic.
Generation with Manual Execution Mode¶
If the execution mode is set to manual, the Generate button will have to be clicked in order to generate the query.
The Automatically generated query and the Query explanation fields will be then visible. Once this action is done, the option to open the generated query in the VQL Shell will be available via the Open in VQL Shell button.
Note
The Open in VQL Shell action will append the generated query to whatever VQL you had previously introduced in the VQL Shell. This is done to prevent the loss of information.
Generation with Automatic Execution Mode¶
If the execution mode is set to Automatic, the Generate and execute button will have to be clicked. This also executes the generated query.
Executing the Generated Query¶
Two options are possible to execute the query depending of the configuration on the execution mode: manual or automatic.
Execution with Manual Execution Mode¶
When the manual execution mode is configured, the Execute button will have to be clicked. Once the query execution has finished, the results will be shown in the Query result table at the bottom of the tab.
Execution with Automatic Execution Mode¶
When the automatic execution mode is configured, no action is required. When the Generate and execute button is clicked, the generated query will be executed and the results will be shown automatically in the Query result table at the bottom of the tab. Once this action is done, the option to open the generated query in the VQL Shell will be available via the Open in VQL Shell button.
Other Options¶
Once the query generation process has started you can stop it at any time pressing the Cancel button. You can also clear any result with the Clear all button.
Assisted Query Role¶
To use the Assisted Query feature the user has to have the data_catalog_assisted_query
role. See the Default Roles section for more information.