Table of contents
Official Content
  • This documentation is valid for:

Here is a step-by-step guide on how to use Chat with Data Assistant and start chatting with the assistant from the Playground Interface.

Step 1: Generate the metadata

The first step in configuring the Chat with Data Assistant is to generate the metadata required for its operation. This metadata contains information about the database schema. That is, the list of all tables with their fields, the relationships between them, table and field descriptions, data types, etc.

You must ensure that the table and field names are descriptive and representative so that the assistant can generate efficient queries using the metadata information. For example, a table named Table001 with fields named Field001, Field002, etc. will not provide a clear identification that it contains country information, even if this information is present in the table.

If your table or field names are not descriptive enough, you can include additional table and field descriptions in the assistant prompt. However, these descriptions must be equally clear and representative to ensure proper understanding of the information.

You will have two options available to generate the necessary metadata, depending on whether the database was created with GeneXus or is external.

Read more at How to generate metadata for the Chat with Data Assistant.

Database created with GeneXus

If the database was created with GeneXus, this process is carried out using the GXquery extension, which generates the corresponding Knowledge Base metadata. This extension is obtained directly from the GXquery installation directory. More information at HowTo: Install the GXquery extension.

For more information on how to create the metadata, please visit the following links: HowTo: Create GXquery metadata in GeneXus, HowTo: Export metadata in GXquery.

External database

In the case of an external database, you can use a command line tool to generate the necessary metadata. This tool uses reverse engineering to connect to the database and generate the corresponding metadata.

When running this tool without parameters, a list of the options that can be configured is displayed. Once the metadata is generated, it is saved as a file with .export extension.

Step 2: Create Chat with Data Assistant

Enter the Globant Enterprise AI Backoffice. On the left side of the screen, you can find the Backoffice menu. In this menu, click on Assistants, and then click on CREATE CHAT WITH DATA ASSISTANT.

Next, in the Project dynamic combo box, select the project you want to work with (in this case, Default(DocumTeam) is used).

ChatWithDataAssistant_314

In the window that is displayed, select the Add files option by clicking on the + Add files... button and load the .export file obtained in the previous step. Then click on SAVE to complete the process.

ChatWithData Assistant1

This will open a popup window to enter the Name and Description of the assistant. You can also add a file for Icon by clicking on +Add files...

After entering the required information, click on CONFIRM to save all changes.

ChatWithData Assistant2

Step 3: Update Chat with Data Assistant

Once you have created the Assistant, go back to the Assistants page where you can select UPDATE.

ChatWithDataAssistant3_314

This option allows you to view the version identifier with which it was saved. In addition, you can change the name and description, configure it as enabled or disabled, or add an icon if you wish.

ChatWithData Assistant4

Step 4: Edit Chat with Data Assistant

To edit the Assistants, go to the Assistants home page and click on CONFIG.

ChatWithData Assistant5_314

A window similar to the one below will open, where you will have the option to make the following four edits:

  • Add metadata files, start or stop the assistant, and get the Log. This functionality is available in the General tab.
  • Enable or disable entities and attributes, set descriptions, and define the possible values of an attribute in the Entities tab.
  • Configure the database connection for the assistant in the DataStore tab.
  • Configure the metadata to be included in the queries and select the versions of the system assistants in the Settings tab.

ChatWithData Assistant6

General

In the General window, you will find the following information about the assistant:

ChatWithData Assistant7

  • Assistant Name: Displays the name of the assistant, which in this case is “ShowCase”.
  • Metadata ID: Displays the unique ID for the metadata associated with the assistant.
  • Metadata status: Indicates whether the assistant's metadata is “Stopped” or “Started”.

To interact with the assistant's metadata, you can use the following buttons:

  • + Add files...: Allows adding the .export file containing the assistant's metadata.
  • STOP: Changes the assistant's metadata status from “Started” to “Stopped”, disabling the assistant. This can be useful when you need to prevent users from continuing to make queries using the assistant while you perform a task that will cause these queries to fail; for example, if you need to take the database offline. When you have finished, you can restart the assistant using the START button.
  • IMPORT LOG: Allows you to download a log file (.log) containing detailed information about various actions in the system when importing metadata. This file records events such as inserting metadata, creating Knowledge Bases, generating the design system, and importing objects, among others.

Entities

In the Entities tab, you can view all the entities that are part of the assistant.

In this case, the visible entities are City, Continent, Country, CountryCovidData, PivotTableMetadata, and State. Each entity is listed with its name, a description, and whether or not it is enabled for queries.

ChatWithDataAssistantEntities_png

For each entity, you can:

  • Edit the description: this makes it easier for the assistant to better understand what the entity is about.
  • Enable or disable the entity to control whether the entity will be used in queries.

