Home

Awesome

Reverse Chain

Implementation of paper: Reverse Chain: A Generic-Rule for LLMs to Master Multi-API Planning. This implementation uses FAISS vector database to retrieve API documentation on the basis of the query.

THIS IS NOT AN OFFICIAL IMPLEMENTATION OF REVERSE CHAIN

Dependencies

Installation

To install and use Reverse-Chain, follow the steps given below:

(NOTE: It is recommended to install these requirements in a new python environment)

How to use?

Follow the steps given below:

Output

The output of the run is saved in output/run.json file and the logs are saved in logs/run.log file.

Future Developement

It is not completely correct and maynot produce similar results as claimed in the paper. The following are few points of developement that can be done in the implementation:

Code & Prompts

  1. Prompts can be made better.
  2. Code in main.py can be refactored to look prettier.
  3. ArgumentExtractor class returns the arguments found in the query, its prompt can be updated in a way that it selects arguments only that are needed for the current API.

Contributions

Contributions to Reverse-Chain are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.

Author

Abhishek Singh Kushwaha