Skip to content

Exploring Copilot

Public preview

Warning

Note to AI team and other reviewers: this page is still undergoing a copyedit.

This article delves into the transformative use cases of Copilot, showcasing its ability to streamline workflows, enhance collaboration, and drive informed decision-making.

Use Case 1: Analyzing profit margins for high margin customers

In this scenario, let's imagine we're working with a company called xyz. We've already calculated profit by customer and product, but now we want to delve deeper and determine the profit margin on these items to identify our highest margin customers.

Objective: Calculate profit margin and identify high margin customers.

Approach: Utilize Copilot to build a pipeline using natural language commands.

    Sample Input Data

+--------------+---------------+-------------+--------------+------------+-------------+------+
| ACCOUNT_NAME | CUSTOMER_NAME | CUSTOMER_ID | PRODUCT_NAME | ORDER_DATE | ORDER_MONTH | COST |
|--------------|---------------|-------------|--------------|------------|-------------|------|
| Account 1    | Customer A    | C001        | Product X    | 2021-04-29 | 2021-04-01  | 3000 |
| Account 2    | Customer B    | C002        | Product Y    | 2021-07-30 | 2021-07-01  | 4000 |
| Account 3    | Customer C    | C003        | Product Z    | 2022-02-15 | 2022-02-01  | 2500 |
| Account 4    | Customer D    | C004        | Product X    | 2022-03-20 | 2022-03-01  | 3500 |
+--------------+---------------+-------------+--------------+------------+-------------+------+

Steps taken:

  • Step 1: Add a component to calculate profit margin and store the result in a new column called "margin."
  • Step 2: Filter rows where the margin is higher than 60%, identifying high margin customers.
  • Step 3: Further filter transactions from 2022 onwards to work with recent data.
  • Step 4: Verify the results to ensure accurate calculation and filtering.
  • Step 5: Write the results to a view named "high margin customers" for easy sharing and analysis.

Outcome: The pipeline successfully identifies high margin customers and filters transactions from 2022 onwards, providing actionable insights that can be shared across the organization for further analytics.

Sample Output Data

+--------------+---------------+-------------+--------------+------------+-------------+------+--------+
| ACCOUNT_NAME | CUSTOMER_NAME | CUSTOMER_ID | PRODUCT_NAME | ORDER_DATE | ORDER_MONTH | COST | MARGIN |
|--------------|---------------|-------------|--------------|------------|-------------|------|--------|
| Account 1    | Customer A    | C001        | Product X    | 2021-04-29 | 2021-04-01  | 3000 | 65%    |
| Account 2    | Customer B    | C002        | Product Y    | 2021-07-30 | 2021-07-01  | 4000 | 70%    |
| Account 4    | Customer D    | C004        | Product X    | 2022-03-20 | 2022-03-01  | 3500 | 68%    |
+--------------+---------------+-------------+--------------+------------+-------------+------+--------+
Aggregate output data

+---------------+-------------+--------------+------------+---------------+---------------+
| CUSTOMER_NAME | CUSTOMER_ID | Total_Profit | Total_Cost | Total_Revenue | Profit_Margin |
|---------------|-------------|--------------|------------|---------------|---------------|
| Customer A    | C001        | $1500        | $3000      | $4500         | 50%           |
| Customer B    | C002        | $2800        | $4000      | $6800         | 70%           |
| Customer D    | C004        | $2380        | $3500      | $5880         | 68%           |
+---------------+-------------+--------------+------------+---------------+---------------+

In this aggregate output table, we calculate the total profit, total cost, total revenue, and profit margin for each high margin customer.


Use Case 2: Filtering Netflix Movie data

In another scenario, let's explore how Copilot can assist in filtering Netflix movie data to identify top-rated movies for viewing.

Objective: Filter Netflix movie data to identify top-rated movies from 2023.

Approach: Prompt commands in natural language, including French, to build the pipeline.

Steps taken:

  • Step 1: Prompt Copilot to filter for movies from 2023.
  • Step 2: Further filter the data to display only the top five movies.
  • Step 3: Execute the commands to implement the filtering criteria.
  • Step 4: Create a table called "top five movie view" to share with the team.

