Home

Awesome

CLAIRify

Errors are Useful Prompts: Instruction Guided Task Programming with Verifier-Assisted Iterative Prompting

This repository contains

Tutorial

Open In Colab

A tutorial on CLAIRify is provided as Jupyter Notebook.

Requirement

You need to set your OpenAI API key in OPENAI_API_KEY environment variable.

How to run

To generate a XDL protocol from a natural language description of an experiment, run the following:

python3 xdlgenerator/nlp2xdl.py --input_dir /path/to/experiment/dir

where /path/to/experiment/dir is a directory containing natural language experiments. Each experiment is assumed to be its own file in the dictory (e.g. expertiment1.txt, experiment2.txt). Running the script will automatically generate an output directory /path/to/experiment/dir_output. Each file in the new directory contains a XDL description.

Note: This repository contains the original code for the CLAIRify paper, which is incompatible with the current OpenAI API. Please check the develop branch for the updated version.