Work by Aymen Fourati

Outline :

  1. Introduction

  2. Technical stack and discussions

  3. Creation of the database


1) Introduction:

We're proposing a proof of concept for an automatic responder to customer feedback in the restaurant industry.

2) Technical stack and discussions :

The model we've chosen to fine-tune is gpt2, the open source model from open ai. For this fair, we're using HuggingFace's Transformer library:

3) Database creation :

In the absence of a reference database, we'll create a dataset from a comment repo borrowed from Kaggle: https://www.kaggle.com/datasets/vigneshwarsofficial/reviews/data

We choose to structure our dataset as follows:

{

    keywords : string [], // word tables to contextualize the customer review.

    comment : string, // the customer review from the Kaggle dataset.

    reply : string, // a reply generated by gpt 3.5 for model training.

    satisfaction : Binary // 1 if positive 0 otherwise. This attribute plays no role in model training, but it does allow us to balance classes correctly in the pre-processing phase.

}

There are three main types of keywords:

type 1: Restaurant : The first keyword will always be "restaurant", in order to introduce scalability to the dataset (for example, by expanding the dataset to include other services such as Bar or Café, without disrupting the model's performance).

type 2 : Contextualization : like a hashtag to contextualize the customer review, for example if the review comes from a comment on a special offer on a facebook post, we'll have a keyword "20% promo".

type 3 : Comment subset : Various words appearing in the comment (which could be generated by intersecting with a database of keywords we deem interesting).

Examples : interesting words :["chicken soup", "kids menu", "pizza", "hamburger", "beer", "steak"...]

comment: "Amazing chicken soup! However, The steak was a bit raw.."

--> keywords ["restaurant", "chicken soup", "steak", "saturday night"] 

Here's a subset of that dataset:
{ "keywords": ["restaurant", "positive experience", "grand reopening event", "new menu launch"], "comment": "Overall, I like this place a lot.", "reply": "We're thrilled to hear that you enjoyed your experience! Thank you for your positive feedback. The grand reopening event and new menu launch have been exciting for us, and we look forward to serving you again.", "satisfaction": 1 }, { "keywords": ["restaurant", "delightful first visit", "chef's special creations"], "comment": "My first visit to Hiro was a delight!", "reply": "We're thrilled to hear that your first visit was delightful! Our chef has introduced special creations that we hope will continue to impress you. Thank you for choosing Hiro, and we look forward to your next visit.", "satisfaction": 1 }, { "keywords": ["restaurant", "ample portions", "special pricing", "culinary innovations"], "comment": "Ample portions and good prices.", "reply": "Thank you for your positive feedback on our portions and prices! We're excited to share that we're constantly working on culinary innovations to enhance your dining experience.", "satisfaction": 1 },

Here are few exemples you can test :

keywords = ["restaurant","negative experience"] comment = "This place is way too overpriced for mediocre food."

keywords = ["restaurant","positive experience","good service"] comment = "Service was fine and the waitress was friendly."

keywords = ["restaurant","good experience"] comment = "If you want healthy authentic or ethic food, try this place."

keywords = ["restaurant","good waitress"] comment = "Waitress was sweet and funny."

keywords = ["restaurant","Bad service"] comment = "We've have gotten a much better service from the pizza place next door than the services we received from this restaurant."

Thank you for your time !

Downloads last month
15
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support