zou-group/textgrad
An autograd engine that uses LLMs to backpropagate textual gradients for optimizing prompts and ML system components.

Velocity · 7d
+4.9
★ / day
Trend
→steady
star history
TextGrad implements automatic differentiation via text by treating LLM outputs as differentiable signals. It provides a PyTorch-like API that enables defining custom loss functions and optimizing them through text feedback from LLMs. The framework treats prompts, model outputs, and system components as optimizable variables, computing textual gradients that guide the optimization process.