This repository contains code for the EMNLP 2025 Findings paper Chain of Strategy Optimization Makes Large Language Models Better Emotional Supporter
The system generates high-quality emotional support conversations through a three-stage pipeline:
- Conversation Tree Generation (
run.py): Uses MCTS to explore different emotional support strategies and generate conversation trees - Preference Data Construction (
build_data.py): Converts conversation trees into preference-annotated dialogue histories - Dataset Conversion: Transforms dialogue histories into either preference pairs (
change_data.py) or KTO datasets (change_data_kto.py)
python run.py- Uses MCTS to explore emotional support strategies
- Generates conversation trees with multiple response options
- Saves trees as pickle files in
output/tree/
python build_data.py- Converts conversation trees into dialogue histories
- Extracts preferred vs. non-preferred responses
- Generates comparison data with strategy annotations
For Preference Pairs:
python change_data.pyFor KTO Dataset:
python change_data_kto.py@article{zhao2025chain,
title={Chain of Strategy Optimization Makes Large Language Models Better Emotional Supporter},
author={Zhao, Weixiang and Sui, Xingyu and Han, Xinyang and Deng, Yang and Hu, Yulin and Guo, Jiahe and Qin, Libo and Du, Qianyun and Wang, Shijin and Zhao, Yanyan and others},
journal={arXiv preprint arXiv:2503.05362},
year={2025}
}