This project implements a multi-agent debate system for understanding how sycophancy dynamics shape the system performance.
Create a virtual enviroment and install dependencies.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtDownload models from Huggingface to run experiments in parallel
bash ./model_download/download_all_models.sh [model_dir]Before downloading the Llama model, you need to apply for the permission on Huggingface first if you haven't applied before, and then log in by huggingface-cli login.
For OpenAI, you need to set your API key first
export OPENAI_API_KEY="YOUR_KEY"Single Agent Testing
The usage case for mmlu pro is at scripts_api/run_single_agent.sh, and the use case for commonsenseqa is at scripts_api/run_multi_agent.sh
bash scripts_api/run_single_agent.shMulti Agent Testing by Decentralized Structure
# 2 agent
bash scripts_api/run_multi_agent.sh
#3 agent
bash scripts_api/run_multi_agent_3.shMulti Agent Testing by Centralized Structure
bash scripts_api/run_mad.shSingle Agent Testing
bash scripts_local/run_batch_single_agent.shMulti Agent Testing by Decentralized Structure
## 2 agent
bash scripts_local/run_batch_multi_agent.sh
## 3 agent
bash scripts_local/run_batch_multi_agent_3.shMulti Agent Testing by Centralized Structure
bash scripts_local/run_batch_mad.shSubmit job to the cluster by
bash scripts_local/run_cluster.sh
Multi Agent Testing by Decentralized Structure
## 2 agent
bash scripts_syco/run_batch_multi_agent_sycophancy.sh
## 3 agent
bash scripts_syco/run_batch_multi_agent_3_sycophancy.shMulti Agent Testing by Centralized Structure
bash scripts_local/run_batch_mad.shSubmit job to the cluster to test different sycophancy combinations by
bash scripts_syco/run_cluster_multi_agent_sycophancy_homo.sh
bash scripts_syco/run_cluster_multi_agent_sycophancy_heter.sh
bash scripts_syco/run_cluster_multi_agent_3_sycophancy_homo.sh
bash scripts_syco/run_cluster_multi_agent_3_sycophancy_heter.sh
bash scripts_syco/run_cluster_batch_mad.sh Gather results from different combinations
python gather_results.py --output-dir output_dirSet up the persona_vectors at scripts scripts_syco/run_batch_steering_multi_agent.sh Run the multi-agent testing by
bash scripts_syco/run_batch_steering_multi_agent.shEvaluation
bash scripts_eval/run_evaluate_debater.sh
bash scripts_eval/run_evaluate_judge.shAnalysis
bash scripts_eval/run_analyze.sh