Member-only story

How to Build Customer Segments with AI

A real-world case study with example code

Shaw Talebi
6 min readFeb 6, 2025

Although AI models are rapidly improving, it is not always obvious how businesses can use these innovations to generate value. In this article, I’ll walk through a real-world use case that helped me better understand who my customers were and why they gave me money. The example code is freely available and can be easily adapted to other business settings.

Photo by Kier in Sight Archives on Unsplash

Customer segmentation is a critical part of an effective marketing strategy. It consists of identifying patterns in customer data to support things like personalized marketing, guide feature development, and improve user experience.

While this is relatively straightforward with numerical data (e.g. age, income, sex), these do not tell the whole story. Namely, they don’t tell you “why” someone paid for your product/service. This typically can only be found from text-based data (e.g., reviews, survey responses, customer interviews).

Extracting this information from text traditionally required manually reading customer…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Shaw Talebi
Shaw Talebi

Responses (4)

What are your thoughts?