zou-group/textgrad

TextGrad: Automatic ''Differentiation'' via Text -- using large language models to backpropagate textual gradients. Published in Nature.

57
/ 100
Established

This project helps anyone working with large language models (LLMs) to refine and improve their text outputs. You provide an initial LLM response and a natural language instruction describing what makes a good or bad answer. TextGrad then iteratively adjusts the LLM's output to better meet your criteria, making it suitable for prompt engineers, content creators, or researchers.

3,416 stars. Used by 1 other package. No commits in the last 6 months. Available on PyPI.

Use this if you need to systematically improve the quality, accuracy, or specific style of text generated by LLMs without manually rewriting prompts or outputs.

Not ideal if you are looking for a tool to train or fine-tune LLMs themselves, or if your evaluation criteria cannot be clearly articulated in natural language.

LLM output refinement prompt engineering AI content generation text optimization AI-assisted writing
Stale 6m
Maintenance 2 / 25
Adoption 11 / 25
Maturity 25 / 25
Community 19 / 25

How are scores calculated?

Stars

3,416

Forks

281

Language

Python

License

MIT

Last pushed

Jul 25, 2025

Commits (30d)

0

Dependencies

12

Reverse dependents

1

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/zou-group/textgrad"

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