madaan/self-refine

LLMs can generate feedback on their work, use it to improve the output, and repeat this process iteratively.

43
/ 100
Emerging

Implements a three-stage prompting architecture with separate Generator, Critic, and Refiner components that work across diverse tasks including code readability, math reasoning (GSM-8k), sentiment transfer, and visual diagram generation via GPT-4V. Uses `prompt-lib` for LLM querying and provides task-specific prompt templates (Init, Feedback, Iterate) that can be customized per application domain. Includes built-in evaluation scripts and supports iterative refinement with configurable stopping criteria across six benchmark tasks.

785 stars. No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 17 / 25

How are scores calculated?

Stars

785

Forks

68

Language

Python

License

Apache-2.0

Last pushed

Oct 04, 2024

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/madaan/self-refine"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.