Adaptive algorithm for preventing errors in mathematical reasoning in artificial intelligence systems
DOI:
https://doi.org/10.34121/1028-9763-2025-1-42-54Keywords:
large language model, chatbot, Copilot, user query, recurrence relation, approximationAbstract
The paper identifies the features of solving simple arithmetic problems with a logical component using chatbots with generative artificial intelligence. Copilot is considered as such a chatbot. It was found that when the query is extended or clarified, the probability of obtaining the correct answer decreases because expanding the query parameters leads to errors in forming the answer. Such a problem really exists and is called the limitations of large language models in mathematical reasoning. The user’s query and the search for information to answer their question occur non-linearly. Users change and supplement their queries, which only worsens the final answer of the chatbot. To minimize the occurrence of such errors and inaccuracies, it is proposed to use an approach with a non-linear Z-approximation. Given that Z-transformations are based on adaptive algorithms and are able to change the structural features of these algorithms, with each iteration of such an algorithm, there will be an approximation to a certain point containing the correct answer and not moving beyond the search area. In this case, the behavior of the user who adds new constraints and refinements to the problem to the chatbot with generative artificial intelligence can be described through the recurrent relations of the generated small-rational approximations. As a result, this allows you to build a direction of movement to the correct answer with a restriction of remarks that are not essential for the essence of understanding the problem. The proposed algorithm enables performing such calculations for user actions that are described by basic trigonometric functions. The algorithm has been tested for the functions sin x, cos x, tg x, arctg x in the Python programming language using the TensorFlow library. As a result, the algorithm allowed us to obtain the correct solution to the problem, but an increase in the task execution time was recorded when the logical conditions became more complicated.
Views and downloads
References
1. Mirzadeh I., Alizadeh K., Shahrokhi H., Tuzel O., Bengio S., Farajtabar M. GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Models. 2024. Р. 2–22. DOI: https://doi.org/10.48550/arXiv.2410.05229.
2. Zhao W., Zhou K., Junyi L., Tianyi T., Wang X., Hou Y., Min Yi., Zhang B., Zhang J., Dong Z., Du Y., Yang C., Chen Y., Jiang J., Ren R., Li Y., Tang X., Liu Z., Wen Ji-R. A Survey of Large Language Models. 2023. DOI: https://doi.org/10.48550/arXiv.2303.18223.
3. Zhao H., Cao Z., Chen Y. Robust Total Least Mean M-Estimate Normalized Subband Filter Adaptive Algorithm Under EIV Model in Impulsive Noise. Circuits, Systems, and Signal Proc. 2024. P. 1–27. DOI: https://doi.org/10.1007/s00034-024-02841-9.
4. Lv S., Zhao H., Xu W. Robust Variable Step Size Widely Linear Complex-Valued Least Mean Mestimate Adaptive Algorithm: Derivation and Performance Analysis. Circuits, Systems, and Signal Processing. 2024. Vol. 43 (6). P. 3888–3908. DOI: https://doi.org/10.1007/s00034-024-02637-x.
5. Wang M., Fang X., Wang Y., Ding J., Sun Y., Luo J., Pu H. A dual-loop active vibration control technology with an RBF-RLS adaptive algorithm. Mechanical Systems and Signal Processing. 2023. Vol. 191. DOI: https://doi.org/10.1016/j.ymssp.2022.110079.
6. Wang X., Wang P., Song Y., Xiang Q., Li J. Recognition of high-resolution range profile sequence based on TCN with sequence length-adaptive algorithm and elastic net regularization. Expert Systems with Applications. 2024. Vol. 248. DOI: https://doi.org/10.1016/j.eswa.2024.123417.
7. Roughgarden T. Beyond the worst-case analysis of algorithms. Cambridge University Press, 2021. 706 р. ISBN: 9781108637435. DOI: https://doi.org/10.1017/9781108637435.
8. Dörfler D. On the Approximation of Unbounded Convex Sets by Polyhedra. Journal of Optimization Theory and Applications. 2022. Vol. 194 (1). P. 265–287. DOI: https://doi.org/10.1007/s10957-022-02020-3.
9. Xu J., Wang J., Rao J., Zhong Y., Zhao S. Twin Deterministic Policy Gradient Adaptive Dynamic Programming for Optimal Control of Affine Nonlinear Discrete-time Systems. International Journal of Control, Automation and Systems. 2022. Vol. 20 (9). P. 3098–3109. DOI: https://doi.org/10.1007/s12555-021-0473-6.
10. Теслер Г.С. Обобщенные адаптивные аппроксимации функций. Математичні машини і системи. 1998. № 2. С. 3–8. 54 ISSN 1028-9763. Математичні машини і системи. 2025. № 1
11. Теслер Г.С. Адаптивные аппроксимации и итеративные процессы. Математичні машини і системи. 2004. № 2. C. 22–41.
12. Кряжич О.О., Трофимчук О.М. Метод обробки неструктурованої інформації на вебресурсах/ Проблеми керування та інформатики. 2022. № 67 (4). C. 106–115. DOI: https://doi.org/10.34229/2786-6505-2022-4-8.
13. Rabiner L.R., Gold B., Yuen C.K. Theory and Application of Digital Signal Processing. IEEE Transactions on Systems, Man and Cybernetics. 1978. Vol. 8, N 2. P. 146–146. DOI: https://doi.org/10.1109/TSMC.1978.4309918. URL: https://ieeexplore.ieee.org/document/4309918.
14. Mickens R.E. Generalized trigonometric and hyperbolic functions. CRC Press, 2019. 212 р. eBook ISBN 9780429446238. DOI: https://doi.org/10.1201/9780429446238.
15. Butcher J.C. Numerical Methods for Ordinary Differential Equations. New York: John Wiley&Sons, 2003. 484 р. ISBN 978-0-471-96758-3. URL: https://learn.fmi.uni-sofia.bg/pluginfile.php/99883/mod_resource/content/1/%21%21%21%21%5BButcher_J.%5D_Numerical_methods_for_ordinary_differ
%28BookZZ.org%29.pdf.
16. Kryazhych O., Kovalenko O. Examining a mathematical apparatus of Z-approximation of functions for the construction of an adaptive algorithm. Eastern-European Journal of Enterprise Technologies. 2019. Vol. 3 (99). Р. 6–13. DOI: https://doi.org/10.15587/1729-4061.2019.170824.


