Using Terno AI to Build A Recommendation System for An E-Commerce Business

Smart Recommendations, Bigger Online Sales

Since the COVID-19 pandemic, more businesses have moved online or strengthened their digital presence. But shopping online isn’t quite the same as visiting a physical store. In a store, products from the same category are displayed together, making comparisons easy—and if you’re unsure, a store assistant is right there to guide you.

But in online, that personal touch is missing. That’s why smart product recommendations matter so much. By suggesting the right items at the right time, we can recreate that in-store experience for shoppers, making their journey smoother, more enjoyable, and more likely to bring them back for more.

We have used Terno AI to do our analysis and build the recommendation model. Check out the full analysis here.

Dataset

E-Commerce Dataset from Kaggle

Table of Contents

  • Smart Recommendations, Bigger Online Sales
  • Dataset
  • Why Use Terno AI?
  • Why Customers Need Product Recommendations?
  • Types of Recommendation Systems
  • Methodology
  • Smarter Insights, Powered by Terno AI
  • Conclusion

Why Use Terno AI?

Terno AI is a super-fast AI-powered data scientist LLM that builds machine learning prediction models quickly and accurately.
It is secure, trustworthy, and helps save lots of time as well as valuable resources.

Why Customers Need Product Recommendations?

When a customer shops online, the goal is to show them exactly what they need — sometimes even before they know it.

For some, that means finding a specific brand. For others, it’s about value for money. And for many, it’s simply about discovering the right suggestion when they’re not sure what to pick.

Take the example of shopping for a table:

  • One shopper may want a sturdy, durable option.
  • Another might look for a stylish, aesthetically pleasing design.
  • A third could focus mainly on affordability.

A good recommendation system understands these different needs and adapts, offering the most relevant options to each customer — just like a helpful store assistant would.

Types of Recommendation Systems

There are various recommendation systems possible.

  • Recommended for you, based on the customer's previous purchase history.
  • Similar items, so that they can choose the product that best suits their preference.
  • Frequently Bought Together, so that they can buy things that are really needed for them.

E.g.: Phone case along with a phone, a cleaning tool along with utensils.

Methodology

Download Dataset

  • Firstly, we get the dataset from Kaggle that can support our decision-making.
  • Next, we attach the dataset to
  • Terno AI and then give appropriate prompts.

Clean & Explore Data

  • With a prompt, Terno AI cleans and pre-processes the data.
  • It then analyzes it and provides the key findings.

Prompt: Use the attached e-commerce dataset first, clean the data so that there are no inconsistencies, missing values, or duplicates, and all data types are correct. Change column names to make it easy to understand. Do data exploration to understand the data, and give your findings in clear and simple words.

First Prompt to Terno
Response From Terno

The data cleaning steps taken by Terno AI for good, consistent data are:

  • Column Formatting
  • Data Type Conversion of Date
  • Handling Missing Data
  • Removing Duplicates

Exploratory Data Analysis by Terno AI

Overall Activity

  • Total Invoices: 25,900
  • Distinct Customers: 4,373
  • Unique Products Sold: 4,070

Geographical Distribution

  • UK: ~91% of transactions
  • Top Foreign Markets: Germany, France, Ireland (EIRE), Spain

Monthly Order Trends

  • Consistent order growth through 2011.
  • Clear seasonal peak in November–December, likely due to holiday shopping.

Building A Recommendation Model

  • After we completed the EDA, we asked Terno AI to build a recommendation system based on the data.
  • We are asking it to generate two kinds of recommendations:

1. Similar Items
2. Recommendation for You

Prompt: We have to generate a recommendation system based on this dataset. The recommendation system should include different types, which are recommendations for you and similar items, based on the data given in the datasets.

Prompt to Build Recommendation Model

1. “Similar Items” Recommender

Ever bought something and thought, “I’d love to find more like this”? That’s exactly what this recommender does.

  • It looks at how often products are bought together.
  • Then it finds items that are most similar to the one you’re browsing.

For example, if you liked the heart-shaped tealight holder, the system suggests other cozy, heart-themed home items—like a red hanging heart T-light holder or a heart of wicker decoration.

Think of it as the “If you liked this, you might also like…” feature.

2. “Recommendations for You” Recommender

This one goes a step further and feels more personal. Instead of focusing on a single product, it looks at your entire shopping history.

  • It studies the items you’ve purchased.
  • It scores other products based on how closely they relate to your past choices.
  • Then it suggests the top picks you haven’t bought yet.

For example, for one frequent customer, the system recommended a hand warmer (owl design) and a “Keep Calm” hot water bottle—both in line with their taste for comfort and quirky designs.

This is the “Here’s what we think you’ll love next” feature.

Generate Charts & Other Visualizations

  • Next, we ask Terno AI to build charts and visualizations to see the relevant insights.

Prompt: Based on the above findings, create charts and other visualizations to support the thought process effectively. All visualizations should be neatly formatted and have good headings for all the charts. The formatting should be perfect with no overlapping text or cut off in the corners.

Bar Chart for Top 10 Quantity Sold Products
Bar Chart for Top Countries by Transaction Count

Smarter Insights, Powered by Terno AI

Lastly, we asked Terno AI to give recommendations and insights based on the work it did.

Prompt: Give a brief description of all findings, insights, and suggestions in a clear, simple, and easy-to-understand way.

Prompt for Insights

We put Terno AI, our LLM data scientist agent, to work on a year’s worth of retail order history—and here’s what it uncovered in record time:

  • Clean Data, Clear Picture
    • Processed ~537K transactions (after cleaning & de-duping).
    • Standardized dates, customer IDs, and product info for analysis without manual hassle.
  • Key Takeaways
    • Scale: 25.9K orders, 4.3K customers, 4K unique products.
    • Sales Drivers: 91% of transactions from UK; Germany, France, Ireland, and Spain follow.
    • Top Products: WWII Gliders (volume), Postage & 3-Tier Cakestand (revenue).
    • Seasonality: Demand surges in Nov–Dec with holiday shopping.
  • Recommendations, Done Smarter
    • Similar Items: “If you liked X, here’s more like it.”
    • For You: Personalized picks tailored to each shopper’s history.
  • Actionable Moves
    • Add smart recommenders to product and account pages.
    • Send personalized holiday campaigns at peak shopping times.
    • Keep best-sellers in stock and bundle them with high-margin items.

Why It Matters

All of this was achieved without weeks of manual data wrangling—Terno AI handled the cleaning, analysis, and recommender modeling in one flow. The result: quality insights at speed, giving you the power to act faster, sell smarter, and serve customers better.

Conclusion

  • Using Terno AI for recommendations proved to be a game-changer in building the recommendation model. What traditionally required significant time and resources was completed far more efficiently, allowing us to move quickly from data to action.
  • The platform’s recommendations were not only accurate but also directly aligned with the business needs.
  • The real value came from the practicality of the recommendations. Instead of presenting abstract insights, Terno AI highlighted clear opportunities and solutions that could be implemented immediately.
  • In short, by leveraging Terno AI, we saved time, improved decision quality, and ensured that the strategies were backed by data-driven insights. Check out the full chat here.

Want to work with Terno AI. Book Your Demo Now!

- Your AI-Data Scientist

Turn your data into decisions with Terno.