Beyond Prompt Engineering: A Reinforced Token-Level Input Refinement for Large Language Models

Authors

  • Guang Huang University of Macau
  • Yanan Xiao Northeast Normal University
  • Lu Jiang Dalian Martime University
  • Minghao Yin Northeast Normal University
  • Pengyang Wang University of Macau

DOI:

https://doi.org/10.1609/aaai.v39i22.34586

Abstract

In the rapidly developing field of automatic text generation and understanding, the quality of input data has been shown to be a key factor affecting the efficiency and accuracy of large language model (LLM) output. With the advent of advanced tools such as ChatGPT, input refinement work has mainly focused on prompt engineering. However, existing methods are often too dependent on specific contexts and are easily affected by individual expert experience and potential biases, limiting their wide applicability in diverse real-world applications. To address this problem, this study develops an Reinforced Token-Level Input Refinement, called RTLIR. We choose to optimize the input data at the fine-grained level of tokens, cleverly preserving the original text structure. Operationally, each state is defined by the token set of the current text, and each action is a binary decision process to decide whether to retain a specific token information. The agent automatically calculates and determines the selection probability of each token based on the current state, thereby optimizing the entire decision process. Through continuous exploration and learning, the agent can autonomously learn to identify the key inputs that have the greatest impact on the generation results and achieve refinement of the input data. In addition, RTLIR is a plug-and-play, LLM-agnostic module that can be used for a wide range of tasks and models. Experimental results show that RTLIR improves the performance of LLM in various input scenarios and tasks, with an average accuracy increase of 6%.

Downloads

Published

2025-04-11

How to Cite

Huang, G., Xiao, Y., Jiang, L., Yin, M., & Wang, P. (2025). Beyond Prompt Engineering: A Reinforced Token-Level Input Refinement for Large Language Models. Proceedings of the AAAI Conference on Artificial Intelligence, 39(22), 24113-24121. https://doi.org/10.1609/aaai.v39i22.34586

Issue

Section

AAAI Technical Track on Natural Language Processing I