Database
Data management (database)
Positioning: “Space Database” supports the questioning of data types. After the user uploads/binds a database, the robot is able to query, count and analyze the uploaded data;
Each robot can only bind one database at present;
Multiple data files can be uploaded in the database (no limit on the number for the time being);
1.1 Database Configuration
1.1.1 Create a database
Entry:
Click “Space Resource Library” - “Space Database” on the left bottom menu after user login.

Operation: “+Create Database” on the upper right side.



Supported Forms:
Currently support “Local Upload” and “Online Connection” two database creation method.

1.1.1.1 Local upload for new database
Upload local excel, csv format data table to create a database, after successfully created, can be visualized in the “space database”.
Database name: Users fill in the database purpose according to their actual personal needs;
Database description: Additional details. Enable the robot to interpret the database more accurately, improve the response rate and retrieval accuracy. For example: the database is used to include customer lists, sales orders, inventory count.

Data Table Upload Entrance:
“Upload Table” on the upper right side / “Go to upload” in the middle of the interface.

Upload Requirements:
Support format: excel/csv.;
Only support uploading 1 file at a time, multiple files need to be uploaded in several times;
Each file only supports the first sheet worksheet;
The size of a single file does not exceed 20 M; not more than 100,000 rows, 20 columns.

Data table parsing:
Data Table Name: users name the data table according to their individual needs;
Data Table Description: additional data table details; E.g. This table shows product information data and contains four fields, namely: product name, price, category and stock.
Field Configuration: show the fields and information parsed from the uploaded file;
Field Description : describes the field usage. Helps to optimize data analysis results.
Allow Null: When Allow Null is on, the whole data will be written when the field is empty; otherwise, the whole data will not be written.

Data table batch import/data export: you can perform data batch upload/data export operation after the data table is uploaded successfully.
Batch Import:
The column fields and data types of the batch imported data need to be consistent with the current data table configuration, otherwise it cannot be uploaded.
Export Data:
Uploaded data files can be exported in xlsx format in the web side - download list.


Data table detail view: Click on the blue table header name to view the data details.


Data Table Single Data Edit: Supports the modification and deletion of a single piece of data within a data table.
Modification: Change the details of a single piece of data.


Delete
Delete a single piece of data (set up a secondary pop-up window to effectively prevent false touches).


1.1.1.2 Online connection for new database
Database name: users can name the database according to their personal needs;
Database description: fill in the database purpose, which helps to improve data management efficiency and quality, enhance robot autonomy, and optimize decision support;
Database type: currently supports MySQL, PostgreSQL, SQL Server, Oracle.

1.1.2 Database editing
Entry:
Click “Space Resource Library” — “Space Databases” — Right footer of the database to be edited— "Edit"

Editable contents:Database Name,Database Description

1.1.3 Database deletion
Entry:
Click “Space Resource Library” — “Space Databases” — Right footer of the database to be edited— "Delete"

Path:
Click on "Delete" → a confirmation pop-up window for secondary deletion appears (to prevent accidental touching) → the user manually enters the words ‘Confirm Deletion’ to complete the deletion → a ‘Deleted Successfully’ prompt appears → the deletion is completed.


1.2 Binding database
After the database is created, you can bind the database to a specific robot. Currently, one robot only supports binding one database.
Entry: Click “Database” on the right side of the robot configuration page to bind;
Effect: After binding a database, ask a question to the robot, and the robot will retrieve the database automatically.



1.3 Database settings
1.3.1 Entry
On the spatial database page, click on any database card to enter the data list page of that database. On the data list page, click on [DB Config] in the left-hand menu to access Database Settings .


1.3.2 Data Table Retrieval

1.3.2.1 Initial Retrieval
Preliminary search and screening the data in the database, so that the Agent quickly locates the data records that meet the basic conditions. It provides the basis for further data processing, analysis and query. As an important antecedent step, Initial retrieval can effectively improve query efficiency when dealing with large-scale data.
1.3.2.1.1 Ratio
Clarification:
Setting the percentage of Initial Retrieval.
The left side shows the percentage of semantic retrieval and the right side shows the percentage of keyword retrieval;
semantic retrieval
(1) Meaning:
A search based on semantic understanding. Not only focuses on the input keywords, but also tries to understand the semantic meaning behind them and their relationship with the context, in order to return results that are more in line with the intent;
(2) Applicable Scenarios:
Suitable for scenarios that require understanding of intent and return more accurate results.
keyword retrieval
(1)Meaning:
A search based on text matching. By looking for direct occurrences of the keywords entered in the database to return relevant results. Means ‘literal matching’.
(2)Applicable Scenarios:
Suitable for the need to quickly find the contents of specific words, high speed requirements and semantic understanding of the scene is not complex.
Scope:
Semantic retrieval percentage + keyword retrieval percentage = 100%, any percentage can be 0;
Default value: semantic search percentage = 30%, keyword search percentage = 70%.
1.3.2.1.2 Quantity
Clarification:
A setting is made for the total number of initial retrievals (number of semantic retrievals + number of keyword retrievals). Means set on how many data tables will be taken for further reordering for the initial retrieval.
Scope:10-50 (integer), default value 20.
1.3.2.2 Re-ranking
1.3.2.2.1 Re-ranking Model
Clarification:
Settings for the model used for re-ranking, currently three models are supported in the dropdown box.

Scope
The [bge-reranker-large] model is supported by default.
1.3.2.2.2 Relevance Threshold
Clarification
Configure a threshold for data table retrieval relevance above which the database Q&A process is triggered.
Scope
0-1, default value is 0.3.
1.3.2.2.3 Maximum number of retrieved data tables
Clarification
The maximum number of data tables taken from the database at a time that satisfy the threshold, i.e., the upper limit on the number of data tables given to the big model to process
Indicates the maximum number of datasheets at a time that an intelligent body can take and answer
Scope
1-10, default value is 3.
1.3.3 Q&A example retrieval

