Table management

Updated at:

This topic covers the concept and capabilities of table Q&A, including configuration entry points and the scope for various data tables.

Configuration entry points and scope

Scope

You can add data tables on the table management page of a knowledge base within a business space or a bot space. Data tables added in a business space apply to any bot they are bound to within that space. Data tables added in a bot space apply only to that specific bot but are also synchronized to the business space, where other bots can bind and use them.

Configuration entry points

In your business space or bot space, navigate to knowledge base > table management. From there, select data table management or data source management to open the respective management page. For detailed configuration steps, see regular data table, document information table, and MySQL data source management.

Features

Table Q&A intelligently answers questions about your tabular data that involve query and inference. From a technical perspective, this feature uses natural language processing (NLP) to convert a user's question into an SQL statement. The system then executes this statement on the relevant table data to perform a query and inference, and uses the results to generate an answer. The following figure illustrates this process:

image.png

Use cases

The table Q&A feature is ideal for scenarios where user questions can be answered by querying large sets of tabular business data. The following table shows typical use cases:

Existing tables

Attribute query and inference

Databases

  • You have existing business tables.

  • You have table-like data that can be easily converted into tables.

  • You can create tables after a quick review and cleanup of your data.

  • You need single- or multi-instance and single- or multi-attribute query capabilities.

  • You need inference capabilities such as finding min/max values, making comparisons, and sorting grouped data.

  • You have very large datasets (millions of rows).

  • Your table data is updated frequently.

In these scenarios, you can enable automated responses by simply importing your tables. You can further improve performance by optimizing the Q&A settings.

Key capabilities

Table Q&A supports the following core capabilities:

Capability

Description

Example

Single- or multi-column query

Queries data from one or more columns.

List the names and prices of items with fuel consumption greater than 8 and power less than 200.

Aggregate function query

The SELECT clause supports various aggregate functions, including: COUNT, SUM, AVG, MAX, and MIN.

What are the records for the gold prize, and what is the latest award date?

Value comparison

The WHERE clause supports comparison operators, such as equal to (=), greater than (>), less than (<), and not equal to (!=).

For bachelor's degrees, what is the number of applicants if the number of approved candidates is greater than 20 and less than 30?

Multiple conditions

The WHERE clause supports combining multiple conditions by using the AND or OR operators.

What is the total reservoir capacity in the Yangtze River and Pearl River basins?

Automatic column completion

When querying with the "column_name = value" format, you can omit the column name.

Which students are in computer science or have excellent grades? What are their student IDs?

Generalization

Column names used in a question do not need to exactly match the column names in the table.

Which SUVs have fuel consumption less than 5?

TOP N

Finds the top or bottom N records based on a specified order.

What were the top 10 provinces for sales in 2023?

Month-on-month

Compares data from the current period with the previous period.

By how much did the total sales for the dealer Mao Long grow month-on-month in the first quarter of this year?

Year-on-year

Compares data from the current period with the same period in the previous year.

By how much did the total sales for the dealer Mao Long grow year-on-year in the first quarter of this year?