IDEAS home Printed from https://ideas.repec.org/a/nat/nature/v639y2025i8055d10.1038_s41586-025-08661-4.html
   My bibliography  Save this article

Optimizing generative AI by backpropagating language model feedback

Author

Listed:
  • Mert Yuksekgonul

    (Stanford University)

  • Federico Bianchi

    (Stanford University)

  • Joseph Boen

    (Stanford University)

  • Sheng Liu

    (Stanford University)

  • Pan Lu

    (Stanford University)

  • Zhi Huang

    (Stanford University)

  • Carlos Guestrin

    (Stanford University
    Chan Zuckerberg Biohub)

  • James Zou

    (Stanford University
    Stanford University
    Chan Zuckerberg Biohub)

Abstract

Recent breakthroughs in artificial intelligence (AI) are increasingly driven by systems orchestrating multiple large language models (LLMs) and other specialized tools, such as search engines and simulators. So far, these systems are primarily handcrafted by domain experts and tweaked through heuristics rather than being automatically optimized, presenting a substantial challenge to accelerating progress. The development of artificial neural networks faced a similar challenge until backpropagation and automatic differentiation transformed the field by making optimization turnkey. Analogously, here we introduce TextGrad, a versatile framework that performs optimization by backpropagating LLM-generated feedback to improve AI systems. By leveraging natural language feedback to critique and suggest improvements to any part of a system—from prompts to outputs such as molecules or treatment plans—TextGrad enables the automatic optimization of generative AI systems across diverse tasks. We demonstrate TextGrad’s generality and effectiveness through studies in solving PhD-level science problems, optimizing plans for radiotherapy treatments, designing molecules with specific properties, coding, and optimizing agentic systems. TextGrad empowers scientists and engineers to easily develop impactful generative AI systems.

Suggested Citation

  • Mert Yuksekgonul & Federico Bianchi & Joseph Boen & Sheng Liu & Pan Lu & Zhi Huang & Carlos Guestrin & James Zou, 2025. "Optimizing generative AI by backpropagating language model feedback," Nature, Nature, vol. 639(8055), pages 609-616, March.
  • Handle: RePEc:nat:nature:v:639:y:2025:i:8055:d:10.1038_s41586-025-08661-4
    DOI: 10.1038/s41586-025-08661-4
    as

    Download full text from publisher

    File URL: https://www.nature.com/articles/s41586-025-08661-4
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1038/s41586-025-08661-4?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:nat:nature:v:639:y:2025:i:8055:d:10.1038_s41586-025-08661-4. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.nature.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.