madaan/self-refine
Research implementation of Self-Refine, a technique where LLMs generate feedback on their own outputs and iteratively improve results through self-correction.

This repository implements the Self-Refine prompting technique from a research paper, enabling LLMs to critique their own generated outputs, apply the feedback to improve results, and repeat this process iteratively. It includes implementations and prompts for various tasks including acronym generation, dialogue response, code readability improvement, mathematical reasoning (GSM-8k), and visual diagram generation using GPT-4V. The framework uses prompt-lib to interface with various LLM backends.