Adding DB description

As we enhance our Large Language Interface (LLI) for user data interaction, providing a database description as part of the prompt helps the LLI backend understand the database schema more effectively, avoiding confusion caused by abstract table or column names.

To achieve this, our project team can provide a standard DB description file.

The general standard for descriptions is currently flexible, due to the lack of industry standards and the evolving nature of the framework. However, there are some limitations we need to be aware of, for example:

  1. Wording: We suggest a maximum of 30 words for each description field

  2. Format: In refining the LLI approach, we aim to minimize the need for backend team adjustments regarding the format provided. Thus, we will specify the required description in two main parts as follows:

    • Table description: It mainly describes the meaning of each table in case there are similar table names across the DB. Table description can be written by providing more background of the table’s purpose, or even indicate what value is stored in this table

    The standard format will be "Table name": {"description": "description of table"}

    • DB Column description: It describe the column of each table, with the full name of the column(if applicable)

    The standard format will be “Column name”: <full name of the column>, DESC: <short description>

This is the format of the db description json:

{
    "tables": [
        {
            "table name": "INSERT TABLE NAME",
            "description": "INSERT TABLE DESCRIPTION",
            "columns": [
                {
                    "Column": "INSERT COLUMN NAME",
                    "DESC": "INSERT COLUMN DESCRIPTION"
                },
                {
                    "Column": "INSERT COLUMN NAME",
                    "DESC": "INSERT COLUMN DESCRIPTION"
                }
            ]
        },
        {
            "table name": "INSERT TABLE NAME",
            "description": "INSERT TABLE DESCRIPTION",
            "columns": [
                {
                    "Column": "INSERT COLUMN NAME",
                    "DESC": "INSERT COLUMN DESCRIPTION"
                },
                {
                    "Column": "INSERT COLUMN NAME",
                    "DESC": "INSERT COLUMN DESCRIPTION"
                }
            ]
        }
    ]
}

Last updated