Fine-Tuning OpenAI GPT with Custom Data
1

Project Definition: Customer Intent Classification

Imagine we run a retail business that sells thousands of products every day and ships them to customers all over the world. Often, one of the most expensive parts of running these businesses is customer service. Customers have questions about their orders, the products they've purchased, and the services we offer. And, most importantly, they expect quick and accurate responses.

Today, we are going to save our business a lot of money by building a customer service tool that will be capable of categorizing customer inquiries into one of many categories and sub-categories. This tool will help us route customer inquiries to the right department, or even automate responses to common questions. Here are the categories and each of their sub-categories:

JSON
{
	"Product Information": ["Specifications", "Stock Status", "Promotions"],
	"Order Management": ["Placement", "Status and Tracking", "Cancellation"],
	"Payment and Billing": ["Payment Options", "Billing Inquiries", "Refunds"],
	"Shipping and Delivery": ["Options and Rates", "Delivery Estimates", "Lost or Damaged Items"],
	"Account Management": ["Setup", "Account Recovery", "Privacy and Security"],
	"Technical Support": ["Troubleshooting", "Software Updates", "Connectivity Issues"],
	"Returns and Exchanges": ["Return Policy", "Initiate Return", "Status of Return"],
	"Feedback and Complaints": ["Product Feedback", "Service Complaints"]
}

In total, we have 8 categories and 23 sub-categories. Our goal is to teach the model to process a customer inquiry and respond with a JSON-formatted output of the category and sub-category that best classifies the customer's intent. For example, let's consider the customer inquiry below:

Hello, I purchased a product from your store and I would like to return it. Can you help me with that?

In this inquiry, this customer intends to make a return. Therefore, we'd like the model to respond with the following JSON output:

JSON
{
	"category": "Returns and Exchanges",
	"sub_category": "Initiate Return"
}

That's it! Let's get started.