This application relates to the field of large
language model technology, and discloses a method, apparatus, device, and storage medium for model performance optimization. The method includes: acquiring an initial dataset and expanding the problem using a large
language model to obtain a target dataset; converting the problem into an actual
database query statement using the large
language model; performing data queries based on the actual
database query statement and a
reference database query statement to obtain actual query results and reference query results; evaluating the performance of the large language model based on the
reference database query statement, the actual
database query statement, the reference query results, and the actual query results to obtain a model performance
score; and optimizing the large language model based on the model performance
score and the target dataset to obtain an optimized large language model. This application improves the accuracy of
SQL statement conversion by increasing the data richness of the dataset, thereby enabling accurate performance evaluation of the large language model.