This repository contains the official implementation of ReGeS — a domain-agnostic framework that unifies Retrieval and Generation in synergy for conversational recommender systems (CRS).
Modern RAG-based CRS often suffer from challenges in query reformulation and item generation, leading to less accurate recommendations. ReGeS addresses these challenges by integrating:
ReGeS requires no additional human annotations or domain-specific feature engineering, making the approach flexible and applicable across diverse recommendation scenarios.
Our evaluation of ReGeS covers extensive experiments on two widely used conversational recommendation datasets:
ReDial: Consisting of ~10K dialogues about movie recommendations. Although ReDial features more dialogues with shorter conversation turns, the candidate pool is large, making retrieval a challenging task.
Example conversation from ReDial (showing typical short, less informative interaction):
SEEKER: Hi I am looking for a movie like Super Troopers (2001)
RECOMMENDER: You should watch Police Academy (1984)
SEEKER: Is that a great one? I have never seen it. I have seen American Pie (1999)
INSPIRED: Comprising fewer but higher-quality dialogues with richer user preference details.
Example conversation from INSPIRED (showing typical in-depth preference exploration):
RECOMMENDER: Hi! I'm here to help you chose a movie!
SEEKER: Terrific
RECOMMENDER: What are some genres you like? What was the last movie you saw?
SEEKER: the last movie i saw in the theater was Hustlers. I generally like comedy, drama and documentaries
RECOMMENDER: How did you like Hustlers? It definitely has the drama aspect, did it leave you wanting more or was it not exactly what you were looking for?
SEEKER: I liked it, it wasn't the most high-brow movie i've ever seen but it was fun. I like to just enjoy
RECOMMENDER: And what are your thoughts on action in film?
SEEKER: I like some action. Just not too violent
As shown in these examples, INSPIRED conversations typically feature more turns and deeper exploration of user preferences, while ReDial conversations tend to be shorter and more direct, making preference inference more challenging.
ReGeS is compared against three groups of methods:
We evaluate ReGeS with the following configurations:
LLMs:
Retrievers:
Our baseline implementations follow published code for UniCRS, KBRD, and KGSF, while LLM-based and retrieval-augmented methods were re-implemented as described in prior works.
Create and activate the conda environment:
conda env create -f environment.yml
conda activate reages
Clone LLaMA-Factory (required for model training):
git clone --branch v0.9.1 --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
Set up your OpenAI API key:
export OPENAI_API_KEY=<your_openai_api_key>
Create required directories:
mkdir -p data/saved_models data/saved_adaptors
Note: Ensure your working directory is set appropriately (e.g., ../ReGeS/) for correct relative path resolution.
Download the following base models:
# Gemma-2B
huggingface-cli download google/gemma-2-2b-it --local-dir data/saved_models/gemma2b
# LLaMA 3.1-8B
huggingface-cli download meta-llama/Llama-3.1-8b-instruct --local-dir data/saved_models/llama3.1-8b-instruct
# Gemma-27B
huggingface-cli download google/gemma-2-27b-it --local-dir data/saved_models/gemma27b
Download the pre-trained models for each ReGeS module:
Generation-Augmented Query Reformulator Models:
huggingface-cli download Dylan1999/gemma2b_ssl --local-dir data/saved_models/gemma2b_ssl
huggingface-cli download Dylan1999/llama3.1-8b-instruct_ssl --local-dir data/saved_models/llama3.1-8b-instruct_ssl
huggingface-cli download Dylan1999/gemma27b_ssl --local-dir data/saved_models/gemma27b_ssl
Retrieval-Augmented Item Generator Models:
huggingface-cli download Dylan1999/gemma-2b_select --local-dir data/saved_models/gemma2b_select
huggingface-cli download Dylan1999/llama-8b_select --local-dir data/saved_models/llama3.1-8b-instruct_select
huggingface-cli download Dylan1999/gemma-27b_select --local-dir data/saved_models/gemma27b_select
Chain-of-Thought (CoT) Models:
huggingface-cli download Dylan1999/gemma-2b_cot --local-dir data/saved_models/gemma2b_cot
huggingface-cli download Dylan1999/llama-8b_cot --local-dir data/saved_models/llama3.1-8b-instruct_cot
huggingface-cli download Dylan1999/gemma-27b_cot --local-dir data/saved_models/gemma27b_cot
Generate queries using the Generation-Augmented Query Reformulator:
bash experiments/main/retrieval/G-enhanced-retrieval.sh
Run the Retrieval-Augmented Item Generator:
bash experiments/main/select/R-enhanced-generation.sh
Evaluate recommendations:
bash experiments/main/eval.sh
Run CoT experiments:
bash experiments/cot/cot.sh
Evaluate CoT results:
python src/eval/cot_eval.py
If you prefer training your own models rather than using the pre-trained versions, configuration files are provided in the configs/ directory.
bash experiments/main/retrieval/G-enhanced-retrieval-ft.sh
bash experiments/main/select/R-enhanced-generation-ft.sh
bash experiments/cot/cot_ft.sh
Following our paper, ReGeS is evaluated using three settings:
If you use this code or find our work helpful, please cite our paper:
@article{yang2025reges,
title = {ReGeS: Reciprocal Retrieval-Generation Synergy for Conversational Recommender Systems},
author = {Yang, Dayu and Fang, Hui},
year = {2025},
month = {sep},
journal = {arXiv preprint arXiv:2509.21371},
archivePrefix = {arXiv},
eprint = {2509.21371},
primaryClass = {cs.IR},
doi = {10.48550/arXiv.2509.21371},
url = {https://arxiv.org/abs/2509.21371},
note = {Accepted at WISE 2025}
}
2 commits
Python
86.0%
Shell
14.0%
This repository contains the official implementation of ReGeS — a domain-agnostic framework that unifies Retrieval and Generation in synergy for conversational recommender systems (CRS).
Modern RAG-based CRS often suffer from challenges in query reformulation and item generation, leading to less accurate recommendations. ReGeS addresses these challenges by integrating:
ReGeS requires no additional human annotations or domain-specific feature engineering, making the approach flexible and applicable across diverse recommendation scenarios.
Our evaluation of ReGeS covers extensive experiments on two widely used conversational recommendation datasets:
ReDial: Consisting of ~10K dialogues about movie recommendations. Although ReDial features more dialogues with shorter conversation turns, the candidate pool is large, making retrieval a challenging task.
Example conversation from ReDial (showing typical short, less informative interaction):
SEEKER: Hi I am looking for a movie like Super Troopers (2001)
RECOMMENDER: You should watch Police Academy (1984)
SEEKER: Is that a great one? I have never seen it. I have seen American Pie (1999)
INSPIRED: Comprising fewer but higher-quality dialogues with richer user preference details.
Example conversation from INSPIRED (showing typical in-depth preference exploration):
RECOMMENDER: Hi! I'm here to help you chose a movie!
SEEKER: Terrific
RECOMMENDER: What are some genres you like? What was the last movie you saw?
SEEKER: the last movie i saw in the theater was Hustlers. I generally like comedy, drama and documentaries
RECOMMENDER: How did you like Hustlers? It definitely has the drama aspect, did it leave you wanting more or was it not exactly what you were looking for?
SEEKER: I liked it, it wasn't the most high-brow movie i've ever seen but it was fun. I like to just enjoy
RECOMMENDER: And what are your thoughts on action in film?
SEEKER: I like some action. Just not too violent
As shown in these examples, INSPIRED conversations typically feature more turns and deeper exploration of user preferences, while ReDial conversations tend to be shorter and more direct, making preference inference more challenging.
ReGeS is compared against three groups of methods:
We evaluate ReGeS with the following configurations:
LLMs:
Retrievers:
Our baseline implementations follow published code for UniCRS, KBRD, and KGSF, while LLM-based and retrieval-augmented methods were re-implemented as described in prior works.
Create and activate the conda environment:
conda env create -f environment.yml
conda activate reages
Clone LLaMA-Factory (required for model training):
git clone --branch v0.9.1 --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
Set up your OpenAI API key:
export OPENAI_API_KEY=<your_openai_api_key>
Create required directories:
mkdir -p data/saved_models data/saved_adaptors
Note: Ensure your working directory is set appropriately (e.g., ../ReGeS/) for correct relative path resolution.
Download the following base models:
# Gemma-2B
huggingface-cli download google/gemma-2-2b-it --local-dir data/saved_models/gemma2b
# LLaMA 3.1-8B
huggingface-cli download meta-llama/Llama-3.1-8b-instruct --local-dir data/saved_models/llama3.1-8b-instruct
# Gemma-27B
huggingface-cli download google/gemma-2-27b-it --local-dir data/saved_models/gemma27b
Download the pre-trained models for each ReGeS module:
Generation-Augmented Query Reformulator Models:
huggingface-cli download Dylan1999/gemma2b_ssl --local-dir data/saved_models/gemma2b_ssl
huggingface-cli download Dylan1999/llama3.1-8b-instruct_ssl --local-dir data/saved_models/llama3.1-8b-instruct_ssl
huggingface-cli download Dylan1999/gemma27b_ssl --local-dir data/saved_models/gemma27b_ssl
Retrieval-Augmented Item Generator Models:
huggingface-cli download Dylan1999/gemma-2b_select --local-dir data/saved_models/gemma2b_select
huggingface-cli download Dylan1999/llama-8b_select --local-dir data/saved_models/llama3.1-8b-instruct_select
huggingface-cli download Dylan1999/gemma-27b_select --local-dir data/saved_models/gemma27b_select
Chain-of-Thought (CoT) Models:
huggingface-cli download Dylan1999/gemma-2b_cot --local-dir data/saved_models/gemma2b_cot
huggingface-cli download Dylan1999/llama-8b_cot --local-dir data/saved_models/llama3.1-8b-instruct_cot
huggingface-cli download Dylan1999/gemma-27b_cot --local-dir data/saved_models/gemma27b_cot
Generate queries using the Generation-Augmented Query Reformulator:
bash experiments/main/retrieval/G-enhanced-retrieval.sh
Run the Retrieval-Augmented Item Generator:
bash experiments/main/select/R-enhanced-generation.sh
Evaluate recommendations:
bash experiments/main/eval.sh
Run CoT experiments:
bash experiments/cot/cot.sh
Evaluate CoT results:
python src/eval/cot_eval.py
If you prefer training your own models rather than using the pre-trained versions, configuration files are provided in the configs/ directory.
bash experiments/main/retrieval/G-enhanced-retrieval-ft.sh
bash experiments/main/select/R-enhanced-generation-ft.sh
bash experiments/cot/cot_ft.sh
Following our paper, ReGeS is evaluated using three settings:
If you use this code or find our work helpful, please cite our paper:
@article{yang2025reges,
title = {ReGeS: Reciprocal Retrieval-Generation Synergy for Conversational Recommender Systems},
author = {Yang, Dayu and Fang, Hui},
year = {2025},
month = {sep},
journal = {arXiv preprint arXiv:2509.21371},
archivePrefix = {arXiv},
eprint = {2509.21371},
primaryClass = {cs.IR},
doi = {10.48550/arXiv.2509.21371},
url = {https://arxiv.org/abs/2509.21371},
note = {Accepted at WISE 2025}
}
2 commits
Python
86.0%
Shell
14.0%