Home

Awesome

<div align="center"> <img src="IMG/logo.jpg" width="55%"> </div>

An Instruction-Following Large Language Model For E-commerce

Pytorcharxiv badge

Repo for EcomGPT: Instruction-tuning Large Language Models with Chain-of-Task Tasks for E-commerce

<div align="center"> <img src="IMG/method.jpg" width="60%" height="auto" /> </div>

πŸ’‘ Perfomance

We perform a human evaluation on EcomGPT and ChatGPT using 12 E-commerce held-out datasets. EcomGPT outperforms or tied ChatGPT on 12 datasets.

<div align="center"> <img src="IMG/performance.jpg" width="300"> </div>

πŸ›  Dependencies

pip install -r requirement.txt

Details

πŸ’» Model

The EcomGPT (7b1) is available at ModelScope.

πŸ“š Dataset (EcomInstruct)

We first open source 12 evaluation datasets. To ensure evaluation efficiency, each evaluation dataset is sampled with only 500 instances.

DatasetLang.TaskMetric
LenoveENNamed Entity RecognizationF1, Rouge
LenoveENEntity Span DetectionRouge
RedditENExtractive QARouge
ABSAENReview Topic ClassificationF1, Rouge
MEPAVEZHAttribute Value RecognizationF1, Rouge
MEPAVEZHAttribute Value DetectionRouge
Multi-CPRZHProduct SelectRouge
Multi-CPRZHProduct AlignF1, Rouge
OpenBGZHTitle Attritube MatchingF1, Rouge
OpenBGZHFine-grain Product ClassifyF1, Rouge
OpenBGZHCoarse-grain Product ClassifyF1, Rouge
OpenBGZHTitle GenerateRouge

The dataset files satisfy the following file hierarchy:

.
β”œβ”€β”€ [Dataset Name]
β”‚   └── tasks
β”‚       └── [task name]
β”‚           β”œβ”€β”€ meta-info.json
β”‚           └── test.json
...
└── Reddit_QA
    └── tasks
        └── EN-Reddit_QA-Extract-Extract_QA
            β”œβ”€β”€ meta-info.json
            └── test.json

πŸ” Evaluation

One can evaluate the performance of EcomGPT with the following command:

python eval.py -tf ./test_tasks.txt -m [model name or path] -sn [result file name] -bdd [base dataset dir]

πŸ”₯ TODO

πŸ“„ Citation

If you found this work useful, consider giving this repository a star and citing our paper as followed:

@article{li2023ecomgpt,
  title={EcomGPT: Instruction-tuning Large Language Models with Chain-of-Task Tasks for E-commerce},
  author={Li, Yangning and Ma, Shirong and Wang, Xiaobin and Huang, Shen and Jiang, Chengyue and Zheng, Hai-Tao and Xie, Pengjun and Huang, Fei and Jiang, Yong},
  journal={arXiv preprint arXiv:2308.06966},
  year={2023}
}