1.3.1.1 Initial Retrieval
1.3.1.1.1 Ratio
Clarification:
Setting the percentage of Initial Retrieval.
The left side shows the percentage of semantic retrieval and the right side shows the percentage of keyword retrieval;
semantic retrieval
(1) Meaning:
A search based on semantic understanding. Not only focuses on the input keywords, but also tries to understand the semantic meaning behind them and their relationship with the context, in order to return results that are more in line with the intent;
(2) Applicable Scenarios:
Suitable for scenarios that require understanding of intent and return more accurate results.
keyword retrieval
(1)Meaning:
A search based on text matching. By looking for direct occurrences of the keywords entered in the database to return relevant results. Means ‘literal matching’.
(2)Applicable Scenarios:
Suitable for the need to quickly find the contents of specific words, high speed requirements and semantic understanding of the scene is not complex.
Scope:
Semantic retrieval percentage + keyword retrieval percentage = 100%, any percentage can be 0;
Default value: semantic search percentage = 30%, keyword search percentage = 70%.
1.3.1.1.2 Quantity
Clarification:
A setting is made for the total number of initial retrievals (number of semantic retrievals + number of keyword retrievals). Means set on how many data tables will be taken for further reordering for the initial retrieval.
Scope:10-50 (integer), default value 20.
1.3.3.2 Re-ranking
1.3.3.2.1 Re-ranking Model
Clarification:
Settings for the model used for re-ranking, currently three models are supported in the dropdown box.

Scope
The [bge-reranker-large] model is supported by default.
1.3.3.2.2 Relevance Threshold
Clarification
Configure a threshold for data table retrieval relevance above which the database Q&A process is triggered.
Scope
0-1, default value is 0.5.
1.3.3.2.3 Maximum number of retrieved Q&A pairs
Clarification
The maximum number of Q&A pairs taken from the Q&A training pool each time that satisfy the threshold, i.e., the upper limit on the number of Q&A pairs that are given to the big model for processing;
Indicates how many question-answer pairs are taken by the intelligences at a time and answered based on them.
Scope
1-10, default value is 3.
1.4 Q&A Training
Positioning
The database's Q&A training supports the writing of SQL code for specified questions, a feature that transforms raw data into actionable and customisable business insights, providing users with a more flexible and efficient way of interacting with data to meet complex queries and advanced analytical needs. This feature improves the adaptability and scalability of intelligences to meet the precise data analysis needs of different users for different industries, which can help enterprises achieve more efficient data-driven decision-making.
Entry
Space database page, click on any database card to enter the data list page of the database, data list page click on the left list [Q&A training] to enter the Q&A training page;


1.4.1 Single Q&A Training
1.4.1.1 Add Single Q&A Training
Entry:
When there's no Q&A training data, you can add a new Single Q&A Training by [Click add] in the middle of the page or [+Add] in the upper right corner of the page;
When Q&A training data is not empty, you can add a new Single Q&A Training by [+Add] in the upper right corner of the page;

Question:User-entered text question, e.g. Data query instruction: ‘Precise query for customers with declining sales in Q4 2023’. Up to 2,000 characters;
Answer: The user's ideal, SQL query-like statement (SELECT) for the question;
Status: On by default. Turn on button, the Q&A training takes effect for the Agent dialogue when successfully added; Turn off button does not enable this training for the Agent.

1.4.1.2 Edit Single Q&A Training
Entry:[Q&A Training] - Actions - [Edit]

Supports secondary editing of training questions, answers, and status.

1.4.1.3 Delete Single Q&A Training
Entry:[Q&A Training] - Actions - [Delete]

Secondary Confirmation: After the user clicks [Delete], a confirmation of deletion pop-up window will appear, click [Confirm] to complete the deletion to prevent accidental touches.


1.4.2 Batch QA training
1.4.2.1 Batch import of Q&A training
Entry:
[QA training] - [import]

Training data import requirements:
The size of a single file ≤ 20M;
Each file only supports the first sheet. 3;
It is recommended to remove the weight before uploading.

1.4.2.2 Batch export of Q&A training
Entry:
[QA training] - [Export]

Export format:
the title contains three parts: question, answer, and status.

Limitination: Supports exporting up to 10w Q&A pairs.
1.5 Q&A effect display Robot Data Q&A currently supports:
Visualization results display: charts (bar charts, line charts, pie charts), tables, SQL;
Single table/multi-table Q&A display.
1.5.1 Visualization
Currently three forms of visualization are supported: charts, tables and code (SQL).
1.5.1.1 Chart format
Charts can be copied and downloaded in the upper right corner;
Note: Chart display may not appear every time, the big model will filter the data suitable for generating charts for visualization;
The bottom of the dialog box generates a text summary;
Chart form: currently supports three forms: bar chart, line chart and pie chart, the initial default graph is bar chart.
Bar Chart: centered display of metric content.

Line Chart:
The content of the measure is displayed in the center, and when there are multiple lines in a chart at the same time, the colors of the lines will be clearly differentiated.

Pie chart: the graph will be displayed in the center.

1.5.1.2 Table
A table header is displayed in the first row and a summary is generated at the bottom of the dialog box.

1.5.1.3 SQL forms
SQL statements output in the form of code blocks are supported to run;

1.5.2 Single/multi-table forms
1.5.2.1 Single-table Q&A
The robot looks up information in one table to answer user's question.

1.5.2.2 Multi-table Q&A
The robot looks up information in multiple data tables and handles correlations between multiple tables in order to answer the user's questions.

Last updated