Example of a Conversation with Data Science Agent

This example demonstrates how Data Science Agent supports a data analyst in exploring a dataset, and in building and evaluating a machine learning model. It also shows the effectiveness of Natural Language to SQL (NL2SQL) in Data Science Agent.

The user runs a complete machine learning workflow using natural language. The conversation between the user and Data Science Agent progresses from generic questions on data exploration in the OMLUSER schema to specific ones on model training, model building and scoring. Broadly, the conversation flow can be categorized into these sections:

Highlights:

This example highlights the following capabilities of Data Science Agent:

1. Goal and context setting

For every new conversation, Data Science Agent opens the chat interface with some important tips for you. Get started to interact with the agent with a prompt that sets your goal and context for the conversation. Start the conversation with an introduction with specific information to set the goal and context.

Prompt 1: I'm an analyst with no formal ML background. Using the tables added here as Associated Objects, explain the data and how to frame this as a machine learning problem.

Figure 1: Goal and context setting

Description of the illustration ml-prompt-01.png

Agent’s response:

Figure 2: Prompt 1 and response

Description of the illustration grok-res-01a.png

Figure 3: Response 1 (concluded)

Description of the illustration grok-res-01b.png

2. Data Science Agent explores the dataset

Here, let’s explore the dataset.

Prompt 2: Show some basic statistics about the data.

Agent’s response: Data Science Agent responds to this prompt in a structured format. It provides the following information:

Figure 4: Prompt 2 and response

Description of the illustration grok-res-02a.png

Figure 5: Response 2 (contd.)

Description of the illustration grok-res-02b.png

Figure 6: Response 2

Description of the illustration grok-res-02c.png

3. Data Science Agent explains how to use the data to frame a machine learning problem

Prompt 3: Explain how to frame this as a machine learning problem to predict subscription likelihood. Explain the target variable and the possible input features.

Agent’s response: Data Science Agent provides a point-wise explanation of how to frame the question as a machine learning (ML) problem.

Figure 7: Prompt 3 and response

Description of the illustration grok-res-03a.png

Figure 8: Response to prompt 3 (concluded)

Description of the illustration grok-res-03b.png

4. Data Science Agent creates a single modeling table

Prompt 4: Yes. Show the exact joins to create a single modeling table.

Agent’s response:

Figure 9: Prompt 4 and response

Description of the illustration grok-res-04a.png

Figure 10: Response 4 (concluded)

Description of the illustration grok-res-04b.png

5. Data Science Agent performs feature validation and modeling

Prompt 5: Proceed with feature validation and modeling.

Agent’s response:

Figure 11: Prompt 5 and response

Description of the illustration grok-res-05a.png

6. Data Science Agent performs data split, model training and model evaluation

Data Science Agent uses the view DSAGENT$MODELING_DATA_CLEAN_A6CB for data split. It splits the data into 70% training, 10% validation and 20% test.

Prompt 6: Proceed with splitting the clean view into training, validation, and test sets. Then start training the models.

Agent’s response:

Figure 12: Prompt 6 and response

Description of the illustration grok-res-06a.png

Figure 13: Response 6 (contd.)

Description of the illustration grok-res-06b.png

Figure 14: Response 6 (concluded)

Description of the illustration grok-res-06c.png

The final model OMLUSER.DSAGENT$SUBSCRIPTION_MODEL_A6CB is also listed on the Models page, as shown in the screenshot here:

Figure 15: DSAGENT$SUBSCRIPTION_MODEL_A6CB model listed on the Models page

Description of the illustration grok-model-ui-1.png

7. Data Science Agent performs scoring to predict likelihood of subscription

Data Science Agent uses the model DSAGENT$SUBSCRIPTION_MODEL_A6CB to predict the likelihood of subscription.

Prompt 7: Use the model to score the 100 prospects in the PROSPECTS table

Agent’s response: Data Science Agent performs scoring on 100 prospective clients in the PROSPECTS table.

Figure 16: Prompt 7 and response

Description of the illustration grok-res-7aa.png

Figure 17: Prompt 7 response (concluded)

Description of the illustration grok-res-07b.png