Towards Personalized Agentic Social Support via Tool-Augmented Companionship
This is the official code repository for the paper "ComPASS: Towards Personalized Agentic Social Support via Tool-Augmented Companionship".
We hope this work can help shape future companion agents into a "compassionate compass" 🧭, guiding users with personalized support, understanding, and care.
Create and activate the conda environment using the following commands:
conda create -n compass_env python=3.13
conda activate compass_env
pip install -r requirements.txt-
CLIP-ViT-Base-Patch32 CLIP is used in the tool environment. You need to place the model into the following directory:
compass/data_synthesis/code/toolenv/sticker_respond/modelDownload link: openai/clip-vit-base-patch32 on Hugging Face -
All-mpnet-base-v2 You need to place the
all-mpnet-base-v2model into the following directory:compass/data_synthesis/code/toolenv/all-mpnet-base-v2Download link: sentence-transformers/all-mpnet-base-v2 on Hugging Face
- SERdataset
Download the dataset from SuperKogito/SER-datasets on GitHub. Once downloaded, place it into the following directory:
compass/data_synthesis/code/toolenv/sticker_respond/SERdataset
- Before proceeding, please run the following scripts to form a FAISS index:
python compass/data_synthesis/code/toolenv/sticker_respond/image2faiss.py python compass/data_synthesis/code/toolenv/psyweb_recommender/2faiss.py
Run the following script to generate the dataset:
python compass/data_synthesis/code/persona_gen_main.pyAlternatively, you can use the test data we have already synthesized for testing purposes, located at: compass/data_synthesis/data/test_set_correct_form.json
Run compass/evaluation/profile-based/code/generate_social_support_respond.py to generate tool invocation for target model.
Then use compass/evaluation/profile-based/code/evaluation.py to evaluate model under persona-based setting.
Run compass/evaluation/history-based/code/evaluation_with_his.py and compass/evaluation/history-based/code/evaluation_without_his.py to generate tool invocation with & without interaction history.
Then use compass/evaluation/history-based/code/evaluation_with_his.py and compass/evaluation/history-based/code/evaluation_without_his.py to evaluate model under history-based setting.
Please install ms-swift before starting the training process.
You have to download the Qwen3-8b model under the direction compass/train/model before start training
Use the provided shell script to start training:
bash compass/train/train_qwen3_8b.shUse
python compass/evaluation/profile-based/code/inference_respond.pyfor profile-based and
python compass/evaluation/history-based/code/inference_toolinvoc_his.py
python compass/evaluation/history-based/code/inference_toolinvoc_nohist.pyfor history-based.