parsel  by ezelikman

Natural language framework for program synthesis using code language models

created 2 years ago
431 stars

Top 69.9% on sourcepulse

GitHubView on GitHub
Project Summary

Parsel is a natural language framework designed for generating complex programs across various target languages using large language models. It is aimed at researchers and developers working on algorithmic tasks like code synthesis, robotic planning, and theorem proving, enabling the creation of programs that satisfy unit tests or other constraints.

How It Works

Parsel employs a compositional approach, considering multiple potential implementations for each function. It then searches through these sets of implementations to discover programs that successfully pass specified unit tests or program constraints. This method allows for the exploration of diverse solutions and the synthesis of programs even when starting from natural language descriptions or incomplete code.

Quick Start & Requirements

  • Install via git clone https://github.com/ezelikman/parsel.git and pip install openai.
  • Requires an OpenAI API key stored in keys/codex_key.txt (format: organization_id:api_key).
  • Example usage involves running Python scripts with specific .ss files, e.g., python parsel.py programs/problem_solving.ss.
  • For Lean transpilation, set the mode in consts/__init__.py and ensure Lean is installed.
  • Official website and preprint available.

Highlighted Details

  • Supports automatic test generation for programs without existing tests.
  • Enables program synthesis from natural language, even without argument names.
  • Can transpile programs to different target languages (e.g., Lean).
  • Offers flags for expanding/decomposing programs and autofilling missing functions.

Maintenance & Community

The project is associated with authors from various institutions, with a preprint available on arXiv. No specific community channels like Discord or Slack are mentioned in the README.

Licensing & Compatibility

The project's code is available under a license that permits use, as indicated by the arXiv.org license for the preprint. Specific licensing for the code itself is not explicitly detailed beyond the general context of open-source availability.

Limitations & Caveats

The framework relies heavily on OpenAI models, necessitating an API key and incurring associated costs. The effectiveness of program generation is dependent on the capabilities of the underlying language models and the quality of the provided constraints or tests.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
21 more.

guidance by guidance-ai

0.1%
21k
Guidance is a programming paradigm for steering LLMs
created 2 years ago
updated 1 day ago
Feedback? Help us improve.