Nothing Special   »   [go: up one dir, main page]

Intelligent Negotiation Bot Using Machine Learning Techniques

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/364518185

Intelligent Negotiation Bot using Machine Learning Techniques

Conference Paper · August 2022


DOI: 10.1109/ASIANCON55314.2022.9908710

CITATIONS READS

2 293

4 authors, including:

Dipti Jadhav
Ramrao Adik Institute of Technology
24 PUBLICATIONS 209 CITATIONS

SEE PROFILE

All content following this page was uploaded by Dipti Jadhav on 06 June 2023.

The user has requested enhancement of the downloaded file.


2022 2nd Asian Conference on Innovation in Technology (ASIANCON)
Pune, India. Aug 26-28, 2022

Intelligent Negotiation Bot using Machine Learning


Techniques
Kabir Batra Niraj Nair Atharva Chaudhary
Department of Information Technology Department of Information Technology Department of Information Technology
Ramrao Adik Institute of Technology, Ramrao Adik Institute of Technology, Ramrao Adik Institute of Technology,
2022 2nd Asian Conference on Innovation in Technology (ASIANCON) | 978-1-6654-6851-0/22/$31.00 ©2022 IEEE | DOI: 10.1109/ASIANCON55314.2022.9908710

D. Y. PATIL Deemed to be University D. Y. PATIL Deemed to be University D. Y. PATIL Deemed to be University


Navi Mumbai, India Navi Mumbai, India Navi Mumbai, India
kab.bat.rt18@rait.ac.in nir.nai.rt18@rait.ac.in ath.cha.rt18@rait.ac.in

Dipti Jadhav
Department of Information Technology
Ramrao Adik Institute of Technology,
D. Y. PATIL Deemed to be University
Navi Mumbai, India
dipti.jadhav@rait.ac.in

Abstract— E-commerce, in today’s day and age is becoming introduction of AI people can be more confident in closing
increasingly competitive, and there's an emerging need for new deals which will be mutually beneficial and save the hassle
technological advancements in order to stand in this of repetitive back and forth offers. In this subject, artificial
competitive market. The employment of a negotiation bot is a intelligence will revolutionize the way people negotiate and
new AI technology that has a growing appeal in E-commerce. instill the virtue of good faith in all areas. The main aim in
The goal of a negotiation is not just to get the most money for this paper is to create a responsive chatbot that uses AI to
yourself, but also to persuade your opponent that the deal is overcome the shortcomings of in-person negotiations.
good for him. Businesses can use negotiation bots to
personalize rates for each consumer and offer them discounts. Negotiation varies from person to person as it can be
The majority of people lack bargaining skills when it comes to simple or can also be complex at times. The process of
trading, which causes them to miss out on a fair and lucrative negotiating and closing a deal can be an exhausting task.
offer. This paper proposes to develop an intelligent chatbot Unfortunately, many people lack the necessary skills to
that can act as sellers in bargaining conversations with buyers. strongly communicate, comprehend the situation, and have a
stance in order to seal the deal.
Keywords—Negotiation Bot, Intent Classification, Machine
Learning, AI II. LITERATURE REVIEW
I. INTRODUCTION J. Park, H. A. Rahman, J. Suh, and H. Hussin [1] were
able to develop a prototype of an agent which negotiated
People naturally get an itch to negotiate, to get the best with humans to find a win-win situation for both parties.
price for everything they buy. It's an important skill to have Integrative bargaining model and social judgment theory
for everyday conversations as well as business forms the basis of their research. The limitations as stated in
collaborations. As seen from a wider perspective it benefits [1] was that they couldn’t find out the buyer’s interest at the
both the parties in closing a deal. Negotiation, given its start of the negotiation.
spectrum of complexity varying in each situation, can take
someone years of experience to have the intellect for T. Liu and Z. Zheng, [2] developed a chatbot which
presenting a lucrative offer. AI as we all know, works on a helped buyers interested in buying used cars in a smart
simple principle of responding to a set of algorithms and data manner using different machine learning and deep learning
that has previously been tested, predicting methods and models at various stages like predicting the suitable price,
calculating the figures more precisely and efficiently than deciding the next strategy in negotiation and judging the
humans. This predictive data can be used as a general offered deal.
framework for grouping unique characteristics. As a result,
J. R. Oliver [3] compares the outcomes of negotiations
combining machines and planning has become the go-to
performed by an artificial adaptive agent and humans. The
strategy for improving people's decision-making in crucial
agent is developed using genetic algorithms and it is
situations. It could help a person who lacks the required
evaluated on the basis of its performance for different
understanding to decide whether to buy a product at a given
bargaining problems.
price and help improve clients with a relative assessment for
improvement. Frank Burchill [4] in his work has discussed fundamental
aspects of various theories of negotiation. The authors also
The first and the most challenging step of any negotiation
discuss the cases in which these theories would help to find a
process is knowing how to execute a negotiation appeal and
solution in workplace conflict.
constructing a mutually beneficial agreement with limited
knowledge and experience. AI can act as a liaison between P. Henderson, S. Crouch, R. J. Walters, and Q. Ni [5]
vast volumes of data on a particular product and the skills examined the performance of seven automated bargaining
and knowledge required to engage and sustain a negotiation. algorithms for a car hiring scenario by conducting a
This whole process can be automated to enable both vendors tournament. They concluded after the event that the optimal
and buyers to make money fairly and without bias. With the