Outcome: Copilot successfully filters the Netflix movie data, displaying only movies from 2023 and identifying the top five movies based on ratings from IMDB. The pipeline is created seamlessly without writing any code, demonstrating the versatility and productivity enhancement provided by Copilot.

Sample Output data

+---------+--------+-------------------------+-----------------+---------------+---------------------+--------------+--------+
| SHOW_ID | TYPE  | TITLE                    | DIRECTOR        | COUNTRY       | DATE_ADDED          | RELEASE_YEAR | RATING |
|---------|-------|--------------------------|-----------------|---------------|---------------------|--------------|--------|
| s3      | Movie | The Power of the Dog     | Jane Campion    | New Zealand   | January 7, 2023     | 2023         | R      |
| s4      | Movie | Parallel Mothers         | Pedro Almodóvar | Spain         | March 24, 2023      | 2023         | R      |
| s5      | Movie | Titane                   | Julia Ducournau | France        | November 11, 2023   | 2023         | R      |
| s6      | Movie | The Worst Person in the World | Joachim Trier | Norway     | December 17, 2023   | 2023         | R      |
| s7      | Movie | Petite Maman             | Céline Sciamma  | France        | October 26, 2023    |  2023        | PG-13  |
+---------+--------+-------------------------+-----------------+---------------+---------------------+--------------+--------+

In this sample output data, we have filtered Netflix movie data to display only movies released in 2023. Additionally, we have sorted the movies based on ratings, showing the top-rated movies first.


Use Case 3: Creating a Technical Lead list

You work for a company that needs to identify technical leads from a database of job titles and integrate this information with data from another source. The goal is to create a comprehensive list of technical leads for various projects and departments within the organization.

Objective: Calculate profit margin and identify high margin customers.

Approach: Utilize Copilot to build a pipeline using natural language commands.

Sample Input data

+------------+------------------+-----------------+
| EmployeeID | Job_Title        | Department      |
+------------+------------------+-----------------+
| 001        | Software Engineer| Engineering     |
| 002        | Technical Lead   | Engineering     |
| 003        | Project Manager  | Management      |
| 004        | Data Analyst     | Data Analysis   |
+------------+------------------+-----------------+

Steps taken:

  • Step 1: Retrieve job title data from the 'JW_Job_Titles' table, which contains information about employees' roles and departments.
  • Step 2: Extract nested columns from the 'Prompt Output' table using the 'Extract Nested Data' component. This step involves parsing complex data structures to extract relevant information.
  • Step 3: Join the extracted data from the 'JW_Job_Titles' table with the nested data from the 'Prompt Output' table using the 'Join' component. This step combines information from both sources for further analysis.
  • Step 4: Filter the joined data to identify rows where the role is classified as 'technical' or 'Technical' using the 'Select Technical Leads' component. This step focuses on isolating individuals with technical expertise for inclusion in the lead list.
  • Step 5: Write the filtered data containing technical leads to the 'JW_Technical_Lead_List' table using the 'Rewrite Table' component. This final step ensures that the processed data is stored in a dedicated table for future reference and analysis.

Prompt Output data:

+------------+---------------------------------------------------------+
| EmployeeID | Contact_Info                                            |
+------------+---------------------------------------------------------+
| 001        | {"email": "john@example.com", "phone": "123-456-7890"}  |
| 002        | {"email": "emma@example.com", "phone": "456-789-0123"}  |
| 003        | {"email": "mike@example.com", "phone": "789-012-3456"}  |
| 004        | {"email": "sarah@example.com", "phone": "012-345-6789"} |
| 005        | {"email": "david@example.com", "phone": "234-567-8901"} |
+------------+---------------------------------------------------------+

Outcome

Sample Output data

+------------+-----------------+--------------+--------------------------------------------------------+
| EmployeeID | Job_Title       | Department   | Contact_Info                                           |
+------------+-----------------+--------------+--------------------------------------------------------+
| 002        | Technical Lead  | Engineering  | {"email": "emma@example.com", "phone": "456-789-0123"} |
| 005        | Technical lead  | Engineering  | {"email": "david@example.com", "phone": "234-567-8901"}|
+------------+-----------------+--------------+--------------------------------------------------------+

