ADO : Automatic Data Optimization for Inputs in LLM Prompts (2025)

Abstract: This study explores a novel approach to enhance the performance of Large Language Models (LLMs) through the optimization of input data within prompts. While previous research has primarily focused on refining instruction components and augmenting input data with in-context examples, our work investigates the potential benefits of optimizing the input data itself. We introduce a two-pronged strategy for input data optimization: content engineering and structural reformulation. Content engineering involves imputing missing values, removing irrelevant attributes, and enriching profiles by generating additional information inferred from existing attributes. Subsequent to content engineering, structural reformulation is applied to optimize the presentation of the modified content to LLMs, given their sensitivity to input format. Our findings suggest that these optimizations can significantly improve the performance of LLMs in various tasks, offering a promising avenue for future research in prompt engineering. The source code is available at https://github.com/glin2229/Automatic-Data-Optimization.

## introduction large language models (llms) @xcite @xcite have demonstrated exceptional proficiency across a wide array of tasks. they have been successfully implemented in various real-world applications, including personalized recommendations @xcite @xcite , healthcare @xcite , financial decision-making @xcite , and advanced language reasoning @xcite @xcite . in particular, llm prompting has become a critical research area @xcite . corresponding: gl550@scarletmail.rutgers.edu this is because llms are highly sensitive to input content and format; even slight modifications, such as changes in word order or indentation, can significantly influence their performance @xcite @xcite . when llms are employed for task inferencing, a user prompt (or query) typically comprises two primary components: a task-specific instruction and the input data to be processed according to that instruction. for example,when employing an llm for heart disease classification @xcite , the task-specific instruction can be "analyze the following user's health profile to determine the likelihood of a heart attack", while the input data can include the individual's health profile, encompassing attributes such as age, medical history, and lifestyle habits. in the context of personalized recommendations, such as for beauty products @xcite , the instruction can be "generate beauty product recommendations based on the user's recent interaction history with other beauty products", with the input data consisting of the user's interaction history and a set of candidate beauty products to make recommendations from. various prompting methods have been proposed to enhance the inference performance of llms. for example, multiple studies have focused on crafting manual prompting strategies @xcite @xcite , such as chain-of-thought (cot) reasoning @xcite . additionally, automated methods have been developed to search for optimal instructions tailored to specific tasks @xcite . for instance, ape @xcite introduces an iterative monte carlo search to refine prompt instructions. other works focus on providing in-context demonstrations @xcite , offering examples to guide the model's responses. most prior works on prompt engineering have focused on two aspects: (1) optimizing the instruction component of the prompt and (2) augmenting the input data with additional context, such as incontext exemplars, as illustrated on the "traditional approach" section of figure 1 . nevertheless, the role of input data optimization in enhancing llm performance remains underexplored. to address this gap, we investigate whether optimizing the input data portion of the prompt can also enhance performance, as depicted on the "proposed solution" section of figure 1 . towards this goal, we propose a new framework "automatic data optimization (ado)" as well as a new algorithm, "diverse prompt search (dps)". this framework can optimize input data through two key strategies: content engineering and structural reformulation. first, we apply content engineering to refine input data, such as imputing missing values based on domain knowledge and removing irrelevant attributes that may hinder decision-making. second, we leverage structural reformulation to modify the format of input data, aiming to optimize data presentation to llms. together, our proposed framework has demonstrated its effectiveness to complement conventional prompting strategies to enhance llm inference performance. ## ado framework this section outlines the objectives of input data optimization and explains the mechanisms by which the ado framework achieves these objectives. ## implementation details this section provides key implementation details of the ado framework, including the structure of meta-prompts, the execution of parallelized data optimization tasks, and the handling of llm hallucinations through multi-agent debate with crossvalidation. by leveraging these components, the ado framework effectively enhances both the content and format of input data to improve performance across diverse tasks while maintaining factual accuracy and efficiency. ## experiments in this section, we aim to evaluate: (1) the effectiveness of ado as a standalone approach for performance enhancement, (2) whether dps outperforms existing optimization algorithms in searching for data-optimization procedures, and (3) whether integrating ado with other prompt engineering methods can further improve their performance. ## related work numerous approaches have been proposed for modifying prompts to enhance llm performance, such as in-context learning and instruction optimization. in-context learning concentrates on providing the llm with additional in-prompt exemplars from the same task domain, typically in the form of input data paired with their corresponding labels or outputs @xcite @xcite . this method capitalizes on the model's ability to generalize from in-prompt examples, enabling the llm to better comprehend the expected output format and task-specific requirements based on the provided exemplars. instruction optimization aims to modify the instruction part of the prompt to improve llm performance. for example, @xcite points out that composing better instructions can greatly boost llm's performance on task inferencing. @xcite proposes cot reasoning, which introduces immediate reasoning steps into the output generation process. as demonstrated by @xcite , employing zero-shot cot substantially improve llm performance tasks including logical reasoning, fraud detection, among many others. extending beyond manually crafted instructions, various studies have proposed automated methods to search for optimal instructions tailored to specific tasks @xcite @xcite . for instance, ape @xcite introduces an iterative monte carlo search to refine prompt instructions. it first uses an instructionproposing llm to generate a set of candidate instructions, then evaluates each on a validation set to select the best-performing candidates. despite these advances, directly optimizing the presentation of input data has received little attention. in this work, we hypothesize that optimizing both the data content and format may yield performance improvement when employing llm for task inferencing. building on the principles of automatic prompt optimization, we propose a novel framework called automatic data optimization (ado). in ado, an llm, denoted as llm g , iteratively proposes and searches data-optimization instructions aimed at maximizing llm performance. ## conclusions in this paper, we introduce a new sub-direction of prompt engineering: input data optimization, facilitated by the ado framework and the dps algorithm. the ado framework automates content and format optimization by leveraging llms as universal domain experts, reducing the need for manual data processing. dps enhances this process by generating diverse data optimization prompts, enabling broader exploration and increasing the likelihood of identifying optimal procedures. empirical results demonstrate that ado not only improves modeling performance when used alone but also further enhances performance when combined with other prompt engineering methods. in the future, we plan to include credible taskspecific factual knowledge bases to facilitate retrieval augmented generations @xcite , in order to further mitigate hallucination. we also aim to perform various interpretability studies under the context of input data optimization, as inspired by @xcite @xcite .