978-1-6654-6851-0/22/$31.00 ©2022 IEEE 1

Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on April 20,2023 at 09:19:50 UTC from IEEE Xplore. Restrictions apply.
algorithm is the one that reaches to an agreement within the cycle to generate response for a user’s input. Functions
specified number of rounds. carried out at every stage are as follows:
He. He, D. Chen, A. Balakrishnan, and P. Liang [6] 1) Firstly, the buyer has to choose the desired
decouple negotiating strategy and natural language product for negotiation and start a new
processing, allowing them to have more control over the conversation with a text.
approach and increase the likelihood of a fair transaction. 2) In intent classification, the buyer’s message is
The above literature survey shows that negotiation bots used to define the buyer’s intention.
developed did not focus on proper pricing in their bargains. 3) Also, the price extraction is performed on the
This paper proposes a negotiation bot for one-on-one buyer’s message if any.
bargains with the customers. 4) Both outputs from above two processes are used
to generate a response according to buyer’s
III. DATASETS
intent with a new price offer.
Dataset lies at the heart of any machine learning project, 5) The predicted price offer and bot’s intent is
the Craigslist Bargain dataset which was created in [6] passed to response generation to create a reply
consists of negotiation conversations between buyer and text from the bot to the buyer.
seller for products from varying domains like electronics,
furniture, etc. This dataset contains 6,682 dialogues over 6) Finally, the reply text is displayed on the
multiple categories of products current chat window. The buyer has to then
communicate back and forth to proceed
Deal or No Deal dataset created in [7] is being used to negotiation and this process is repeatedly
improve prediction for some intents such as deal (agreement) followed for all buyer inputs.
or no deal (disagreement) instances which had less
occurrence in Craigslist Bargain dataset. It contains a total of
12,234 dialogues from which helps us efficiently identify a
deal (agreement) or no deal (disagreement) instance. This
dataset helped us in increasing and diversifying the text
mapped to the aforementioned intent.
In the proposed technique for Sentiment Analysis Dataset
from Kaggle is used. It contains tweets annotated as positive,
negative or neutral based on the sentiment of the tweet. The
dataset contains about 32,296 tweets and other different data
of those tweets like time of tweet, age of buyer, country, etc.
IV. PROPOSED METHODOLOGY

Fig. 2. Basic working of Negotiation Bot

