## 3 Model Design and Implementation
### Pre-Processing
Typically, it calculates the precision and recall between the generated SQL and the target SQL and then computes the F1 value as a comprehensive evaluation. 1. VES (Value Execution Score)

VES refers to Value Execution Score, a new metric in NL2 SQL that focuses on whether the generated SQL queries can correctly retrieve specific values while satisfying the query conditions. For example, if the query results contain specific numbers, strings, or dates, VES evaluates the accuracy of the generated SQL queries in terms of condition expression and value matching, further examining the execution performance of the generated SQL in detail. These three metrics assess the performance of the NL2 SQL model from different perspectives: EX focuses on the consistency of execution results, F1 emphasizes structural similarity, and VES concerns the precision of value matching. This multi-dimensional evaluation system helps researchers gain a more comprehensive understanding of the model's strengths and weaknesses. Ablation studies are used to analyze the contribution and importance of various components within a model or algorithm. Specifically, in fields like machine learning and deep learning, ablation studies involve gradually removing certain model components and observing performance changes to determine each part's impact on overall performance. To better identify the critical steps in the entire process, this paper designs ablation experiments, including the removal of Revise PY, the exclusion of NL2 PY, and the non-use of CoT (Chain of Thought), among other aspects. ### Prediction Results

#### 4.2.1 EX Prediction Results

To deeply analyze the performance of different models in NL2 SQL tasks, we used SuperSQL, SFT_CodeS_15B_EK, SFT_CodeS_7B_EK, DAILSQL_SC, SFT_CodeS_3B_EK, DAILSQL, SFT_CodeS_1B_EK, C3_SQL, RESDSQL_3B_EK, RESDSQL_Large_EK, RESDSQL_Base_EK, etc. in the experiment. Comparative experiments were conducted on the model. These models have significant differences in architecture, training data, parameter scale, etc., which can help us comprehensively evaluate the model's accuracy, efficiency, and adaptability. Large-scale models such as SFT_CodeS_15B_EK and RESDSQL_Large_EK can handle more complex queries but may bring higher computational overhead. In contrast, small-scale models such as SFT_CodeS_1B_EK can provide faster inference speed and are suitable for real-time query scenarios. Models such as DAILSQL and RESDSQL can better adapt to the data characteristics of the financial field and handle complex queries such as financial statements and transaction data by optimizing specific database structures. By comparing the performance of different models, we can better understand their advantages and disadvantages in financial applications and ultimately help select the most suitable model to improve the accuracy and efficiency of the NL2 SQL system. As shown in Table 3, in the Simple examples, the model improved by at least 1.83% and by as much as 27.24% compared to subsequent models. In the Moderate examples, it achieved a minimum improvement of 4.31% and a maximum improvement of 30.82% over other models. In the Challenging examples, the model improved by at least 3.45% and up to 32.42% compared to other models. Overall, the model showed an improvement of at least 2.73% and a maximum of 28.81% compared to others. #### 4.2.2 F1 Prediction Results

From the F1 experimental results, in the Simple examples, the model improved by at least 2.28% and by as much as 28.35% compared to subsequent models. In the Moderate examples, it achieved a minimum improvement of 6.17% and a maximum improvement of 33.64% over other models. In the Challenging examples, the model improved by at least 5.13% and up to 36.36% compared to other models. Overall, the model showed an improvement of at least 3.72% and a maximum of 30.7% compared to others. As shown in Table 4.