Core Idea: Iteratively swap the annotated objectives of (x, y); replace the template with one generated from data, which then self-refines based on the similarity score between cells.
Usage:
git clone https://github.com/TerryPei/Annotator.git
cd AnnotatorReplace the API key in the prepare folder:
cd prepare
python encrypt_api_key.pyThe APIs of OpenAI have been changed. When conducting the experiments, please reinstall the previous version '0.28.0':
pip install -U openai==0.28.0One-Shot Stages:
python annotator.py
The correctly runing will output the log files like this:

Second stages:
Copy and paste the best template from the log file to generation python file, and run with
cd generation
python run_generate_summary.pyThe recovery evaluation score could be directly get via eval.py.
The annotated dataset link https://drive.google.com/drive/folders/1MyxU1DE5hE5ANbDc3g8e4bSBVFQek5nH?usp=sharing.
@article{pei2023gpt,
title={Gpt self-supervision for a better data annotator},
author={Pei, Xiaohuan and Li, Yanxi and Xu, Chang},
journal={arXiv preprint arXiv:2306.04349},
year={2023}
}