Go to file
Beck LaBash 8053a90b23 Fixes
2023-04-13 21:08:28 -04:00
benchmarks Leetcode Hard: Python3 Benchmark 2023-04-06 01:39:31 -04:00
executors Fixes 2023-04-13 21:08:28 -04:00
generators Fixes 2023-04-13 21:08:28 -04:00
lazzzy@404c06a5bf . 2023-03-28 21:10:06 -04:00
media media imgs 2023-04-04 16:32:23 -04:00
root Fixes 2023-04-13 21:08:28 -04:00
scratch . 2023-03-28 21:10:06 -04:00
.gitignore Leetcode Hard: Python3 Benchmark 2023-04-06 01:39:31 -04:00
.gitmodules LeetExecutor implementation 2023-04-04 21:36:12 -04:00
2023-04-12_23-12-20.jsonl Fixes 2023-04-13 21:08:28 -04:00
2023-04-12_23-22-43.jsonl Fixes 2023-04-13 21:08:28 -04:00
2023-04-12_23-36-32.jsonl Fixes 2023-04-13 21:08:28 -04:00
2023-04-12_23-54-35.jsonl Fixes 2023-04-13 21:08:28 -04:00
2023-04-13_00-00-57.jsonl Fixes 2023-04-13 21:08:28 -04:00
2023-04-13_21-02-29.jsonl Fixes 2023-04-13 21:08:28 -04:00
generate_dataset.py resume and optz 2023-04-03 16:57:54 -04:00
LICENSE Initial commit 2023-03-22 02:38:53 -04:00
main.py Fixes 2023-04-13 21:08:28 -04:00
plot.py all 2023-03-22 02:41:57 -04:00
README.md submodule info 2023-04-04 18:40:08 -04:00
reflexion_mbpp_py_logs . 2023-04-03 19:54:57 -04:00
reflexion_mbpp_py_logs2 . 2023-04-06 02:27:39 -04:00
reflexion_ucs.py Fixes 2023-04-13 21:08:28 -04:00
reflexion.py Fixes 2023-04-13 21:08:28 -04:00
requirements.txt working on ucs version of reflexion 2023-03-28 11:23:29 -04:00
run_reflexion_py_leet.sh Fixes 2023-04-13 21:08:28 -04:00
run_reflexion_ucs.sh . 2023-03-30 23:10:58 -04:00
run_reflexion.sh . 2023-04-06 02:27:39 -04:00
run_simple_py_leet.sh Fixes 2023-04-13 21:08:28 -04:00
run_simple.sh . 2023-04-03 20:57:44 -04:00
run_testacc.sh run testacc 2023-04-11 20:15:57 -04:00
simple_mbpp_py2_logs . 2023-04-03 23:28:12 -04:00
simple_mbpp_py_logs . 2023-04-03 19:54:57 -04:00
simple.py Fixes 2023-04-13 21:08:28 -04:00
test_acc.py Fixes 2023-04-13 21:08:28 -04:00
utils.py print only if verbose 2023-04-04 23:51:12 -04:00
validate_py_results.py validate 2023-03-29 03:23:59 -04:00
validate_rs_results.py validate rs 2023-04-01 21:33:08 -04:00

Mastering HumanEval with Reflexion

This is a spin-off project inspired by the paper: Reflexion: an autonomous agent with dynamic memory and self-reflection. Noah Shinn, Beck Labash, Ashwin Gopinath. Preprint, 2023

Read more about this project in this post.

Check out an interesting type-inference implementation here: OpenTau

Check out the code for the original paper here

If you have any questions, please contact noahshinn024@gmail.com

architecture

result

Cloning The Repository

The repository contains git submodules. To clone the repo with the submodules, run:

git clone --recurse-submodules

Note

Due to the nature of these experiments, it may not be feasible for individual developers to rerun the results due to limited access to GPT-4 and significant API charges. Due to recent requests, both trials have been rerun once more and are dumped in ./root with a script here to validate the solutions with the unit tests provided by HumanEval.

To run the validation on your log files or the provided log files:

python ./validate_py_results.py <path to jsonlines file>

Warning

Please do not run the Reflexion agent in an unsecure environment as the generated code is not validated before execution.

Cite

Note: This is a spin-off implementation that implements a relaxation on the internal success criteria proposed in the original paper.

@article{shinn2023reflexion,
  title={Reflexion: an autonomous agent with dynamic memory and self-reflection},
  author={Shinn, Noah and Labash, Beck and Gopinath, Ashwin},
  journal={arXiv preprint arXiv:2303.11366},
  year={2023}
}