Introduction

Heatwave AutoML is super simple to use, and now we are introducing another feature for ease of use called NL2ML (or Natural language to machine learning) which provides step by step guidelines on how to use ML for a particular business problem. NL2ML is a natural language interface that simplifies user interactions with Heatwave AutoML. This feature enables users to ask general questions about Heatwave AutoML, generate AutoML SQL queries, and leverage various capabilities of Heatwave AutoML using natural language. With simple natural language commands, users can train machine learning (ML) models, call predictions, generate explanations, and unlock the full potential of Heatwave AutoML. NL2ML is a valuable resource for both experienced ML practitioners and novice users as it eliminates the need for proficiency in SQL coding or ML concepts.

NL2ML can be used in the following ways:

  • ❓ Users can ask general questions about Heatwave AutoML.
    • Users can interact with NL2ML to ask questions directly, eliminating the need to manually read through the Heatwave AutoML User Guide.
  • 🛠️ Users can generate AutoML queries that they can copy and execute.
    • Using natural language interactions, user can generate queries to:
      • Train a machine learning model
      • Do predictions on a table / row
      • Explain a model or predictions
      • Run Generative AI operations such as retrieval augmented generation

Motivation

While Heatwave AutoML offers simple SQL commands, users must still (a) review the documentation, and (b) determine the appropriate AutoML task (e.g., regression, classification, recommendation) for their specific use case. This can be challenging for novice users. Secondly, if a Heatwave AutoML query fails, users need to debug the failure themselves by reading the error logs or by creating a support ticket which may require significant amount of time.

An ML assistant tool can alleviate these challenges and enhance productivity for novice users. Here, we introduce our novel tool, NL2ML, for assisting users with any inquiries related to Heatwave AutoML. NL2ML is a natural language interface that streamlines user interactions with Heatwave AutoML. This feature allows users to ask general questions about Heatwave AutoML, generate AutoML SQL queries, and leverage various capabilities of Heatwave AutoML using natural language. It makes it easy to use Heatwave AutoML for both experienced ML practitioners and novice users. NL2ML is created using the Generate AI capabilities of Heatwave, and it is supported since MySQL HeatWave 9.4.0.

Use-case scenarios

NL2ML targets three use case scenarios described below:

  • Scenario 1
    • User has an understanding of how to apply ML to their problems, but lacks experience with HeatWave AutoML specifically
    • The user has a thorough understanding of their data structure, including schemas, tables, target columns, and other relevant components.
  • Scenario 2
    • Same as Scenario 1, but with the added complexity that the user is unaware of the specific data, training table, and target column relevant to their query
    • NL2ML should identify schemas, tables and target column that closely match user’s query
  • Scenario 3
    • A business user with limited or no experience in Machine Learning (ML) seeks to harness its potential to enhance business outcomes and drive growth


Scenarios 1 and 2 are fully addressed by NL2ML. Partial support for scenario 3 is available in the version 9.4.0, with full support planned for future releases.

Examples

A common use case in food delivery business is to predict for delivery times. Let’s explore how NL2ML can help a user with this task.

Here are relevant tables within the mlcorpus schema:

 
The first step is determining the SQL for training a model:

The second step is model deployment:

Next we need to evaluate the model:

And lastly perform inference, i.e. make predictions:

We can optionally ask the model for explanations about the inference:

The NL2ML procedure has other uses too. Here are some additional examples.

General Questions:

Debugging:

Schema Retrieval in NL2ML

AutoML queries require a set of arguments related to user data such as schema, table and target column names. If the user does not pass such info in their natural language query, NL2ML needs to identify this info automatically. Schema retrieval is used to find the most similar schemas and tables to user’s natural language query using a vector store based approach. For instance, consider three tables in the mlcorpus schema that relate to distinct domains. NL2ML can automatically determine the most suitable table for generating an AutoML training query, as demonstrated below:

Chat Capability of NL2ML

Users may have follow-up questions related to their previous inquiries. To support this functionality, the chat history is stored in the @nl2ml_options session variable, allowing NL2ML to contextualize and accurately interpret follow-up questions. For instance, consider the following sequence of questions: “What is the purpose of a task in ML_TRAIN?” and “Can you provide an example of using that?” Thanks to its preserved chat history, NL2ML can intelligently understand the user’s reference to “that”, providing a more coherent and responsive interaction.

Limitations

Under the hood NL2ML leverages OCI Generative AI models and hence is currently only supported in regions where these models are available.

Scenarios 1 and 2 (explained is Use case Scenarios Section) are fully addressed by NL2ML. Partial support for scenario 3 is available in the current versions with full support planned in future releases.

Conclusion

In conclusion, NL2ML enhances the user experience of Heatwave AutoML by providing a natural language interface that simplifies interactions and eliminates the need for proficiency in SQL coding or ML concepts. This innovative tool addresses the challenges of navigating long documentation, determining the appropriate AutoML task, and debugging query failures, making it an invaluable resource for both novice users and experienced ML practitioners. By leveraging the power of natural language, NL2ML empowers users to unlock the full potential of Heatwave AutoML, effortlessly training machine learning models, generating predictions, and accessing various capabilities. As a key feature of MySQL HeatWave, NL2ML simplifies user interaction with Heatwave AutoML thereby streamlining machine learning workflows and driving business success.

Learn More

To explore additional resources and deepen your understanding of MySQL HeatWave and NL2ML, visit the following links: