This repository contains the replication package and dataset of the study titled "Neither human nor rational: how artificial intelligence reshapes conflict". The work is currently under submission.
scripts/llm-prompter/— main experiment drivers, provider config, and Prompter templates.scripts/decision-classification/— classification helper and label schema.data/— prompt plans, datasets and intermediate outputs.scripts/data_analysis/— R scripts and analysis artifacts.
Prerequisites
- Python 3.12+ recommended
- Git
Quick setup (recommended)
- Clone the repository and enter the folder.
- Create and activate a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate- Install dependencies for the subproject you plan to run. Example for
llm-prompter:
pip install -r scripts/llm-prompter/requirements.txtFor the decision-classification helper:
pip install -r scripts/decision-classification/requirements.txt- Create a
.envfile with your provider API keys (seescripts/llm-prompter/README.mdfor details).
Sequential (small runs)
Change to the scripts/llm-prompter folder and run main.py:
cd scripts/llm-prompter
python3 main.py -i ../../data/prompts_plan_FULL_30_REP.json \
-o ./replication-outputs/replication.json \
-p ./llm_provider_config.json \
--llm Mistral-Large-2407 --temp 0.0 --delay 5Parallel (large-scale)
Use parallel_main.py for parallelized runs. The script creates checkpoints under prompter_checkpoints/ and logs under logs/.
python3 parallel_main.py -i ../../data/prompts_plan_FULL_30_REP.json \
-o ./replication-outputs/replication.json -p ./llm_provider_config.json --delay 5Recovering checkpoints
If a run is interrupted, use recover_checkpoints.py (see scripts/llm-prompter/README.md) to merge checkpoint data into a new input file and resume.
scripts/decision-classification/classify.py labels CSV rows using an LLM. Example (via .vscode launch config):
python3 scripts/decision-classification/classify.py -i data/manually_classified_data.csv -c answer --limit 20 --output output/result-test.csv --model azure/gpt-5-chat --categories scripts/decision-classification/categories.jsonNotes
- By default the script will overwrite the input file if
--outputis not provided; see the script's warnings. - Use
--restoreto skip rows that are already classified and resume a previous run.
- Provider mapping and model flags: scripts/llm-prompter/llm_provider_config.json.
- Per-subfolder
requirements.txtfiles list Python dependencies. - Environment variables and API keys should be stored in a
.envfile (not committed).
- See scripts/llm-prompter/README.md for detailed instructions on running experiment drivers.
This project includes a LICENSE file. Refer to it for license terms.