Skip to content

.NET Console app that shows how to train a regression model to predict the star review using ML.NET AutoML and Azure OpenAI service embeddings for fine food reviews.

Notifications You must be signed in to change notification settings

luisquintanilla/OpenAIAutoMLNET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Reviews using OpenAI embeddings and ML.NET AutoML

.NET Console app that shows how to train a regression model to predict the score using ML.NET AutoML and Azure OpenAI service embeddings for fine food reviews.

Dataset

Amazon Fine Foods Review Dataset - ~500,000 food reviews from Amazon.

Id ProductId UserId ProfileName HelpfulnessNumerator HelpfulnessDenominator Score Time Summary Text
1 B001E4KFG0 A3SGXH7AUHU8GW delmartian 1 1 5 1303862400 Good Quality Dog Food I have bought several of the Vitality canned dog food products and have found them all to be of good quality. The product looks more like a stew than a processed meat and it smells better. My Labrador is finicky and she appreciates this product better than most.
2 B00813GRG4 A1D87F6ZCVE5NK dll pa 0 0 1 1346976000 Not as Advertised "Product arrived labeled as Jumbo Salted Peanuts...the peanuts were actually small sized unsalted. Not sure if this was an error or if the vendor intended to represent the product as ""Jumbo""."
3 B000LQOCH0 ABXLMWJIXXAIN "Natalia Corres ""Natalia Corres""" 1 1 4 1219017600 """Delight"" says it all" "This is a confection that has been around a few centuries. It is a light, pillowy citrus gelatin with nuts - in this case Filberts. And it is cut into tiny squares and then liberally coated with powdered sugar. And it is a tiny mouthful of heaven. Not too chewy, and very flavorful. I highly recommend this yummy treat. If you are familiar with the story of C.S. Lewis' ""The Lion, The Witch, and The Wardrobe"" - this is the treat that seduces Edmund into selling out his Brother and Sisters to the Witch."

Prerequisites

Instructions

  1. Download the dataset

  2. Unzip the dataset and save the Reviews.csv file to to the data directory.

  3. Set the following environment variables using information from your Azure Open AI service resource:

    • OPENAI_ENDPOINT - Azure OpenAI service endpoint.
    • OPENAI_KEY - Azure OpenAI service access key.
    • OPENAI_DEPLOYMENT - The name of the model deployment.
  4. Build the project

    dotnet build
    
  5. Run the project

    dotnet run
    

If successful, you should see output similar to the following:

Trial 0 finished training in 331016ms with pipeline FastForestRegression
Test Set MAE: 0.40577530734082484

About

.NET Console app that shows how to train a regression model to predict the star review using ML.NET AutoML and Azure OpenAI service embeddings for fine food reviews.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages