The eCommerce bot intends to retrieve product items from catalog in sorted order according to the BLEU measure . In addition, it asks an user to provide additional information to specify the search (as on the example below). The order of attributes is based on information gain .
Here is a simple example of interaction:
>> Hello, I am a new eCommerce bot. I will help you to find products that you are looking for. Please type your query in plain text. x::bluetooth speaker >> This is what I found for you: - Bluetooth Speaker (Black & Red) - Bose SoundLink Bluetooth Speaker III - Bose SoundLink Mini Bluetooth Speaker - Bose SoundLink Mini Bluetooth Speaker - JBL Flip Wireless Bluetooth Speaker (Black) To specify the search, please choose a Brand: JBL, Soundsworks x::JBL >> The following items satisfy your request - JBL Flip Wireless Bluetooth Speaker (Black) - JBL Flip Wireless Bluetooth Speaker (Black) - JBL Charge Portable Indoor/Outdoor Bluetooth Speaker | Black
- Pretrained named entity recognition model (NER)
- Pretrained part of speech tagger (POS)
For a working config file example see https://github.com/deepmipt/DeepPavlov/blob/0.0.8/deeppavlov/configs/ecommerce_bot/ecommerce_bot.json
To interact with a pretrained model run:
python -m deeppavlov interact <path_to_config> [-d]
<path_to_config> is a path to config file.
You can also train your own model by specifying config file and running:
python -m deeppavlov train <path_to_config>
The eCommerce bot configuration consists of the following parts:
You can use your own dataset_reader, dataset_iterator for specific data.
Let’s consider chainer in more details.
chainer - pipeline manager
in- pipeline input data: an user
queryand a dialog
out- pipeline output data:
responsethe structure with retrieved product items.
ecommerce_bot - BLEU-based textual similarity ranker.
min_similarity: lower boundary for textual similarity ranker (by default 0.5).
min_entropy: lower boundary for entropy (by default 0.5). If the entropy is less than
min_entropy, it’s omitted from the specification list.
entropy_fields: the specification attributes of the catalog items (by default “Size”, “Brand”, “Author”, “Color”, “Genre”).
preprocess: text preprocessing component.
query: a plain text user query.
state: dialog state.
items: product items in sorted order from
endindex (taken from the dialog state).
entropies: specification attributes with corresponding values in sorted order.
total: total number of retrieved results.
confidence: similarity confidence.
state: dialog state.
 Papineni, Kishore, et al. “BLEU: a method for automatic evaluation of machine translation.” Proceedings of the 40th annual meeting on association for computational linguistics. Association for Computational Linguistics, 2002.