-
Create Data Adapters
- Implement BigQuery adapter
- Implement Postgres adapter
- Implement MySQL adapter
-
Enhance Adapters with Metadata Retrieval
- Add functionality to fetch schema information from the adapters
- Retrieve table descriptions from the adapters
- Include creation and last modified timestamps for tables
- Retrieve table NULL and distinct value information
-
Standardize Metadata Format
- Implement a standard data format and convention for the fetched metadata
- Convert the metadata from each adapter to the standard format
-
Incorporate OpenAI GPT-4 API
- Integrate the OpenAI GPT-4 API into the project
- Prepare an engineered prompt for the AI to understand the task
-
Feed Metadata Information to AI
- Pass the standardized metadata to the AI model as input
- Utilize the metadata to enhance the AI's understanding and responses
-
Accept User Input for Query
- Develop a user interface to gather input data from the user
- Collect user-provided information to enhance AI query generation
-
Extract SQL from AI Response
- Implement functionality to extract the generated SQL from the AI's response
-
Perform Query Validations
- Develop validation logic to ensure the generated SQL meets certain criteria
- Perform syntax checks and other relevant validations on the generated query
-
Execute Query in Adapters
- Run the generated SQL query in the appropriate adapter (BigQuery, Postgres, MySQL)
- Retrieve the query results from the adapter
-
Make Results Visualization Friendly
- Format and structure the query results for better visualization
- Consider appropriate visualization tools or libraries for displaying the results
-
Display Query Results
- Present the query results to the user in a user-friendly manner
- Provide options for exporting or saving the results if needed