How to Build an Extraction Model with Promptrepo?
Extraction models identify and extract structured information from raw text. In this tutorial, we’ll build a model that extracts ingredients and nutritional values from food descriptions.
Step 1: Preparing Training Data
For extraction, our dataset consists of:
- Nutrition per serving: The nutritional values per serving
- Web page content: The contents of the web page
- Web page title: Title of the page
- Ingredients: The extracted list of ingredients
- Nutritional category: Categories such as beverage, red meat, etc
- Serving size (grams or mL): The food amount per serving
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
- Choose all other columns as output columns and click Next
Step 3: Training & Testing the Model
- Click Publish and let Promptrepo fine tune the extraction model
- Once trained, test the model by inputting a food name and its description
- The model should extract structured data (ingredients & nutrition) from the text
Extraction models enable AI to understand and process textual data. Now, let’s move on to generative models to create new data based on learned patterns.