Using DeepSeek AI to Uncover Sales Insights

Using DeepSeek AI to Uncover Sales Insights

Businesses can significantly enhance their sales funnels by leveraging AI to analyze data and gain real-world insights. AI can process vast amounts of data quickly and accurately, identifying patterns and trends that might be missed by human analysis. For example, AI can analyze customer behavior data to determine which marketing strategies are most effective, which products are most popular, and where potential customers are dropping off in the sales funnel. By understanding these insights, businesses can tailor their marketing efforts, optimize their product offerings, and improve customer engagement, ultimately leading to increased sales and revenue.

Creating and Testing Your Chat Prompts.

The responses you get from any AI improve dramatically when you give it as much information as possible before asking any questions. This sounds counterintuitive, but given the breadth of data AI is trained on, it’s important to narrow things down a little to get the best results for your particular scenario.

When making a simple call to the DeepSeek API, the component called the system message is used to give directions to the AI about what it should expect from the user, and outline what it should provide. The sample documentation uses a simple statement.

{"role": "system", "content": "You are a helpful assistant."},

WOW. I know. This is amazing! Obviously, you can tell AI a lot more, including things like the persona it should have, and the format in which the data will be returned.

When looking for insights in your customer sales data you might prefer a system prompt something more detailed.

You are a data analysis assistant specializing in customer sales data. 

Your role is to help businesses gain actionable insights by analyzing their sales data. 

The user will provide a dataset containing information on customer purchases, such as product categories, sales amounts, and customer demographics.

1. Age Group Preferences: What products or services are most popular among different age demographics?
2. Geographical Trends: How do sales vary by location, and which products perform best in each region?
3. Seasonal Insights: Are there any seasonal trends or patterns in sales data?
4. Customer Segments: Can you identify customer segments based on purchasing behavior and suggest targeted marketing strategies?
5. Anomalies: Highlight any unusual trends or outliers in the data.

Use plain language and visuals like charts or tables where appropriate to make the insights clear and easy to understand. Summarize your findings concisely and provide practical recommendations to improve sales and customer engagement.

Use Clean Data

It’s important to recognize that implementing AI for data analysis comes with its own set of challenges. Businesses need to ensure they have access to high-quality data and the right tools to analyze it effectively.

Ensuring your sales data is clean is crucial for accurate analysis. Here are five ways to achieve this:

  1. Standardize Data Entry: Implement consistent data entry practices across your team. Use standardized formats for dates, names, and other fields to avoid discrepancies.
  2. Remove Duplicates: Regularly check for and eliminate duplicate entries. Duplicate data can skew your analysis and lead to incorrect conclusions.
  3. Validate Data: Use validation rules to ensure that the data entered meets specific criteria. For example, ensure email addresses follow the correct format and phone numbers have the right number of digits.
  4. Update Regularly: Keep your data up-to-date by regularly reviewing and updating records. Remove outdated information and correct any inaccuracies.
  5. Automate Cleaning Processes: Utilize data cleaning tools and software to automate the process of identifying and correcting errors. This can save time and reduce the risk of human error.

Start Small and Test Often

When starting to analyze your sales data with AI, it’s crucial to begin with a small, manageable dataset rather than your entire company sales history. Using a small, contrived set of data allows you to validate the AI’s responses more easily. This approach helps you understand how the AI processes and interprets your data, ensuring that the insights it provides are accurate and relevant. By starting small, you can identify any discrepancies or errors in the AI’s analysis and make necessary adjustments before scaling up to larger datasets.

Loading your data into Excel and cross-checking the AI’s output is an effective way to ensure accuracy. Excel’s familiar interface allows you to manually verify the AI’s findings, giving you confidence in the results. It’s important to remember that AI, while powerful, is not infallible. By validating the AI’s responses against your own checks, you can catch any mistakes and refine your data analysis process. This cautious approach helps build trust in the AI’s capabilities and ensures that your business decisions are based on reliable insights.

For our first test, we created fictitious sales data for 50 transactions. We limited the data to five products and created enough fields that we could test several scenarios that we deemed relevant. A basic record looked like this:

    {
        "saleDate": "2023-10-01",
        "customerName": "John Doe",
        "productName": "Laptop",
        "quantity": 1,
        "amount": 1200.00,
        "locationName": "New South Wales",
        "dateOfBirth": "1985-05-15"
    }