A. Intent Classification
This process identifies the intent of the buyer’s message
as shown in Fig. 2, for e.g., identify whether the user is
proposing an offer or accepting a previous offer or counter-
pricing, etc. There are a total of 8 intent classes, including
Introduction / Greeting, Inquiry, Counter- price,
Agree/Accept, Disagree/Deny, Insist and Vague-price.
Craigslist’s Bargain Dataset is used which consists of
negotiation conversations between buyers and sellers from
an e-commerce platform.
Firstly, the conversations were broken down into single
text replies in a row. Then pre-process the text data which
involves removing punctuations, removing special
characters, numbers, stemming and converting text to
lowercase. The pre-processed data is then vectorized using
CountVectorizer and TFIDF Vectorizer to create a
Fig. 1. Block Diagram of Proposed System vocabulary list of words present in the dataset. The
vectorized output from both the vectorizers are then passed
The proposed method for Negotiation Bot can be to seven classification models for training. Figure 3. shows
described by key components like taking input from the user, the accuracies of various models trained with different
classifying intent and price extraction, deciding new offer vectorizers.
and lastly response generation. Fig. 1 showcases a complete

Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on April 20,2023 at 09:19:50 UTC from IEEE Xplore. Restrictions apply.
XGBClassifier along with Count Vectorizer was chosen range (between product_higher_limit and
to classify intents as it obtained the highest f1 score among product_lower_limit), then Bot either accepts the offer
all other models shown in Fig. 3. Whenever the buyer sends (bot_response = “Agree”) or counter with a new price
a message, the model predicts and saves its intent into a offer (bot_response = “Counter-price”).
variable named “buyer_intent” and also saves this into an
array named “intent_timeline”.
Decision tree is trained for the new price offer using the
For e.g. If the buyer sends a message like “Hello there”, below preprocessed data that can predict the discount
the model detects intent as “Intro” or for messages like “Can percentage.
I get this product for $100?”, the model detects intent as
“Counter-price” i.e., buyer_intent = “Counter-price”. Fig. 4 shows the dataset used for price prediction in
which the first column contains messages from a bargaining
conversation. Every message's intent is present in the second
column. The discount granted at that particular conversation
is listed in the third column.
The trained model uses all intents (intent_timeline) from
the present conversation as input to predict discount
percentage and stores this value in a variable named
“discount”. Then, by subtracting the discount % (percentage)
from the product's higher limit (product_higher_limit) set by
the seller, a new price offer is calculated.
For e.g., if intents in a current conversation are [“intro”,
“inquiry”, “counter-price”,” disagree”, “counter-price”,”
counter-price”], this array of intents are fed as input to the
model to predict discount percentage. The equation to
calculate a new offer is as shown in Eq. no (1):
Fig. 3. Comparison between various classifiers.
new_offer = product_higher_limit × (100 – discount) / 100
B. Price Extraction (1)
The price offer is extracted from the message string when If new_offer is smaller than buyer_offer, then
a buyer sends a message as shown in Fig. 2. If a buyer is bot_response switches to “Agree” at buyer_offer. Else if
making a price offer, he must put the number value (price new_offer is lower than product_lower_limit, then
offer) after the "$" sign. new_offer is set to product_lower_limit i.e new_offer =
product_lower_limit. Else if new_offer is greater than Bot’s
Incorrect Format: “How about 100 for this?” Correct last offer, then bot_response switches to “Insist” with Bot’s
Format: “How about $100 for this?” last offered price.
Current buyer’s offer is saved in a variable called 4) If the buyer insists on his previous offer (buyer_intent
“buyer_offer” i.e., buyer_offer = 100 = “Insist”), Bot should respond with his final offer.
C. Decision Engine and Counter Pricing Therefore, bot_response = “Insist” with final offer. And if
the buyer agrees to this offer, then bot_response switches
It evaluates buyer's current intent (buyer_intent) and to “Agree” else “Disagree”.
price offer (buyer_offer) from the previous process to decide
5) If the buyer offers a price too lower than the seller's
the Bot's response strategy and whether there is a need to
defined price range (buyer_intent = “Vague-price”), Bot
give them a discount or not, if yes then by how much.
should respond with a recommendation text to increase
The Bot will try to settle at a price offer that falls within the buyer's offer. Therefore, bot_response = “Vague-
the seller's pricing range for the product. The seller specifies price”.
this price range at the beginning as variables 6) If the buyer agrees to the current offer (buyer_intent =
“product_higher_limit” and product_lower_limit”. E.g if a “Deal”), Bot should respond with a done deal text with a
seller sets a range between $100 to $150 i.e mutually settled offer. Therefore, bot_response = “Deal”.
product_higher_limit = 150 and product_lower_limit = 100. 7) If the buyer disagrees with the current offer
There are two variables to store Bot's response intent and (buyer_intent = “Disagree”), Bot should respond with a
offered price called “bot_offer” and “bot_intent”. These counter offer. Therefore, bot_response = “Counter-price”.
values are predicted on the basis of the all-previous buyer And If the Bot predicts the same price offer more than
intents (intent_timeline) and using some predefined strategy twice then it switches to “Disagree”. Therefore,
which are as follows: bot_response = “Disagree”.
8) It’s a special case when a buyer points out some
1) If buyer_intent is “Intro” (buyer_intent = “Intro”), Bot
negative traits of the product. A flag named
should respond with an intro text. Therefore, bot_response
“Negative_context” is set to “True”.
= “Intro”
2) Similarly, if buyer_intent is “Inquiry” (buyer_intent =
If Negative_context = True, then Bot gives an additional
“Inquiry”), Bot should respond with product description.
discount to the customer. The seller determines this
Therefore, bot_response = “product_desc”. percentage value for additional discount at the beginning.
3) If the buyer offers a price near the seller's defined price

Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on April 20,2023 at 09:19:50 UTC from IEEE Xplore. Restrictions apply.
Negative_context = “True”, only if buyer sentiment is
“Negative” with Cosine similarity score greater than
threshold value.
To detect buyer sentiment, a classification model was
trained to determine whether the sentiment of a buyer's
message is "Positive" or "Negative". A Logistic Regression
model was fitted on the texts in the Sentiment Analysis
Dataset after vectorizing it using CountVectorizer which
obtained an accuracy of 89% in classification.
Understanding the sentiment of the buyer’s text as
negative is not enough for the Bot to give additional
discount. It also requires checking whether the buyer is
actually talking about this product. In order to verify this,
cosine similarity was used to measure the similarity between
the buyer’s text and the product’s description. If the value of
cosine similarity score exceeds the threshold value, then the
Bot gives an additional discount. The threshold value
depends on the length of the product’s description.
Fig. 6. No deal being made on couch

