Skip to content

hzp3517/ComPASS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧭 ComPASS

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.

Table of Contents


Preparation of Tool Environment

Step 1: Environment Installation

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

Step 2: Model Preparation

  1. 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/model Download link: openai/clip-vit-base-patch32 on Hugging Face

  2. All-mpnet-base-v2 You need to place the all-mpnet-base-v2 model into the following directory: compass/data_synthesis/code/toolenv/all-mpnet-base-v2 Download link: sentence-transformers/all-mpnet-base-v2 on Hugging Face

Step 3: Data Preparation

  1. 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

Step 4: Code Preparation

  1. 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

CompassBench Data Synthesis

Run the following script to generate the dataset:

python compass/data_synthesis/code/persona_gen_main.py

Alternatively, you can use the test data we have already synthesized for testing purposes, located at: compass/data_synthesis/data/test_set_correct_form.json


Evaluation

Profile-based setting

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.

History-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.


Training

Step 1: Installation

Please install ms-swift before starting the training process.

Step 2: Model Preperation

You have to download the Qwen3-8b model under the direction compass/train/model before start training

Step 3: Start Training

Use the provided shell script to start training:

bash compass/train/train_qwen3_8b.sh

Step 4: Inference

Use

python compass/evaluation/profile-based/code/inference_respond.py

for profile-based and

python compass/evaluation/history-based/code/inference_toolinvoc_his.py 
python compass/evaluation/history-based/code/inference_toolinvoc_nohist.py

for history-based.


About

The data and code of the paper "ComPASS: Towards Personalized Agentic Social Support via Tool-Augmented Companionship".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors