IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v13y2025i16p2552-d1721023.html
   My bibliography  Save this article

Domain-Aware Reinforcement Learning for Prompt Optimization

Author

Listed:
  • Mengqi Gao

    (School of Computer and lnformation Engineering, Shanghai Polytechnic University, Shanghai 201209, China)

  • Bowen Sun

    (School of Computer and lnformation Engineering, Shanghai Polytechnic University, Shanghai 201209, China)

  • Tong Wang

    (School of Computer and lnformation Engineering, Shanghai Polytechnic University, Shanghai 201209, China)

  • Ziyu Fan

    (Department of Engineering, Durham University, Durham DH1 3LE, UK)

  • Tongpo Zhang

    (School of Computer and lnformation Engineering, Shanghai Polytechnic University, Shanghai 201209, China)

  • Zijun Zheng

    (College of Sciences, China Jiliang University, Hangzhou 310018, China)

Abstract

Prompt engineering provides an efficient way to adapt large language models (LLMs) to downstream tasks without retraining model parameters. However, designing effective prompts can be challenging, especially when model gradients are unavailable and human expertise is required. Existing automated methods based on gradient optimization or heuristic search exhibit inherent limitations under black box or limited-query conditions. We propose Domain-Aware Reinforcement Learning for Prompt Optimization (DA-RLPO), which treats prompt editing as a sequential decision process and leverages structured domain knowledge to constrain candidate edits. Our experimental results show that DA-RLPO achieves higher accuracy than baselines on text classification tasks and maintains robust performance with limited API calls, while also demonstrating effectiveness on text-to-image and reasoning tasks.

Suggested Citation

  • Mengqi Gao & Bowen Sun & Tong Wang & Ziyu Fan & Tongpo Zhang & Zijun Zheng, 2025. "Domain-Aware Reinforcement Learning for Prompt Optimization," Mathematics, MDPI, vol. 13(16), pages 1-20, August.
  • Handle: RePEc:gam:jmathe:v:13:y:2025:i:16:p:2552-:d:1721023
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/13/16/2552/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/13/16/2552/
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;

    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:gam:jmathe:v:13:y:2025:i:16:p:2552-:d:1721023. 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: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.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.