A multi-agent system for consensus-based text processing, implementing the "NetSafe" approach for analyzing how reviewer avoid malicious nodes during the tasks with large language models.
Based on the paper: Netsafe
-
Clone the repository:
git clone git@github.com:zzjc1234/MAS-Consensus.git cd MAS_Consensus -
Install dependencies:
This project uses uv for package management.
- To install
uv, check uv installation - Install the dependencies, including the development dependencies, by running:
uv sync --extra dev # install required packages for dev source .venv/bin/activate # activate the virtual env for this prj
To install the pre-commit hook, run
pre-commit install
- To install
- Run experiments from the repo root with
./run_experiments.sh; it reads scenarios fromexperiment.psvand stores outputs undersrc/output/. - Evaluate aggregated results after an experiment run with:
python -m src.mas_consensus.evaluate --evaluation dynamic_MJA --model gemini-2.5-flash --graph_types chain circle complete star tree --agent_num 6 --attacker_num 0 --sample_ids 3 --aggregate_by_topology --datasets csqa- To evaluate files individually instead, use
./evaluate.sh.