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:

  1. Nutrition per serving: The nutritional values per serving

  2. Web page content: The contents of the web page

  3. Web page title: Title of the page

  4. Ingredients: The extracted list of ingredients

  5. Nutritional category: Categories such as beverage, red meat, etc

  6. Serving size (grams or mL): The food amount per serving

Step 2: Uploading Data to Promptrepo

  1. Open Google Sheets and add or import the training dataset

  2. Click Extensions > Promptrepo > Train AI

  3. Promptrepo sidebar widget will be displayed

  4. Enter the AI model name and click Next

  5. Select Web page title & Web page content as input columns and click Next

  6. Choose all other columns as output columns and click Next



Step 3: Training & Testing the Model

  1. Click Publish and let Promptrepo fine tune the extraction model

  2. Once trained, test the model by inputting a food name and its description

  3. 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.

Made with formfacade