As you can see, there’s not a lot of information needed to start the process. Obviously, over time you can expand the dataset, and add in more data points to expand the information available to AI.

Using the API to Generate a Response

We used the DeepSeek-V3 chat completion endpoint to analyze the sample data. You can read more about making a simple call to the API in our recent post.

POST: https://api.deepseek.com/chat/completions

In addition to the system message shared above, we included a simple user question “What do 40-50 year olds prefer to buy”.

The response from DeepSeek shown below contains all the elements we requested in the system prompt. There’s information on the specific demographic and recommendations on how to improve marketing efforts to better reach this age-group. Better still, DeepSeek outlines how it calculated the data, so you’re left in no doubt that it knows what it is doing.

To determine what 40-50 year olds prefer to buy, we first need to filter the data to include only customers aged 40-50. Based on the provided dataset, we can calculate the age of each customer as of today (assuming today is October 2023) and then filter the data accordingly.

### Step 1: Filter Customers Aged 40-50
We calculate the age of each customer by subtracting their birth year from 2023. Customers born between 1973 and 1983 fall into the 40-50 age group.

### Step 2: Analyze Purchases by Product
After filtering, we can summarize the purchases made by this age group to identify their preferences.

---

### Filtered Data for 40-50 Year Olds
Here are the purchases made by customers aged 40-50:

| Customer Name    | Product Name | Quantity | Amount ($) | Location         |
|------------------|--------------|----------|------------|------------------|
| Alice Johnson    | Headphones   | 3        | 300.00     | Queensland       |
| Bob Brown        | Laptop       | 1        | 1200.00    | Western Australia|
| Frank Green      | Headphones   | 1        | 100.00     | New South Wales  |
| Henry Irving     | Smartphone   | 3        | 2250.00    | Queensland       |
| Karen Lee        | Laptop       | 2        | 2400.00    | Tasmania         |
| Noah Owens       | Headphones   | 1        | 100.00     | Queensland       |
| Patrick Quinn    | Smartphone   | 2        | 1500.00    | South Australia  |
| Samuel Taylor    | Laptop       | 1        | 1200.00    | Victoria         |
| Victor White     | Headphones   | 3        | 300.00     | South Australia  |
| Alice Brown      | Laptop       | 1        | 1200.00    | Western Australia|
| Daniel Evans     | Headphones   | 2        | 200.00     | New South Wales  |
| Ian Johnson      | Headphones   | 3        | 300.00     | South Australia  |
| Michael Nguyen   | Headphones   | 1        | 100.00     | Queensland       |
| Patricia Quinn   | Tablet       | 1        | 500.00     | Tasmania         |
| Tracy Underwood  | Tablet       | 2        | 1000.00    | Western Australia|
| Ursula Vaughn    | Headphones   | 3        | 300.00     | South Australia  |
| Yvonne Young     | Tablet       | 1        | 500.00     | Victoria         |

---

### Step 3: Summarize Purchases by Product
Here’s a breakdown of the products purchased by 40-50 year olds:

| Product Name | Total Quantity | Total Amount ($) |
|--------------|----------------|------------------|
| Laptop       | 6              | 7200.00          |
| Smartphone   | 6              | 4500.00          |
| Headphones   | 16             | 1600.00          |
| Tablet       | 5              | 2500.00          |

---

### Step 4: Visual Representation
Below is a bar chart showing the total quantity of each product purchased by 40-50 year olds:

```
Laptops:      ||||||
Smartphones:  ||||||
Headphones:   ||||||||||||||
Tablets:      |||||
```

---

### Key Insights
1. **Headphones** are the most popular product among 40-50 year olds, with 16 units sold. This suggests a strong preference for audio accessories.
2. **Laptops** and **Smartphones** are equally popular, with 6 units sold each. These are likely essential tech items for this age group.
3. **Tablets** are the least popular, with only 5 units sold. This could indicate that tablets are less relevant to this demographic.

---

### Recommendations
1. **Targeted Marketing for Headphones**: Since headphones are the most popular product, consider offering promotions or bundles to further boost sales in this category.
2. **Highlight Laptops and Smartphones**: These products are also popular, so ensure they are prominently featured in marketing campaigns.
3. **Reassess Tablet Strategy**: Tablets are less popular among this age group. Consider conducting surveys to understand why and adjust your product offerings or marketing accordingly.

Let me know if you'd like further analysis or additional insights!