Fig. 4. Dataset for discount prediction Fig. 7. Snapshot of the terminal

D. Response Strategy
This part solely focuses on generating a response by
using formulated output obtained in the previous part. A pool
of responses was created for every Bot Response. For e.g. If

Fig. 8. Deal being made on cabinet

Fig. 5. Pool of responses for specified intents

the bot_response = Deal then the Bot replies using a text


from the pool of text responses mapping to the response
“deal” as shown in Fig. 5.
V. EXPERIMENTAL RESULTS
In Fig. 6, User is trying to make a deal for a couch but
failing to settle on the price.
In Fig. 8 User is trying to make a deal for a cabinet and
successfully settling on a price with an additional discount
because the user argued on it being old. Fig. 9. Snapshot of the terminal
Fig. 7 and Fig. 9 show logs for our conversation.

Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on April 20,2023 at 09:19:50 UTC from IEEE Xplore. Restrictions apply.
VI. PERFORMANCE EVALUATION The evaluation results demonstrated that the bot correctly
The proposed technique for Negotiation Bot was identifies the intents and responds accordingly aiming to
subjectively reviewed by ten testers from diverse categories, close the deal in an effective manner. The results depict that
including our coworkers, faculty members, and research artificial intelligence can be successfully employed to the
scholars from our department. The response we received was development of bargaining abilities, which most people
fairly positive as shown in Table 1, with 8 out of 10 certainly tend to lack.
participants rating our negotiating bot remarkably, and the VIII. FUTURE SCOPE
other two being just satisfied. The UI was simple for
everyone to comprehend, and no one had any difficulty Future scope is to improve our chatbot by adding text-to-
figuring out how to start the dialogue. Everyone was able to speech so that our bot can fulfill a variety of user needs.
achieve some sort of agreement at the conclusion of With text-to-speech negotiation can be taken to a whole new
negotiation. Users really enjoyed the additional discount level by setting up this bot in commercial spaces hence
granted on the product's bad aspects. automating the bargaining process.

TABLE I. EVALUATION OF BOT


REFERENCES
[1] J. Park, H. A. Rahman, J. Suh, and H. Hussin, “A study of integrative
Good Acceptable Bad bargaining model with argumentation-based negotiation,” Sustain.,
vol. 11, no. 23, Dec. 2019, doi: 10.3390/su11236832.
80% 20% 0 [2] T. Liu and Z. Zheng, “Negotiation Assistant Bot of Pricing Prediction
Based on Machine Learning,” Int. J. Intell. Sci., vol. 10, no. 02, pp.
9– 21, 2020, doi: 10.4236/ijis.2020.102002.
[3] J. R. Oliver, “A Machine-Learning Approach to Automated
Negotiation and Prospects for Electronic Commerce,” J. Manag. Inf.
Syst., vol. 13, no. 3, pp. 83–112, 1996, doi:
10.1080/07421222.1996.11518135.
[4] F. Burchill, “Walton and McKersie, A Behavioral Theory of Labor
Negotiations (1965),” Hist. Stud. Ind. Relations, no. 8, pp. 137–168,
Sep. 1999, doi: 10.3828/hsir.1999.8.7.
[5] P. Henderson, S. Crouch, R. J. Walters, and Q. Ni, “Comparison of
some negotiation algorithms using a tournament-based approach,” in
Lecture Notes in Computer Science (including subseries Lecture
Notes in Artificial Intelligence and Lecture Notes in Bioinformatics),
2003, vol. 2592, pp. 137–150, doi: 10.1007/3-540-36559-1_12.
[6] He. He, D. Chen, A. Balakrishnan, and P. Liang, “Decoupling
strategy and generation in negotiation dialogues,” in Proceedings of
the 2018 Conference on Empirical Methods in Natural Language
Processing, EMNLP 2018, 2020, pp. 2333–2343, doi:
10.18653/v1/d18-1256.
[7] M. Lewis, D. Yarats, Y. N. Dauphin, D. Parikh, and D. Batra, “Deal
or no deal? End-to-end learning for negotiation dialogues,” EMNLP
2017- Conf. Empir. Methods Nat. Lang. Process. Proc., pp. 2443–
Fig. 10. Conversation between Bot and a participant 2453, 2017, doi: 10.18653/v1/d17-1259.

VII. CONCLUSION
The proposed intelligent chatbot assists sellers in
negotiating by employing negotiation strategies and machine
learning techniques. It is also able to present fair arguments
and maintain a smooth communication process throughout.

Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on April 20,2023 at 09:19:50 UTC from IEEE Xplore. Restrictions apply.
View publication stats

You might also like