{"id":453000,"date":"2025-03-24T09:05:12","date_gmt":"2025-03-24T09:05:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=453000"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=453000","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 RAG AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u0441\u0435 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (LLM), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 NLP \u0437\u0430\u0434\u0430\u0447, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432. <\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0410\u043b\u044c\u0444\u0430\u0421\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u043c\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442\u043e\u0432 \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u2014 \u043e\u0446\u0435\u043d\u043a\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 LLM \u0438\u043c\u0435\u044e\u0442 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 QA \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0438\u043c\u0435\u043b\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u2013 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u044b \u0433\u043e\u0434\u043e\u043c \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 LLM \u2013 \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438: \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0442\u043e-\u0442\u043e \u00ab\u043f\u043b\u043e\u0445\u043e \u0432\u044b\u0443\u0447\u0438\u043b\u0430\u00bb \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430, \u043d\u0430\u0434\u043e \u0431\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043c\u043e\u0447\u044c \u0435\u043c\u0443 \u0441\u0430\u043c\u043e\u043c\u0443 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0442\u044c LLM \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0435\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0443\u0436\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432, \u043d\u043e \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u0430 \u043f\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u043e\u0434\u0430\u0442\u044c \u0432\u0441\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442? \u041e\u0442\u0432\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d \u2013 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d.<\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u0440\u043e\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 Retrieval-Augmented Generation (RAG). \u041f\u0440\u043e RAG \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b. \u00a0                   <\/p>\n<h2>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b RAG                               <\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ceb\/902\/63d\/ceb90263dd299912d200b8c367f02acf.png\" alt=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\" title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\" width=\"623\" height=\"390\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ceb\/902\/63d\/ceb90263dd299912d200b8c367f02acf.png\"\/><\/p>\n<div><figcaption><a href=\"https:\/\/www.tonic.ai\/blog\/what-is-retrieval-augmented-generation-the-benefits-of-implementing-rag-in-using-llms\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/a><\/figcaption><\/div>\n<\/figure>\n<h3>1.\u00a0 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0432\u0432\u043e\u0434<\/h3>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.\u00a0<\/p>\n<h3>2.\u00a0\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438<\/h3>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e (\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438) \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u043b\u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u043f\u0440\u0430\u0432\u0438\u043b \u0438\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u041c\u0435\u0442\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0434\u0432\u0438\u0436\u043a\u0430 (\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439, \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435, \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439, \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0439, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434).<\/p>\n<h3>3.\u00a0\u041f\u043e\u0438\u0441\u043a \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0434\u0432\u0438\u0436\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u00a0\u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u043f\u043e\u00a0\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438\u043b\u0438\u00a0\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c<\/strong>\u00a0\u2014 \u0434\u043b\u044f\u00a0\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438\u043b\u0438\u00a0\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0430\u0444 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u00a0\u0443\u0440\u043e\u0432\u043d\u044f\u043c \u0432\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0\u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0438\u043b\u0438\u00a0\u0433\u043b\u0430\u0432\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u00a0\u0443\u0440\u043e\u0432\u043d\u044f\u043c \u0432\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0\u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0438\u043b\u0438\u00a0\u0433\u043b\u0430\u0432\u044b.<\/p>\n<\/li>\n<\/ul>\n<h3>4.\u00a0\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>RAG \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043a\u0443\u0441\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 (\u0447\u0430\u043d\u043a\u0438) \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u2014 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c\u044e \u043c\u0435\u0436\u0434\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438, \u0442\u043e\u0447\u043d\u044b\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0435\u0439 \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u0432 \u0433\u0440\u0430\u0444\u0435 \u0437\u043d\u0430\u043d\u0438\u0439.<\/p>\n<h3>5.\u00a0\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0432 LLM<\/h3>\n<p>\u00a0\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c (LLM), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<h3>6.\u00a0\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430<\/h3>\n<p>\u042f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u043d\u0438\u044f\u0445.<\/p>\n<h3>7.\u00a0\u041e\u0442\u0432\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e<\/h3>\n<blockquote>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b?<\/p>\n<\/blockquote>\n<h2>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/h2>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432: BLEU, \u00a0ROUGE, METEOR, BERTscore. <\/p>\n<h3>BLEU (Bilingual Evaluation Understudy):<\/h3>\n<p>\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c (precision) n-\u0433\u0440\u0430\u043c\u043c \u0441\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"p_n = \\frac{     \\sum_{\\text{segment}} \\sum_{\\text{gram}_n \\in \\text{segment}} \\min\\left( \\operatorname{Count}(\\text{gram}_n), \\operatorname{max\\_count\\_Ref}(\\text{gram}_n) \\right) }{     \\sum_{\\text{segment}} \\sum_{\\text{gram}_n \\in \\text{segment}} \\operatorname{Count}(\\text{gram}_n) },\" alt=\"p_n = \\frac{     \\sum_{\\text{segment}} \\sum_{\\text{gram}_n \\in \\text{segment}} \\min\\left( \\operatorname{Count}(\\text{gram}_n), \\operatorname{max\\_count\\_Ref}(\\text{gram}_n) \\right) }{     \\sum_{\\text{segment}} \\sum_{\\text{gram}_n \\in \\text{segment}} \\operatorname{Count}(\\text{gram}_n) },\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/47b\/55c\/872\/47b55c872d773e596e4154ed3ee130c9.svg\" width=\"633\" height=\"58\"\/><\/p>\n<p>\u0433\u0434\u0435 Count \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e n-\u0433\u0440\u0430\u043c\u043c \u0432 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435, \u0430 max_count_Ref  \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u0438\u0445 n-\u0433\u0440\u0430\u043c\u043c \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"BP =  \\begin{cases} 1, &amp; \\text{\u0435\u0441\u043b\u0438 } c &gt; r \\\\ e^{1-r\/c}, &amp; \\text{\u0435\u0441\u043b\u0438 } c \\leq r \\end{cases},\" alt=\"BP =  \\begin{cases} 1, &amp; \\text{\u0435\u0441\u043b\u0438 } c &gt; r \\\\ e^{1-r\/c}, &amp; \\text{\u0435\u0441\u043b\u0438 } c \\leq r \\end{cases},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c12\/f41\/de7\/c12f41de78c3ce98e80fef2c51762285.svg\" width=\"236\" height=\"49\"\/><\/p>\n<p>BP \u2013 \u0448\u0442\u0440\u0430\u0444 \u0437\u0430 \u043a\u0440\u0430\u0442\u043d\u043e\u0441\u0442\u044c, c \u2014 \u0434\u043b\u0438\u043d\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u0430 r \u2014 \u0434\u043b\u0438\u043d\u0430 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"BLEU = BP \\cdot \\exp\\left(\\sum_{n=1}^N w_n \\log p_n\\right),\" alt=\"BLEU = BP \\cdot \\exp\\left(\\sum_{n=1}^N w_n \\log p_n\\right),\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd3\/e6b\/c6a\/bd3e6bc6a2cf3569f15e0ed6af909581.svg\" width=\"297\" height=\"61\"\/><\/p>\n<p>\u0433\u0434\u0435 <em>w<\/em>\u200b \u2014 \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 n-\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0432\u043d\u044b <em>1\/N<\/em>, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e.<\/p>\n<h3>ROUGE (Recall-Oriented Understudy for Gisting Evaluation)<\/h3>\n<p>\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 (recall) n-\u0433\u0440\u0430\u043c\u043c \u0441\u043b\u043e\u0432 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>ROUGE-N \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 n-\u0433\u0440\u0430\u043c\u043c \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c (\u0438\u043b\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c\u0438) \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 ROUGE-N \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 n-\u0433\u0440\u0430\u043c\u043c \u043a \u043e\u0431\u0449\u0435\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 n-\u0433\u0440\u0430\u043c\u043c \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 (Recall):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\text{ROUGE-N} = \\frac{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\sum\\limits_{\\text{gram}_n \\in S} \\text{Count}_\\text{match}(\\text{gram}_n)}{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\sum\\limits_{\\text{gram}_n \\in S} \\text{Count}(\\text{gram}_n)},\" alt=\"\\text{ROUGE-N} = \\frac{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\sum\\limits_{\\text{gram}_n \\in S} \\text{Count}_\\text{match}(\\text{gram}_n)}{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\sum\\limits_{\\text{gram}_n \\in S} \\text{Count}(\\text{gram}_n)},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f16\/c26\/ead\/f16c26ead27c53f468f085e7eb01167a.svg\" width=\"511\" height=\"88\"\/><\/p>\n<p>\u0433\u0434\u0435 Countmatch &#8212; \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e n-\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u0435, \u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0438.<\/p>\n<p>ROUGE-L \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043e\u0431\u0449\u0435\u0439 \u043f\u043e\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (LCS &#8212; Longest Common Subsequence). \u042d\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0435), \u0442\u0430\u043a \u0438 \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0441\u043b\u043e\u0432\u0430\u043c \u0431\u044b\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\text{ROUGE-L} = \\frac{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\text{LCS}(S, \\text{System Summary})}{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\sum\\limits_{\\text{gram}_n \\in S} \\text{len}(S)},\" alt=\"\\text{ROUGE-L} = \\frac{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\text{LCS}(S, \\text{System Summary})}{\\sum\\limits_{S \\in \\{\\text{Reference Summaries}\\}} \\sum\\limits_{\\text{gram}_n \\in S} \\text{len}(S)},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b85\/6c1\/2a9\/b856c12a9bfcd28e4ec9c72779d49ead.svg\" width=\"510\" height=\"88\"\/><\/p>\n<p>\u0433\u0434\u0435 LCS &#8212; \u0434\u043b\u0438\u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043e\u0431\u0449\u0435\u0439 \u043f\u043e\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u0430 len(S) &#8212; \u0434\u043b\u0438\u043d\u0430 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 S.<\/p>\n<h3>METEOR (Metric for Evaluation of Translation with Explicit ORdering)<\/h3>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0443, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0435\u043c\u043c\u0438\u043d\u0433\u0430 \u0438 \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>Precision (P): \u0414\u043e\u043b\u044f \u0441\u043b\u043e\u0432 (\u0443\u043d\u0438\u0433\u0440\u0430\u043c\u043c) \u0438\u0437 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043b\u043e\u0432\u0430\u043c \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"P = \\frac{m}{w_n}.\" alt=\"P = \\frac{m}{w_n}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/70\/70e\/70e962530dad1da75df72d648cf81349.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>Recall (R): \u0414\u043e\u043b\u044f \u0441\u043b\u043e\u0432 (\u0443\u043d\u0438\u0433\u0440\u0430\u043c\u043c) \u0438\u0437 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u0438 \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"R = \\frac{m}{w_r}.\" alt=\"R = \\frac{m}{w_r}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/716\/d45\/8d3\/716d458d353c52390586b993ce8a7e41.svg\" width=\"75\" height=\"41\"\/><\/p>\n<p>Penalty for Fragmentation: \u0428\u0442\u0440\u0430\u0444, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0442 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"p = 0.5 \\left(\\frac{\\text{number of matches}}{\\text{number of chunks}}\\right)^3.\" alt=\"p = 0.5 \\left(\\frac{\\text{number of matches}}{\\text{number of chunks}}\\right)^3.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/355\/c26\/28c\/355c2628cb316d754efafcd97934b8e5.svg\" width=\"268\" height=\"53\"\/><\/p>\n<p>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0441 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0432 9 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0441\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\text{METEOR} = (1-p) \\frac{10PR}{R+9P}.\" alt=\"\\text{METEOR} = (1-p) \\frac{10PR}{R+9P}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c46\/01d\/b29\/c4601db29a7762cb9fced3609f0cf286.svg\" width=\"245\" height=\"44\"\/><\/p>\n<h3>BERTScore<\/h3>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 BERT. \u041e\u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u044f \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438 \u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f F1 \u043c\u0435\u0440\u0430 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"R_\\text{BERT} = \\frac{1}{|x|} \\sum_{x_i \\in x} \\max_{\\hat{x}_j \\in \\hat{x}} x_i^T \\hat{x}_j,\" alt=\"R_\\text{BERT} = \\frac{1}{|x|} \\sum_{x_i \\in x} \\max_{\\hat{x}_j \\in \\hat{x}} x_i^T \\hat{x}_j,\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/266\/d24\/5c2\/266d245c27304116adb1fbdd4fa60aca.svg\" width=\"231\" height=\"53\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"P_\\text{BERT} = \\frac{1}{|\\hat{x}|} \\sum_{\\hat{x}_j \\in \\hat{x}} \\max_{x_i \\in x} x_i^T \\hat{x}_j,\" alt=\"P_\\text{BERT} = \\frac{1}{|\\hat{x}|} \\sum_{\\hat{x}_j \\in \\hat{x}} \\max_{x_i \\in x} x_i^T \\hat{x}_j,\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/548\/359\/12a\/54835912a959dcf40925a25816b79510.svg\" width=\"230\" height=\"56\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\text{BERTScore} = 2 \\cdot \\frac{P_\\text{BERT} \\cdot R_\\text{BERT}}{P_\\text{BERT} + R_\\text{BERT}},\" alt=\"\\text{BERTScore} = 2 \\cdot \\frac{P_\\text{BERT} \\cdot R_\\text{BERT}}{P_\\text{BERT} + R_\\text{BERT}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24f\/881\/0aa\/24f8810aa7046a731bf55ef5e5a02f3d.svg\" width=\"294\" height=\"46\"\/><\/p>\n<p>\u0433\u0434\u0435 <em>x<\/em>\u00a0&#8212; \u044d\u0442\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0430 <em>x\u0302<\/em>\u00a0&#8212; \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e ROUGE \u0438 BLEU \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0435 n-\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u0438 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432. \u0410 \u041c\u0435\u0442\u0440\u0438\u043a\u0430 METEOR, \u0445\u043e\u0442\u044f \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0432\u0432\u043e\u0434\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u0438 \u0443\u0447\u0451\u0442 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0439 \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0435 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f BERTScore. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432. \u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0438\u043c\u0435\u044e\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0421\u0432\u043e\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0442\u0435\u043c\u0443 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f, \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0435 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 LLM \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 RAG \u043e\u0442\u0432\u0435\u0442\u044b. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 (Human evaluation) \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0445 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0434\u0430\u043b\u0435\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u043e\u0446\u0435\u043d\u043e\u043a \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f29\/2fb\/e00\/f292fbe000e01ff225db165ca7492e24.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \" width=\"357\" height=\"248\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f29\/2fb\/e00\/f292fbe000e01ff225db165ca7492e24.png\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 <\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e27\/848\/527\/e27848527776d810b646ae6bb59feddd.png\" alt=\"\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\" title=\"\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\" width=\"356\" height=\"277\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e27\/848\/527\/e27848527776d810b646ae6bb59feddd.png\"\/><\/p>\n<div><figcaption>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e BERTScore \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438. \u042d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0446\u0435\u043d\u043a\u0430\u043c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 LLM \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432.<\/p>\n<p>\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0442\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438: \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 GPT-3.5, GPT-4, \u0430 \u0442\u0430\u043a\u0436\u0435 Mistral 7B. \u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u044d\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u043c\u0442\u043e\u043c. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430\u0445 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/24c\/1b6\/716\/24c1b671617bbd555dd64d84fe3e25da.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\" width=\"368\" height=\"262\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24c\/1b6\/716\/24c1b671617bbd555dd64d84fe3e25da.png\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db5\/dee\/64a\/db5dee64a5a7b1bf8baf7105b99736ec.png\" alt=\"\u041a\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\" title=\"\u041a\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\" width=\"370\" height=\"332\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db5\/dee\/64a\/db5dee64a5a7b1bf8baf7105b99736ec.png\"\/><\/p>\n<div><figcaption>\u041a\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM \u0438 RAG+LLM \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u043d\u0430 \u0431\u0430\u0437\u0435 GPT-4o mini.<\/p>\n<h2>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u00a0\u00a0\u00a0\u00a0\u00a0 <\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 questions.xlsx, \u00a0\u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u043d\u044b\u0435 LLM: <strong>Llama 3.2 3B, Qwen 2 7B \u0438 GPT 4o mini<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0441\u044e\u0436\u0435\u0442\u043e\u043c \u043a\u043d\u0438\u0433\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f GPT-4o mini, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a\u043e\u0434 \u0432\u044b\u043b\u043e\u0436\u0435\u043d <a href=\"https:\/\/github.com\/aniretakee\/RAG_HP\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<pre><code class=\"python\">import os import openai  def make_req(req_text):   openai.api_key = \"sk-***\"   model_list = [\"gpt-4\",\"gpt-3.5-turbo\",\"gpt-4-1106-preview\",\"gpt-4o\",\"gpt-4o-mini\"]   model_name = model_list[4]   system_prompt = \"\u0422\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430 \u0438\u0437 \u0440\u043e\u043c\u0430\u043d\u0430 \u0414\u0436\u043e\u0430\u043d \u0420\u043e\u0443\u043b\u0438\u043d\u0433 '\u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440 \u0438 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0441\u043a\u0438\u0439 \u043a\u0430\u043c\u0435\u043d\u044c'. \u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0439.\"    messages = [         {\"role\": \"system\", \"content\": system_prompt},           {\"role\": \"user\", \"content\": req_text}  # \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     ]   completion = openai.chat.completions.create(         model=model_name,         messages=messages     )      return completion.choices[0].message.content   # \u0427\u0442\u0435\u043d\u0438\u0435 Excel-\u0444\u0430\u0439\u043b\u0430 df = pd.read_excel('questions.xlsx') df['gpt4-o-mini'] = '' # \u041f\u0440\u043e\u0433\u043e\u043d \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043e RAG for index, row in df.iterrows():     question = row['\u0412\u043e\u043f\u0440\u043e\u0441']     answer = make_req(question)     df.at[index, 'gpt-4o-mini'] = answer  # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 DataFrame \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 Excel df.to_excel('before_rag.xlsx', index=False) <\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e LLama \u0438 Qwen \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u043b\u0438 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c. \u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/065\/cd1\/e11\/065cd1e11023e1114e2d4114a51c6c07.png\" width=\"623\" height=\"147\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/065\/cd1\/e11\/065cd1e11023e1114e2d4114a51c6c07.png\"\/><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u0443\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<pre><code class=\"python\">def make_req(req_text):   openai.api_key = \"sk-***\"   model_list = [\"gpt-4\",\"gpt-3.5-turbo\",\"gpt-4-1106-preview\",\"gpt-4o\", \"gpt-4o-mini\"]   model_name = model_list[4]   completion = openai.chat.completions.create(model=model_name, messages=[{\"role\": \"user\", \"content\": req_text}])   return completion.choices[0].message.content  def gpt_metrics(df):     for index, row in df.iterrows():         df.loc[index, 'metric_llama']= make_req(f\"\u0421\u0440\u0430\u0432\u043d\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 1-{row['\u041e\u0442\u0432\u0435\u0442']} \u0438 2- {row['gpt-4o-mini']}. \u041f\u043e\u0441\u0442\u0430\u0432\u044c 1, \u0435\u0441\u043b\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 &gt;0.7 \u0438 0 \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445. \u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u0443\u043a\u0430\u0436\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u043b\u043e. \u041d\u0435 \u0434\u0430\u0432\u0430\u0439 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439\")     df.to_excel('metrics.xlsx', index=False)     return df <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/000\/9f6\/729\/0009f67298568ffdcdb7d9a441678e8d.png\" width=\"623\" height=\"454\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/000\/9f6\/729\/0009f67298568ffdcdb7d9a441678e8d.png\"\/><\/figure>\n<p>GPT-4o mini \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 LLama \u0438 Qwen.<\/p>\n<p>\u00a0\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 RAG \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 llamaindex. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043a\u043d\u0438\u0433\u0438 \u0414\u0436\u043e\u0430\u043d \u0420\u043e\u0443\u043b\u0438\u043d\u0433 \u00ab\u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440 \u0438 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0441\u043a\u0438\u0439 \u043a\u0430\u043c\u0435\u043d\u044c\u00bb. <\/p>\n<pre><code class=\"python\"># \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 query_engine global_index = None query_engine = None  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 Q&amp;A def create_text_qa_template():     # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Q&amp;A     chat_text_qa_msgs = [         ChatMessage(             role=MessageRole.SYSTEM,             content=(                 \"\u0422\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430 \u0438\u0437 \u0440\u043e\u043c\u0430\u043d\u0430 \u0414\u0436\u043e\u0430\u043d \u0420\u043e\u0443\u043b\u0438\u043d\u0433 '\u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440 \u0438 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0441\u043a\u0438\u0439 \u043a\u0430\u043c\u0435\u043d\u044c'. \"                 \"\u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0439.\"             ),         ),         ChatMessage(             role=MessageRole.USER,             content=(                 \"\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.\\n\"                 \"---------------------\\n\"                 \"{context_str}\\n\"                 \"---------------------\\n\"                 \"\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0432\u0435\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430: {query_str}\\n\"             ),         ),     ]     # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438     text_qa_template = ChatPromptTemplate(chat_text_qa_msgs)     return text_qa_template  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a def initialize_model():     # \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 query_engine     global global_index, query_engine      # \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0438\u0437 Hugging Face     embed_model = HuggingFaceEmbedding(model_name=\"intfloat\/multilingual-e5-large\")      # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043e\u043a\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435     context_window = 5500     num_output = 256      # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442 OpenAI \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438     from llama_index.llms.openai import OpenAI     llm = OpenAI(temperature=0, model=\"gpt-4o-mini\", max_tokens=512)          # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438     chunk_size = 900     chunk_overlap = 256     node_parser = SimpleNodeParser.from_defaults(chunk_size=chunk_size, chunk_overlap=chunk_overlap)      # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438     Settings.llm = llm     Settings.embed_model = embed_model     Settings.context_window = context_window     Settings.num_output = num_output     Settings.node_parser = node_parser      # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f RAG \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438     documents = SimpleDirectoryReader('.\/RAG_data').load_data()      # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c     global_index = VectorStoreIndex.from_documents(documents, embed_model=embed_model)      # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f Q&amp;A     text_qa_template = create_text_qa_template()      # \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c query_engine \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u043b\u044f Q&amp;A     query_engine = global_index.as_query_engine(         similarity_top_k=5,  # \u0417\u0430\u0434\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430         text_qa_template=text_qa_template,         return_source_documents=True  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432     )  # \u0417\u0430\u043f\u0443\u0441\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 initialize_model()  def make_rag(question):     global query_engine     response = query_engine.query(question)     answer = response.response     return answer <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u043c \u043d\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 RAG, \u0438 \u0437\u0430\u0442\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u043e\u0446\u0435\u043d\u0438\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"python\">df = pd.read_excel('before_rag.xlsx') df['RAG_gpt'] = '' # \u041f\u0440\u043e\u0433\u043e\u043d \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 RAG \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432 DataFrame for index, row in df.iterrows():     question = row['\u0412\u043e\u043f\u0440\u043e\u0441']     rag_answer = make_rag(question)     df.at[index, 'RAG_gpt] = rag_answer df.to_excel('with_rag.xlsx', index=False)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e27\/010\/443\/e27010443a78092eacd4f85a943a1832.png\" width=\"623\" height=\"435\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e27\/010\/443\/e27010443a78092eacd4f85a943a1832.png\"\/><\/figure>\n<p>\u00a0\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 RAG \u0443\u043b\u0443\u0447\u0448\u0438\u043b \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 30 \u043f.\u043f.<\/p>\n<p>\u041f\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e RAG \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u0445 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0432. \u042d\u0442\u043e \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u0445 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0443\u0437\u043a\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9ec\/fe3\/6c1\/9ecfe36c1eecd423f87b224ac84bb025.png\" width=\"623\" height=\"238\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9ec\/fe3\/6c1\/9ecfe36c1eecd423f87b224ac84bb025.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a9d\/0c0\/5c0\/a9d0c05c051bca322267d335cc281d6a.png\" width=\"623\" height=\"242\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a9d\/0c0\/5c0\/a9d0c05c051bca322267d335cc281d6a.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/230\/90a\/bdd\/23090abdde0601688fe7f8476503a40e.png\" width=\"1054\" height=\"257\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/230\/90a\/bdd\/23090abdde0601688fe7f8476503a40e.png\"\/><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u043e\u0431\u043e\u0431\u0449\u0430\u044e\u0449\u0435\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0443 RAG \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0442\u0430\u043a \u043a\u0430\u043a LLM \u0432 RAG \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0434\u043b\u044f RAG. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/129\/9b1\/989\/1299b1989f0a1f55a537b8195e75cb9a.png\" width=\"726\" height=\"168\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/129\/9b1\/989\/1299b1989f0a1f55a537b8195e75cb9a.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f63\/f78\/3f7\/f63f783f7899c894dee3c9d0bb0c2846.png\" width=\"671\" height=\"177\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f63\/f78\/3f7\/f63f783f7899c894dee3c9d0bb0c2846.png\"\/><\/figure>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0447\u0430\u043d\u043a\u0438 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0447\u0442\u043e \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u0435\u0442 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u041a\u0430\u043a \u0437\u043e\u0432\u0443\u0442 \u0441\u043e\u0431\u0430\u043a\u0443 \u0425\u0430\u0433\u0440\u0438\u0434\u0430\u00bb \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u0442.\u043a. \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u043e \u041a\u043b\u044b\u043a\u0430, \u0442\u0430\u043a \u0438 \u043f\u0440\u043e \u041f\u0443\u0448\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u00ab\u0441\u043e\u0431\u0430\u043a\u043e\u0439\u00bb \u0425\u0430\u0433\u0440\u0438\u0434\u0430.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/866\/809\/61d\/86680961deac35d9b3d9be2df7d10ee9.png\" width=\"495\" height=\"286\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/866\/809\/61d\/86680961deac35d9b3d9be2df7d10ee9.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0437\u043d\u0430\u043d\u0438\u0439 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u044e\u0436\u0435\u0442\u0430 \u043a\u043d\u0438\u0433\u0438 \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u043e\u0432\u044b\u0439 RAG \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e (RAG New).\u00a0<\/p>\n<p>\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e0c\/230\/095\/e0c23009537c7745b5f922f1a238bf84.png\" width=\"600\" height=\"437\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e0c\/230\/095\/e0c23009537c7745b5f922f1a238bf84.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 5 \u043f.\u043f.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440 LLM \u0434\u043b\u044f RAG \u2014 \u0434\u0435\u043b\u043e \u0432\u043a\u0443\u0441\u0430. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u043e\u0434\u0435\u043b\u0438 GPT \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f RAG-\u0441\u0438\u0441\u0442\u0435\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0432\u043e\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439, \u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0446\u0435\u043d\u0430 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.<\/p>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 RAG. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432.\u00a0 <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0434\u043b\u044f RAG \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0438 <a href=\"https:\/\/github.com\/aniretakee\/RAG_HP\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0438.<\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 RAG \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<p><em>\u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 <\/em><a class=\"mention\" href=\"\/users\/aaniretake\">@aaniretake<\/a><a class=\"mention\" href=\"\/users\/leadsci\">@leadsci<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/889042\/\"> https:\/\/habr.com\/ru\/articles\/889042\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u0441\u0435 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (LLM), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 NLP \u0437\u0430\u0434\u0430\u0447, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432. <\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0410\u043b\u044c\u0444\u0430\u0421\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u043c\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442\u043e\u0432 \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u2014 \u043e\u0446\u0435\u043d\u043a\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 LLM \u0438\u043c\u0435\u044e\u0442 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 QA \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0438\u043c\u0435\u043b\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u2013 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u044b \u0433\u043e\u0434\u043e\u043c \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 LLM \u2013 \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438: \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0442\u043e-\u0442\u043e \u00ab\u043f\u043b\u043e\u0445\u043e \u0432\u044b\u0443\u0447\u0438\u043b\u0430\u00bb \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430, \u043d\u0430\u0434\u043e \u0431\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043c\u043e\u0447\u044c \u0435\u043c\u0443 \u0441\u0430\u043c\u043e\u043c\u0443 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0442\u044c LLM \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0435\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0443\u0436\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432, \u043d\u043e \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u0430 \u043f\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u043e\u0434\u0430\u0442\u044c \u0432\u0441\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442? \u041e\u0442\u0432\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d \u2013 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d.<\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u0440\u043e\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 Retrieval-Augmented Generation (RAG). \u041f\u0440\u043e RAG \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b. \u00a0                   <\/p>\n<h2>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b RAG                               <\/h2>\n<figure class=\"full-width\">\n<div><figcaption><a href=\"https:\/\/www.tonic.ai\/blog\/what-is-retrieval-augmented-generation-the-benefits-of-implementing-rag-in-using-llms\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/a><\/figcaption><\/div>\n<\/figure>\n<h3>1.\u00a0 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0432\u0432\u043e\u0434<\/h3>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.\u00a0<\/p>\n<h3>2.\u00a0\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438<\/h3>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e (\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438) \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u043b\u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u043f\u0440\u0430\u0432\u0438\u043b \u0438\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u041c\u0435\u0442\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0434\u0432\u0438\u0436\u043a\u0430 (\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439, \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435, \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439, \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0439, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434).<\/p>\n<h3>3.\u00a0\u041f\u043e\u0438\u0441\u043a \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0434\u0432\u0438\u0436\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u00a0\u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u043f\u043e\u00a0\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438\u043b\u0438\u00a0\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c<\/strong>\u00a0\u2014 \u0434\u043b\u044f\u00a0\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438\u043b\u0438\u00a0\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0430\u0444 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u00a0\u0443\u0440\u043e\u0432\u043d\u044f\u043c \u0432\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0\u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0438\u043b\u0438\u00a0\u0433\u043b\u0430\u0432\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u00a0\u0443\u0440\u043e\u0432\u043d\u044f\u043c \u0432\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0\u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0438\u043b\u0438\u00a0\u0433\u043b\u0430\u0432\u044b.<\/p>\n<\/li>\n<\/ul>\n<h3>4.\u00a0\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>RAG \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043a\u0443\u0441\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 (\u0447\u0430\u043d\u043a\u0438) \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u2014 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c\u044e \u043c\u0435\u0436\u0434\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438, \u0442\u043e\u0447\u043d\u044b\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0435\u0439 \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u0432 \u0433\u0440\u0430\u0444\u0435 \u0437\u043d\u0430\u043d\u0438\u0439.<\/p>\n<h3>5.\u00a0\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0432 LLM<\/h3>\n<p>\u00a0\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c (LLM), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<h3>6.\u00a0\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430<\/h3>\n<p>\u042f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u043d\u0438\u044f\u0445.<\/p>\n<h3>7.\u00a0\u041e\u0442\u0432\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e<\/h3>\n<blockquote>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b?<\/p>\n<\/blockquote>\n<h2>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/h2>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432: BLEU, \u00a0ROUGE, METEOR, BERTscore. <\/p>\n<h3>BLEU (Bilingual Evaluation Understudy):<\/h3>\n<p>\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c (precision) n-\u0433\u0440\u0430\u043c\u043c \u0441\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>\u0433\u0434\u0435 Count \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e n-\u0433\u0440\u0430\u043c\u043c \u0432 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435, \u0430 max_count_Ref  \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u0438\u0445 n-\u0433\u0440\u0430\u043c\u043c \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435.<\/p>\n<p>BP \u2013 \u0448\u0442\u0440\u0430\u0444 \u0437\u0430 \u043a\u0440\u0430\u0442\u043d\u043e\u0441\u0442\u044c, c \u2014 \u0434\u043b\u0438\u043d\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u0430 r \u2014 \u0434\u043b\u0438\u043d\u0430 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430:<\/p>\n<p>\u0433\u0434\u0435 <em>w<\/em>\u200b \u2014 \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 n-\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0432\u043d\u044b <em>1\/N<\/em>, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e.<\/p>\n<h3>ROUGE (Recall-Oriented Understudy for Gisting Evaluation)<\/h3>\n<p>\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 (recall) n-\u0433\u0440\u0430\u043c\u043c \u0441\u043b\u043e\u0432 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>ROUGE-N \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 n-\u0433\u0440\u0430\u043c\u043c \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c (\u0438\u043b\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c\u0438) \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 ROUGE-N \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 n-\u0433\u0440\u0430\u043c\u043c \u043a \u043e\u0431\u0449\u0435\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 n-\u0433\u0440\u0430\u043c\u043c \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 (Recall):<\/p>\n<p>\u0433\u0434\u0435 Countmatch &#8212; \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e n-\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u0435, \u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0438.<\/p>\n<p>ROUGE-L \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043e\u0431\u0449\u0435\u0439 \u043f\u043e\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (LCS &#8212; Longest Common Subsequence). \u042d\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0435), \u0442\u0430\u043a \u0438 \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0441\u043b\u043e\u0432\u0430\u043c \u0431\u044b\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. <\/p>\n<p>\u0433\u0434\u0435 LCS &#8212; \u0434\u043b\u0438\u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043e\u0431\u0449\u0435\u0439 \u043f\u043e\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u0430 len(S) &#8212; \u0434\u043b\u0438\u043d\u0430 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 S.<\/p>\n<h3>METEOR (Metric for Evaluation of Translation with Explicit ORdering)<\/h3>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0443, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0435\u043c\u043c\u0438\u043d\u0433\u0430 \u0438 \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>Precision (P): \u0414\u043e\u043b\u044f \u0441\u043b\u043e\u0432 (\u0443\u043d\u0438\u0433\u0440\u0430\u043c\u043c) \u0438\u0437 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043b\u043e\u0432\u0430\u043c \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439<\/p>\n<p>Recall (R): \u0414\u043e\u043b\u044f \u0441\u043b\u043e\u0432 (\u0443\u043d\u0438\u0433\u0440\u0430\u043c\u043c) \u0438\u0437 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u0438 \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>Penalty for Fragmentation: \u0428\u0442\u0440\u0430\u0444, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0442 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e.<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0441 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0432 9 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0441\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/p>\n<h3>BERTScore<\/h3>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 BERT. \u041e\u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u044f \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438 \u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f F1 \u043c\u0435\u0440\u0430 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c:<\/p>\n<p>\u0433\u0434\u0435 <em>x<\/em>\u00a0&#8212; \u044d\u0442\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0430 <em>x\u0302<\/em>\u00a0&#8212; \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e ROUGE \u0438 BLEU \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0435 n-\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u0438 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432. \u0410 \u041c\u0435\u0442\u0440\u0438\u043a\u0430 METEOR, \u0445\u043e\u0442\u044f \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0432\u0432\u043e\u0434\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u0438 \u0443\u0447\u0451\u0442 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0439 \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0435 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f BERTScore. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432. \u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0438\u043c\u0435\u044e\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0421\u0432\u043e\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0442\u0435\u043c\u0443 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f, \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0435 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 LLM \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 RAG \u043e\u0442\u0432\u0435\u0442\u044b. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 (Human evaluation) \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0445 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0434\u0430\u043b\u0435\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u043e\u0446\u0435\u043d\u043e\u043a \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a.<\/p>\n<figure class=\"\">\n<div><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 <\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e BERTScore \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438. \u042d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0446\u0435\u043d\u043a\u0430\u043c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 LLM \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432.<\/p>\n<p>\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0442\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438: \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 GPT-3.5, GPT-4, \u0430 \u0442\u0430\u043a\u0436\u0435 Mistral 7B. \u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u044d\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u043c\u0442\u043e\u043c. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430\u0445 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a. <\/p>\n<figure class=\"\">\n<div><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0432 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>\u041a\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u043d\u0430 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM \u0438 RAG+LLM \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u043d\u0430 \u0431\u0430\u0437\u0435 GPT-4o mini.<\/p>\n<h2>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u00a0\u00a0\u00a0\u00a0\u00a0 <\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 questions.xlsx, \u00a0\u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u043d\u044b\u0435 LLM: <strong>Llama 3.2 3B, Qwen 2 7B \u0438 GPT 4o mini<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0441\u044e\u0436\u0435\u0442\u043e\u043c \u043a\u043d\u0438\u0433\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f GPT-4o mini, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a\u043e\u0434 \u0432\u044b\u043b\u043e\u0436\u0435\u043d <a href=\"https:\/\/github.com\/aniretakee\/RAG_HP\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<pre><code class=\"python\">import os import openai  def make_req(req_text):   openai.api_key = \"sk-***\"   model_list = [\"gpt-4\",\"gpt-3.5-turbo\",\"gpt-4-1106-preview\",\"gpt-4o\",\"gpt-4o-mini\"]   model_name = model_list[4]   system_prompt = \"\u0422\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430 \u0438\u0437 \u0440\u043e\u043c\u0430\u043d\u0430 \u0414\u0436\u043e\u0430\u043d \u0420\u043e\u0443\u043b\u0438\u043d\u0433 '\u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440 \u0438 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0441\u043a\u0438\u0439 \u043a\u0430\u043c\u0435\u043d\u044c'. \u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0439.\"    messages = [         {\"role\": \"system\", \"content\": system_prompt},           {\"role\": \"user\", \"content\": req_text}  # \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     ]   completion = openai.chat.completions.create(         model=model_name,         messages=messages     )      return completion.choices[0].message.content   # \u0427\u0442\u0435\u043d\u0438\u0435 Excel-\u0444\u0430\u0439\u043b\u0430 df = pd.read_excel('questions.xlsx') df['gpt4-o-mini'] = '' # \u041f\u0440\u043e\u0433\u043e\u043d \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043e RAG for index, row in df.iterrows():     question = row['\u0412\u043e\u043f\u0440\u043e\u0441']     answer = make_req(question)     df.at[index, 'gpt-4o-mini'] = answer  # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 DataFrame \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 Excel df.to_excel('before_rag.xlsx', index=False) <\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e LLama \u0438 Qwen \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u043b\u0438 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c. \u00a0<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u0443\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<pre><code class=\"python\">def make_req(req_text):   openai.api_key =<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-453000","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/453000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=453000"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/453000\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=453000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=453000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=453000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}