Article or book title, author's surname, DOI

Stochastic model of a closed metrological chain for quality control of large language model generation

N.V. Bespalova1, D. Teterevenkov2

research article UDC 004.8 Pages: 164-173 doi.org/10.18127/j19997493-202605-21

  1. 1,2 Financial University under the Government of the Russian Federation (Moscow, Russia)

Abstract

Problem statement. In a closed metrological chain, a text generated by a large language model (LLM) is evaluated by a cascade measuring instrument with certified probabilities of type I and type II errors, after which the text is published, regenerated or replaced by a fallback text. The number of model calls, the share of fallbacks and, above all, the risk of publishing a defective text have so far been described only qualitatively, and the regeneration limit has been set empirically.

Goal. To build a stochastic model of the "generation – cascade evaluation – regeneration" cycle, derive its characteristics in closed form and formulate a stopping rule consistent with the metrological passport of the instrument.

Results. The cycle is formalized as an absorbing Markov chain; the coverage of requests, the expected number of model calls, the distribution of the number of attempts and the residual risk are obtained in closed form. For independent attempts the residual risk equals the complement of the certified validity and does not depend on the number of regenerations, so the problem of the attempt limit degenerates. For dependent attempts (a mixture of "easy" and "hard" requests) the validity of a text accepted at the j-th attempt decreases monotonically in j and the tail of the number of attempts becomes heavier, whereas feedback through the diagnostic package raises the validity of late attempts. A stopping rule combining an economic criterion with a validity norm is formulated; in the monotone case a threshold policy with a finite number of attempts is optimal. A numerical example based on the certified characteristics of the Metrolog AI 1.00 complex is confirmed by Monte Carlo simulation.

Practical significance. The results extend the certification procedure to closed chains: the passport is supplemented with the acceptance probability, the residual risk and a justified regeneration limit, and the validity of each published text is recomputed taking the attempt number into account.

Received
17.09.2026
Approved after review
25.09.2026
Accepted
01.10.2026

How to cite

Беспалова Н.В., Тетеревенков Д. Стохастическая модель замкнутой метрологической цепи контроля качества генерации больших языковых моделей // Динамика сложных систем - XXI век. 2026. Т. 20. № 5. С. 164−173. DOI: https://doi.org/10.18127/j19997493-202605-21

References
  1. Teterevenkov D.L. Veroyatnostnaya model` mnogourovnevoj verifikacii dostovernosti tekstov, generiruemy`x bol`shimi yazy`kovy`mi modelyami. Myagkie izmereniya i vy`chisleniya. 2026. T. 100. № 3-1. S. 128–134. (in Russian).
  2. Teterevenkov D.L., Prokopchina S.V. Statisticheskoe modelirovanie posledovatel`noj verifikacii tekstovy`x danny`x, generiruemy`x bol`shimi yazy`kovy`mi modelyami. Myagkie izmereniya i vy`chisleniya. 2026. T. 100. № 3-1. S. 30–37. (in Russian).
  3. Prokopchina S.V. Bajesovskie intellektual`ny`e texnologii v zadachax modelirovaniya zakona raspredeleniya v usloviyax neopredelyonnosti: monografiya. M.: Izdatel`skij dom «NAUChNAYa BIBLIOTEKA». 2020. 292 s. (in Russian).
  4. Chen M., Tworek J., Jun H. et al. Evaluating Large Language Models Trained on Code. arXiv preprint arXiv:2107.03374. 2021.
  5. Brown B., Juravsky J., Ehrlich R., Clark R., Le Q.V., Ré C., Mirhoseini A. Large Language Monkeys: Scaling Inference Compute with Repeated Sampling. arXiv preprint arXiv:2407.21787. 2024.
  6. Cobbe K., Kosaraju V., Bavarian M. et al. Training Verifiers to Solve Math Word Problems. arXiv preprint arXiv:2110.14168. 2021.
  7. Snell C., Lee J., Xu K., Kumar A. Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters. arXiv preprint arXiv:2408.03314. 2024.
  8. Madaan A., Tandon N., Gupta P. et al. Self-Refine: Iterative Refinement with Self-Feedback. Advances in Neural Information Processing Systems (NeurIPS). 2023. V. 36.
  9. Shinn N., Cassano F., Gopinath A., Narasimhan K., Yao S. Reflexion: Language Agents with Verbal Reinforcement Learning. Advances in Neural Information Processing Systems (NeurIPS). 2023. V. 36.
  10. Huang J., Chen X., Mishra S. et al. Large Language Models Cannot Self-Correct Reasoning Yet. Proceedings of the International Conference on Learning Representations (ICLR). 2024.
  11. Kamoi R., Zhang Y., Zhang N., Han J., Zhang R. When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction of LLMs. Transactions of the Association for Computational Linguistics. 2024. V. 12. P. 1417–1440.
  12. Oltyan N.N. Determinirovannoe strukturirovanie danny`x s pomoshh`yu LLM: arxitektura vosproizvodimogo konvejera. Myagkie izmereniya i vy`chisleniya. 2026. T. 100. № 3. S. 119–127. DOI: 10.36871/2618-9976.2026.03.011 (in Russian).
  13. Dantas P., Cordeiro L., Sun Y., Junior W. The 4/δ Bound: Designing Predictable LLM-Verifier Systems for Formal Method Guarantee. arXiv preprint arXiv:2512.02080. 2025.
  14. Yang Z. Why Retrying Fails: Context Contamination in LLM Agent Pipelines. arXiv preprint arXiv:2605.08563. 2026.
  15. Shaikh N. Knowing When to Ask for Help: Bayesian Self-Escalation in Hierarchical LLM Agents. arXiv preprint arXiv:2608.24087. 2026.
  16. Kadyrkulov R. System and Method for Deepfake Detection: pat. AU 2025204579, Avstraliya, MPK G06V 40/40; patentoobladatel` Biometry Solutions Pty Limited. Zayavl. 19.06.2025; opubl. 23.04.2026. URL: https://ipsearch.ipaustralia.gov.au/patents/2025204579 (data obrashheniya: 31.08.2026).
  17. Kemeni Dzh., Snell Dzh. Konechny`e cepi Markova. Per. s angl. M.: Nauka. 1970. 272 s. (in Russian).
  18. Collins R.D., Case K.E., Bennett G.K. The effects of inspection error on single sampling inspection plans. International Journal of Production Research. 1973. V. 11. № 3. P. 289–298.
  19. GOST R ISO 2859-1-2007. Statisticheskie metody`. Procedury` vy`borochnogo kontrolya po al`ternativnomu priznaku. Chast` 1. Plany` vy`borochnogo kontrolya posledovatel`ny`x partij na osnove priemlemogo urovnya kachestva. M.: Standartinform. 2008.
  20. Luby M., Sinclair A., Zuckerman D. Optimal speedup of Las Vegas algorithms. Information Processing Letters. 1993. V. 47. № 4. P. 173–180.
  21. Gomes C.P., Selman B., Crato N., Kautz H. Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems. Journal of Automated Reasoning. 2000. V. 24. № 1–2. P. 67–100.
  22. Val`d A. Posledovatel`ny`j analiz. Per. s angl. M.: Fizmatgiz. 1960. 328 s. (in Russian).
  23. Shiryaev A.N. Statisticheskij posledovatel`ny`j analiz. Optimal`ny`e pravila ostanovki. 2-e izd., pererab. M.: Nauka. 1976. 272 s. (in Russian).
  24. Chow Y.S., Robbins H., Siegmund D. Great Expectations: The Theory of Optimal Stopping. Boston: Houghton Mifflin, 1971. 140 p.