By clicking on the + symbol to the left of each entity, the attributes of the entity are displayed and the sign changes to -.

For example, for the City entity, the visible attributes include CityId, CityLocation, CityName, and CityPopulation, among others. For each attribute, you can perform the following actions:

ChatWithDataAssistantEntitiesAttributes_20241021164019_1_png

  • Edit the attribute description.
  • Enable or disable the attribute for queries.
  • Define the possible values that the attribute can take, if applicable. To do this, click on EDIT VALUES. This opens a window where you can define a list of valid values and their descriptions for the corresponding attribute. This list must be entered as a comma-separated sequence, using the following format: value1=description1, value2=description2, ....

Once you have made the necessary changes to the entities and attributes, you must click on the CONFIRM button to save and apply them.

Datastore

In the DataStore tab, the first thing to do is to select the type of database (DBMS) you will use. The values that the DBMS can take are SQL Server, MySQL, PostgreSQL, Oracle, and SAP Hana. It is important to note that the connection type is made through ADO.NET, which means that the corresponding libraries must be available to establish the connection.

Prerequisites

1. Database Accessibility: The database must be accessible from Globant Enterprise AI, which implies that both must be on the same network or that the database is accessible via the Internet.

2. ADO.NET Drivers Installation: If they are not installed, you will need to install the ADO.NET drivers corresponding to the type of database you are using. The drivers allow GeneXus to connect efficiently with the selected DBMS.

Configuration

1. Connection Parameters: Configure the necessary connection parameters, including:

  • Server: Name or IP of the server.
  • Database: Name of the database you wish to connect to.
  • Port: Database port number (depending on the DBMS, such as 1433 for SQL Server).
  • Authentication: Depending on the DBMS, you can require a username and password or use a built-in authentication.

You can set additional options depending on the type of database selected.

2. Test Connection button: At the end of the configuration of each DBMS option, you will find a button called “Test Connection” that will allow you to verify the connection before saving the changes.

Once you have configured the connection correctly, you can use the assistant to interact with the data stored in the selected database.

Note: This process does not require additional installations for Globant Enterprise AI outside of the ADO.NET drivers. The interface is designed to guide you through a simple connection setup.

 

Settings

In the Settings tab, you will find two sections:

ChatWithDataAssistantSettings_png

  • Metadata to include in prompt
  • System assistants

In the Metadata to include in prompt section, you can select which metadata will be included in the assistant prompts when generating queries. This option allows you to check the boxes for Descriptions, Data types, and Valid values. These options are useful if the field names are not descriptive or clear enough, so adding more metadata will help the assistant generate more understandable and accurate queries.

By checking these boxes, descriptions, data types, and valid attribute values will be included in the assistant's queries, making it easier to interpret and use the information.

In addition, in the System assistants section, you can select the versions of the system assistants to be used by the assistant by setting the Query parameter.

Once you have configured these parameters, remember to click on CONFIRM to save the changes.

Step 5: Test your Chat with Data Assistant

Finally, you can test your Chat with Data Assistant via Chat API or by selecting Playground in the left side menu of the Backoffice window:

DataAnalystAssistant11_1425_png

If you have multiple assistants created, select the one you want to interact with.

Once there, type the following message in the chat box: Display the number of patients by continent and country in a pie chart, showing the most representative ones and press Send.

The result of the query will look as follows:

Screenshot2024-12-16115105_png

The pie chart displays the number of hospitalized patients by continent and country, sorted in descending order by the number of patients.

For additional details on how to customize the output format of these queries refer to How to change the output format and filter results in Chat with Data Assistant.

Icons to interact with the query

At the bottom right of the screen, there are six icons that allow you to interact with the query and access additional information about the data being viewed.

  1. View query detail: This icon, in the shape of an eye, allows you to analyze the query that the assistant has just returned. Clicking on this icon displays a pop-up window showing the following two tabs:
    • Description: This tab shows an explanation in natural language that describes the purpose and operation of the query in a more accessible way, helping you to understand where the data displayed in the results comes from.
      Screenshot2024-12-16122106_png
    • Expression: This tab shows the structure of the executed query which shows how the query was constructed, what elements were used, and how the data was processed.
      Screenshot2024-12-16122203_png
  2. Copy assistant response: The second icon allows you to copy the current query in JSON format. This format includes details such as the name of the query, the expression used, and other parameters related to the execution.
  3. Save query: The third icon opens a window to save the current query as a preset, allowing you to save the configuration and refer to it again in the future.
  4. Regenerate answer: The fourth icon allows you to update the query by running it again.
  5. Good answer: This icon lets you mark the query's response as satisfactory.
  6. Bad answer: This icon allows you to mark the query response as inaccurate or unsatisfactory.
Last update: March 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant