Infoworks AI
Infoworks AI Product Documentation

Creating a Knowledge Graph

Step 1: Create Knowledge Graph

  • Knowledge Graph Name: Input field for entering the name of the new knowledge graph.
  • Data Warehouse: Dropdown menu to select the associated data warehouse.
  • Description: Input field for providing a brief description of the knowledge graph.
  • Save Button: Button to save the new knowledge graph.

Step 2: Upload Knowledge Files

  • File Type: Dropdown to select the type of file being uploaded.

    • SQL Library: Contains golden SQL that can be included in the knowledge base. The file must be in *.sql format.

      • NOTE The description for a Golden SQL is required and should serve as the prompt corresponding to the Golden SQL. For example, if the description of an SQL file named customer.sql is 'get all customer data for the north region,' and the user provides a similar prompt in the project, the query in the file will be returned.
    • Data Dictionary: The description of the columns in the tables within the connection.

      • Format: The file must be a CSV file with the following header: (table_catalog, table_schema, table_name, column_name, description).

      • NOTE Uploading the data dictionary file will initiate a background process that applies the descriptions in the uploaded file to the existing tables in the data warehouse.

        • Automatically populate missing table and column metadata: When uploading a data dictionary, this checkbox will appear above the Save button. When enabled, this feature instructs the AI to automatically generate descriptions for any table columns that are missing definitions in the data dictionary. This applies to any table in the warehouse's schema that has one or more records in the data dictionary.

        • Example: If the PRODUCTS table has four columns, and three of them are defined in the dictionary, Infoworks AI will generate a description for the fourth column. However, for another table in the schema, such as STATE_REGIONS, if there are no records in the dictionary, no definitions will be generated.

    • Business Definition: These contain meaningful business metrics that provide context for the actual tables and columns.

      • Format: The business definition file must include the following three values: (Full Name, Name, Definition).
  • Description: Input field to provide a description of the uploaded file.

  • Add Knowledge Graph Files: Click the 'Choose a file' button to select the file for upload.

  • ** Your Knowledge Files:
    • Displays a list of uploaded files, including details such as file name, description, file type, and date uploaded. This section also includes a status indicator showing the job status triggered by the last uploaded file.

Best Practices

  • Comprehensive Knowledge Graph: For best results, build a comprehensive knowledge graph by uploading detailed business definitions, data dictionaries, and golden SQLs.
  • Sample Files: Utilize sample data dictionaries, business definitions, and SQL provided to ensure proper format and structure.