Classification within Excel
GPT for Excel can help you classify your catalog items, press articles, or any other text into the most relevant category without leaving Excel. This guide walks you through classifying a list of product names for a shoe store into categories, and improving your classification approach to get the best results.
While you can also use the GPT_CLASSIFY function to perform this task, we'll focus on using the Custom prompt bulk tool in this guide.
Step 1: Get started
Prerequisites
- You have installed GPT for Excel.
- You have opened a workbook containing text to classify in a column.
Open the GPT for Excel add-in and run the Classify bulk tool with categories Casual Shoes, Dress Shoes, Athletic Shoes, Boots, Sandals, Sneakers
on a few rows to see how it works.
![Click Home tab, GPT for Excel Word. Then Bulk tools tab, Classify / Categorize.](/help/article-images/gpt-for-excel/classify-get-started.gif)
If you find the answers satisfactory, go ahead and launch your bulk classification! Otherwise, check how to improve your results in Step 2.
Step 2: Improve your results (optional)
To obtain the best results when classifying your text, consider the following approaches. All solutions use the minimum Creativity level and Top P setting, and gpt-4o for more accuracy.
![](/help/article-images/gpt-for-excel/classify-prereq.png)
Goal | Recommended approach |
---|---|
Classify according to specific rules | Add custom instructions Provide context or specific rules to follow.
|
Handle content outside categories | Add a fallback category Capture all irrelevant content into a fallback category and review it to refine your classification approach. For example, add Other to your list of categories.
|
Reduce use of 'Other' category | Make categories broader Make categories broader to ensure that all text is classified. For example, change Knee-high boots into Boots . |
Balance categories | Refine categories Check that your categories are balanced. For example, if you have a category Summer shoes that is over-represented, you can split it into narrower categories.
|
Improve accuracy | Make categories mutually exclusive Check your category for overlaps. For example, Sandals and Summer Shoes are not mutually exclusive, so you should keep only one of them. |
Classify into most specific category in a hierarchy | Use full paths to describe your hierarchy In a hierarchical system, use the full path of your most specific categories instead of providing a flat list of categories.
|
Define categories | Create a list of categories of a given type with the Extract bulk tool If you know the type of categories you want to classify your text into, but don't know all the categories in advance, extract all possible categories as entities with the Extract bulk tool. Then, classify the text based on this list. For example, to classify shoe descriptions by their main material, extract all the materials first, then classify the descriptions using the list of materials to identify the main material for each type of shoe. |
Once you have refined your classification approch and are satisfied with the results from the initial rows, you are ready to launch your classification in bulk. Select more cells or even all cells, click Run rows, and watch GPT for Excel handle the rest of the classification.