How to Build a Classification Model with Promptrepo?
Classification models categorize input data into predefined labels. In this tutorial, we’ll build a food classification model to categorize food items using PromptRepo.
Step 1: Preparing Training Data
For classification, our dataset consists of:
- Web page title: The name of the web page
- Web page content: Content of the page
- Nutrition category: The correct category label (e.g., Red Meat, Beverages, Cheese, etc.)
Step 2: Uploading Data to Promptrepo
- Open Google Sheets and add or import the training dataset
- Click Extensions > Promptrepo > Train AI
- Promptrepo sidebar widget will be displayed
- Enter the AI model name and click Next
- Select Web page title & Web page content as input columns and click Next
- Select Nutrition category as the output column, select Enum for the Treat as option and click Next
Note: In the output column, choosing Enum for the Treat as option for nutrition category makes it a classification model.
Step 3: Training & Testing the Model
- Click Publish and let Promptrepo fine-tune the classification model.
- Once trained, test the model by inputting a food name and its description.
- The model should predict the correct category.
Classification models are foundational for structuring data. Now, let’s explore how to build an extraction model for retrieving structured data from unstructured text.