mirror of
https://github.com/epfl-dlab/debategpt.git
synced 2026-12-04 09:48:40 +00:00
Read-only mirror of https://github.com/epfl-dlab/debategpt — EPFL Data Science & AI Lab (dlab). Issues & pull requests at the source.
- JavaScript 50%
- Jupyter Notebook 34.6%
- Python 14.5%
- Shell 0.4%
- TypeScript 0.3%
- Other 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| data | ||
| debategpt | ||
| scripts | ||
| .gitignore | ||
| .gitmodules | ||
| debategpt.yml | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
DebateGPT
This repo contains the code for the paper On the Conversational Persuasiveness of GPT-4, published in Nature Human Behaviour. The data is accessible at https://huggingface.co/datasets/frasalvi/debategpt.
Citation
Please cite our work as:
@article{Salvi2025,
title = {On the conversational persuasiveness of GPT-4},
volume = {9},
ISSN = {2397-3374},
DOI = {10.1038/s41562-025-02194-6},
number = {8},
journal = {Nature Human Behaviour},
publisher = {Springer Science and Business Media LLC},
author = {Salvi, Francesco and Horta Ribeiro, Manoel and Gallotti, Riccardo and West, Robert},
year = {2025},
month = may,
pages = {1645–1653}
}
Getting Started
Before proceeding, make sure you have the following installed:
Then follow these steps:
- Clone the repository
git clone --recurse-submodules git@github.com:epfl-dlab/debategpt.git
If you forgot to clone with --recurse-submodules, you can run the following command to get the submodules:
git submodule update --init --recursive
- Initialize a new conda environment
conda env create -f debategpt.yml
- Install required libraries
pip install -r requirements.txt
- Run the following command to install the R kernel in your environment:
conda install -c r r-irkernel
- Open R and run the following commands to install the necessary packages:
install.packages("IRkernel")
IRkernel::installspec(user = TRUE)
install.packages("readr")
install.packages("MASS")
install.packages("ordinal")
install.packages("brant")
install.packages("broom")
install.packages("generalhoslem")
install.packages("boot")
- Setup secrets
echo <your-openai-key> >> secrets/OPENAI_API_KEY.txt
Repo Structure
The repo is structured as follows:
assets/: stores the vector images generated for the paper.data/: stores the processed data used in the analysis.debategpt/: contains the code to recreate the experimental platform used in the paper to have people debate synchronously with other participants or with LLMs.scripts/: contains the code to process the data and run all the analyses presented in the paper.process_data.py: processes the raw data and saves the processed data in thedata/folder.regressionAnalysisR.ipynb: runs the regression analysis using R. This notebook should be run in an R environment.analysis.py: runs the analysis and generates the plots presented in the paper.extractLIWC.py: extracts LIWC features from the data. Called inprocess_data.py.extractStrategies.py: extracts persuasive strategies from the data. Called inprocess_data.py.extractTendimensions.py: extracts underlying social dimensions from the data. Called inprocess_data.py.