{
  "id": "textgrad",
  "code": "PTL-0152",
  "term": "TextGrad",
  "aliases": [
    "textual backpropagation"
  ],
  "category": "optimization",
  "definition": "TextGrad is a framework that optimizes systems built from LLM calls by propagating natural-language feedback backward through the computation, so that each component, such as a prompt or a piece of code, is revised according to criticism of the final output.",
  "description": "It applies the idea of backpropagation to text, with an API modeled on PyTorch. Its authors used it to optimize prompts, code solutions, and answers to scientific questions. Like other feedback-driven optimizers, it is only as good as the evaluation signal it receives.",
  "example": null,
  "broader": [
    "prompt-optimization"
  ],
  "narrower": [],
  "related": [
    "protegi",
    "dspy",
    "self-refine"
  ],
  "introduced": 2024,
  "added": "2026-10-10",
  "sources": [
    {
      "title": "TextGrad: Automatic \"Differentiation\" via Text",
      "authors": "Yuksekgonul et al.",
      "year": 2024,
      "url": "https://arxiv.org/abs/2406.07496"
    }
  ],
  "url": "https://protologue.com/t/textgrad/",
  "citation": "Protologue. (2026). TextGrad. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0152). https://protologue.com/t/textgrad/"
}