Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
huanhuan6666 authored Nov 12, 2024
1 parent ee8f0ee commit 05e8d86
Showing 1 changed file with 34 additions and 16 deletions.
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
# PairCoder
A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinement
# PairCoder 🤖💻

**This paper has been accepted by ASE 2024 and awarded the 🏆 ACM SIGSOFT Distinguished Paper Award.**
<p align="center">
<a href="https://arxiv.org/abs/2409.05001"><img src="https://img.shields.io/badge/arXiv-2409.05001-b31b1b.svg"></a>
<a href="https://conf.researchr.org/home/ase-2024"><img src="https://img.shields.io/badge/ASE-2024-blue.svg"></a>
<a href="https://conf.researchr.org/info/ase-2024/awards"><img src="https://img.shields.io/badge/-ACM%20SIGSOFT%20Distinguished%20Paper%20%F0%9F%8F%86-brightgreen"></a>
</p>

<p align="center">
<a href="#overview">📖Overview</a> •
<a href="#prepare-environment">🧪Environment</a> •
<a href="#quick-start">🚀Quick Start</a> •
<a href="#citation">📝Citation</a>
</p>


## 📖Overview

## Overview
In this paper, we draw on pair programming practices to propose **PairCoder**, a novel LLM-based framework for code generation. PairCoder incorporates two collaborative LLM agents, namely a *Navigator* agent for high-level planning and a *Driver* agent for specific implementation.

The *Navigator* is responsible for proposing promising solution plans, selecting the current optimal plan, and directing the next iteration round based on execution feedback.
The *Driver* follows the guidance of *Navigator* to undertake initial code generation, code testing, and refinement. This interleaved and iterative workflow involves multi-plan exploration and feedback-based refinement, which mimics the collaboration of pair programmers.

![model](assets/method_flow.gif)
## Prepare Environment

## 🧪Prepare Environment

PairCoder is developed on Ubuntu 16.04 LTS.
Please follow these steps to set up the Python environment:

```
```bash
conda create -n PairCoder python=3.10
conda activate PairCoder
pip install -r requirements.txt
Expand All @@ -21,28 +38,29 @@ pip install -r requirements.txt
Please set your API KEY in `settings/configuration.toml`.
This file also contains numerous other configurable options that allow you to fine-tune and precisely control the behavior of PairCoder.

## Quick Start
## 🚀Quick Start

Use the following command to perform code generation:

```
```bash
python src/solve_dataset.py \
--dataset_name mbpp \
--dataset_name mbpp \
--split_name test \
--dir_path results
```

For the given `$split_name` of the `$dataset_name`, the logs and the final `solutions.json` are stored in `$dir_path`. You can set `$id_list` for ids to solve.
For the given `split_name` of the `dataset_name`, the logs and the final `solutions.json` are stored in `dir_path`. You can set `id_list` for ids to solve.

## Reference
## 📝Citation

If you find the code helpful, please cite our paper:
```

```bibtex
@inproceedings{zhang2024paircoder,
title = { A Pair Programming Framework for Code Generation via
Multi-Plan Exploration and Feedback-Driven Refinement },
author = { Zhang, Huan and Cheng, Wei and Wu, Yuhan and Hu, Wei },
booktitle = { ASE },
year = { 2024 }
title = {A Pair Programming Framework for Code Generation via
Multi-Plan Exploration and Feedback-Driven Refinement},
author = {Zhang, Huan and Cheng, Wei and Wu, Yuhan and Hu, Wei},
booktitle = {The 39th IEEE/ACM International Conference on Automated Software Engineering (ASE 2024)},
year = {2024}
}
```

0 comments on commit 05e8d86

Please sign in to comment.