Official Implementation of Unveiling User Preferences: A Knowledge Graph and LLM-Driven Approach for Conversational Recommendation
Follow these steps to set up the environment:
-
Create a Conda Environment
Use the provided
environment.yml
file to create and activate the Conda environment:conda env create -f environment.yml conda activate compass
-
Set up Hugging Face Token
Add your Hugging Face token to a .env file. Ensure you have accepted the license agreements for the required model. Visit the Hugging Face website to review and accept the agreements.
HUGGINGFACE_API_KEY=<your_huggingface_token>
To train the COMPASS model, run the following command:
python main.py
You can specify dataset, models in the config/default.yaml
file.
- Dataset-specific configurations can be found in the
config/dataset/
folder. - Model-specific configurations can be found in the
config/model/
folder.
Once training is complete, copy the generated user preference summary folder to: data/<dataset_name>/preprocessed/llm_outputs/compass/
folder.
Then update the config/default.yaml
file with the baseline model name and run the following command:
python main.py
@article{qiu2024unveiling,
title={Unveiling User Preferences: A Knowledge Graph and LLM-Driven Approach for Conversational Recommendation},
author={Qiu, Zhangchi and Luo, Linhao and Pan, Shirui and Liew, Alan Wee-Chung},
journal={arXiv preprint arXiv:2411.14459},
year={2024},
}