In the output table, only the rows with job titles containing "technical" or "Technical" are included, along with their associated contact information.


Use Case 4: Analyzing customer feedback and actionable items

Scenario:

Imagine you manage a company that sells various software products. You receive a lot of customer reviews, but it's challenging to quickly understand the overall sentiment and identify areas for improvement. This pipeline tackles this problem by automating two key tasks:

Objective:

  1. Identify happy customers:
    • Determine the percentage of happy customers for each product.
    • Extract the product names and their corresponding percentage of positive feedback.
  2. Extract actionable items:
    • Identify comments that require action, such as defect fixes or new feature requests.
    • Extract the associated product names and actionable comments.

Input data source:

The pipeline begins by accessing a database table containing customer reviews. Each review typically includes information like the product name, the review text, and optionally, a sentiment flag indicating customer satisfaction.

Sample data input

+-----------+------------------------------------------+----------------+
| Product   | Review Text                              | Sentiment Flag |
+-----------+------------------------------------------+----------------+
| Product A | "Great product, very user-friendly!"     | Happy          |
| Product B | "Needs improvement, too many bugs."      | Unhappy        |
| Product A | "Would love to see more features added." | Neutral        |
| Product C | "Excellent customer support."            | Happy          |
+-----------+------------------------------------------+----------------+

Happiness score calculation: The pipeline analyzes the reviews to:

  • Step 1: Analyze reviews to categorize them as "Happy" or "Unhappy," either based on a sentiment flag or sentiment analysis if the flag is unavailable.
  • Step 2: Calculate the total number of happy reviews for each product.
  • Step 3: Compute the percentage of happy customers (happy reviews divided by total reviews) for each product.
  • Step 4: Extract the product names and their corresponding percentage of positive feedback.

Sample output:

+-----------+-----------------------------------------------------------------------------------+
| Product   | Review Text                                                                       |
+-----------+-----------------------------------------------------------------------------------+
| Product A | "Great product, very user-friendly!"                                              |
| Product B | "Needs improvement, too many bugs. Please fix."                                   |
| Product A | "Would love to see more features added."                                          |
| Product C | "Excellent customer support. However, a feature to export data would be helpful." |
+-----------+-----------------------------------------------------------------------------------+

Extract actionable comments: The pipeline can be extended to identify reviews with actionable feedback. This might involve filtering for reviews that:

  • Step 5: dentify keywords or phrases indicating a desire for new features or reports of defects or bugs.
  • Step 6: Extract the associated product names and the actionable comments from the reviews.
  • Step 7: Output the product names along with the actionable comments to prioritize improvements and efficiently address customer concerns.

Sample output:

+-----------+--------------------------------------------------------+
| Product   | Actionable Comment                                     |
+-----------+--------------------------------------------------------+
| Product B | "Needs improvement, too many bugs. Please fix."        |
| Product C | "However, a feature to export data would be helpful."  |
+-----------+--------------------------------------------------------+

Optional: collate result (if you want a combined report)

  • Step 8: Use a "join" component named "Collate Results" to combine the percentage happy data with the actionable comments (if needed) based on "Product Name."
  • Step 9: Define appropriate column mappings for the final report.

Write report to database (optional):

  • Step 10: write the final results (happiness scores or combined report) to a target database table.

Sample Output:

+-----------+------------------+--------------------------------------------------------+
| Product   | Percentage Happy | Actionable Comment                                     |
+-----------+------------------+--------------------------------------------------------+
| Product A | 66.67%           | "Would love to see more features added."               |
| Product B | 0%               | "Needs improvement, too many bugs. Please fix."        |
| Product C | 100%             | "However, a feature to export data would be helpful."  |
+-----------+------------------+--------------------------------------------------------+

This output demonstrates how the collated report integrates happiness scores with actionable comments based on the product name. The final results are then written to a target database table named Customer_Insights.