{"id":465822,"date":"2025-07-03T09:25:22","date_gmt":"2025-07-03T09:25:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=465822"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=465822","title":{"rendered":"<span>\u041e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f: LLM \u0441 RAG-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 ROC-AUC. \u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0430 121 \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u0437\u0430 40 \u0447\u0430\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0418\u0418<\/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><strong>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0442\u043e\u043d, \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0437\u0440\u0435\u043b\u043e\u0441\u0442\u0438 \u0411\u0420\u0418\u041a\u0421. \u041f\u0440\u043e\u0431\u0443\u044e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0418\u0418 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u0441\u043a\u0430\u0434\u044b \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0418\u0418 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u044b\u0445 \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432.\u00a0<\/strong><\/p>\n<p><strong>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0418\u0418 \u0432 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0441\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u043d\u0430\u0440\u0440\u0430\u0442\u0438\u0432\u044b. \u041e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c, \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u043e\u043b\u044c \u00ab\u0421\u0434\u0435\u043b\u0430\u0439 \u0442\u0430\u043c \u0447\u0442\u043e-\u0442\u043e \u0441 \u0418\u0418-\u0448\u0435\u0447\u043a\u043e\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e!\u00bb \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0443\u0447\u0438\u043b\u043e\u0441\u044c (\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u044b, \u043f\u0440\u043e\u043c\u043f\u0442\u044b \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f).<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0441 \u0418\u0418 \u043e\u043f\u044b\u0442 \u0438\u043c\u0435\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0447\u0438\u0441\u0442\u044b\u0439, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c: \u0447\u0442\u043e, \u043a\u0430\u043a \u0438 \u043a\u0443\u0434\u0430 \u0432\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u042f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0431\u044b\u043b \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0430 \u043e\u043f\u044b\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0418\u0418-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u0432. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043d\u0438\u044f, \u00ab\u0434\u043e\u0431\u044b\u0442\u044b\u0435 \u0432 \u0431\u043e\u044e\u00bb, \u0442. \u0435. \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 DeepSeek\/Perplexity \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Google Colab.\u00a0<\/p>\n<p>\u0426\u0435\u043b\u044c\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 LLM:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8be\/7b1\/34a\/8be7b134a2b13cd283f9613f4f5eb02d.png\" width=\"1280\" height=\"778\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8be\/7b1\/34a\/8be7b134a2b13cd283f9613f4f5eb02d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8be\/7b1\/34a\/8be7b134a2b13cd283f9613f4f5eb02d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0435\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0431\u044b\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 5 \u044d\u0442\u0430\u043f\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e 8 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<h3>\u042d\u0442\u0430\u043f 1. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG<\/h3>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Google Colab \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (Hugging Face, LangChain \u0438 \u0434\u0440.), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 70% \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0441\u0445\u0435\u043c\u0435.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041e\u0441\u0432\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 Google Colab.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c RAG-\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c LLM.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u0438\u0430\u043b\u043e\u0433\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>Deepseek \u0438 ChatGPT \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441 GitHub, Habr \u0438 Medium.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 LangChain \u0438 Hugging Face.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>Deepseek \u0438 ChatGPT \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441 GitHub, Habr \u0438 Medium.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 LangChain \u0438 Hugging Face.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u041f\u0443\u0442\u044c \u0441\u0430\u043c\u0443\u0440\u0430\u044f, \u0438\u043b\u0438 \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0443\u0434\u0430<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u0418\u0437\u0443\u0447\u0438\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DeepSeek \u0438 Perplexity. <\/strong>\u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u043d\u0435\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442:\u00a0<\/p>\n<p><em>\u00ab\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u043e\u0442\u0432\u0435\u0442, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LLM \u0438 \u043e\u0442\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438. \u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM, \u0430 \u043e\u0442\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435, \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e RAG\u00bb.\u00a0<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0445\u0435\u043c\u0443. <\/strong>\u0423\u0442\u043e\u0447\u043d\u0438\u043b \u0443 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430:\u00a0<\/p>\n<p><em>\u00ab\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438 1. \u0421\u0445\u0435\u043c\u0430 \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0430 \u043d\u0435\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430. 2. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 (\u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e): \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u043e\u0442\u0434\u0430\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u00bb.<\/em><\/p>\n<p>\u0418\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u0443\u0437\u043d\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 Retrieval-Augmented Generation (RAG) \u0441 \u044d\u0442\u0430\u043f\u043e\u043c \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0431\u043e\u0440\u043e\u043c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>LLM (\u0440\u0435\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430, Reformulation) \u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 + \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432 \u00ab\u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439\u00bb \u0435\u0434\u0438\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>VectorStore (\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, Vector Search) \u2014 \u043f\u043e\u0438\u0441\u043a \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0447\u0430\u043d\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p>LLM (\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f, Chunk Selection) \u2014 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>LLM (\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f, Contextual Answer Gen) \u2014 \u0438\u0437 \u0447\u0430\u043d\u043a\u043e\u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u00ab\u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u043d\u044b\u0439\u00bb \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>LLM (\u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430, Polish &amp; Format) \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u043a\u0430 \u0438 \u0442\u043e\u043d \u043e\u0442\u0432\u0435\u0442\u0430, \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0442. \u0434.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u0428\u0430\u0433 3. \u0417\u0430\u043f\u0440\u043e\u0441\u0438\u043b \u0443 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. <\/strong>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:\u00a0<\/p>\n<p><em>\u00ab\u041d\u0443\u0436\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Google \u0421olab. \u0412\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c\u0438, \u0430 \u0441\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 Google Colab. \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a LLM \u2014 \u043b\u0435\u0433\u043a\u0430\u044f, \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 \u043c\u043d\u0435 1. \u041f\u043b\u0430\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, 2. \u041e\u043f\u0438\u0448\u0438 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438 \u0432\u0441\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u041d\u0430\u043f\u0438\u0448\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 Google Colab \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b Google Colab\u00bb<\/em><\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u043b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0435\u0433\u043e \u0432 Google Colab. \u041a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e.\u00a0<\/p>\n<p><strong>\u0428\u0430\u0433 4. \u041f\u043e\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u0432 \u0442\u0435\u043c\u0443 \u0438 \u0432\u043d\u0435\u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/strong>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u044f \u0438\u0437\u0443\u0447\u0430\u043b \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c: \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0438 \u0442\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430\u0448\u0435\u043b \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/medium.com\/@saurabhzodex\/memory-enhanced-rag-chatbot-with-langchain-integrating-chat-history-for-context-aware-845100184c4f\" rel=\"noopener noreferrer nofollow\">Memory-Enhanced RAG Chatbot with LangChain: Integrating Chat History for Context-Aware Conversations<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.\u00a0<\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439. \u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432 \u043d\u0435\u0439 \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d9c\/d4c\/260\/d9cd4c2602a0926b346972f8f48d6fd6.png\" width=\"1327\" height=\"766\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d9c\/d4c\/260\/d9cd4c2602a0926b346972f8f48d6fd6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d9c\/d4c\/260\/d9cd4c2602a0926b346972f8f48d6fd6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u043e\u0434 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043b\u0435\u0433 \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u043c\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430. \u042f \u043f\u043e\u0431\u043b\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u043a\u043e\u0434 \u0432 \u0441\u0432\u043e\u0439 \u0431\u043b\u043e\u043a\u043d\u043e\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u0423\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0431\u043b\u043e\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a. \u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0438 \u043f\u0440\u043e\u0447\u0435\u043a\u0430\u043b \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0442\u0435\u043a \u2014 \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442\u0441\u044f \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p><strong>\u0428\u0430\u0433 5. \u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b.<\/strong> \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u043c:\u00a0<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0448\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a;\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0435\u043a\u0441\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u043f\u0442\u0430 qa_system_prompt (\u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 FAISS, \u043d\u043e \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u0439 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 UI.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c Groq AI \u2014 \u043b\u0438\u043c\u0438\u0442\u043e\u043c \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 deepseek-r1-distill-llama-70b (\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 6000).\u00a0<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043b\u044b\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0432 Google Colab (<a href=\"https:\/\/colab.research.google.com\/drive\/1kNsyKyaXqHvH3taUi35tq09VEqMjyeww?usp=drive_link\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/a>) \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 PDF-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044f \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 (\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b) \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 (FAISS) \u0441 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438\u0437 FAISS \u0438 \u043f\u043e\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 LLM (Groq API).\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c thinking (\u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 UI \u0441 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c deepseek-r1-distill-llama-70b \u0447\u0435\u0440\u0435\u0437 Groq API.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 sentence-transformers\/all-MiniLM-L6-v2.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 FAISS.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u043d\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430: chunk_size=350.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0447\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 InMemoryChatMessageHistory.<\/p>\n<\/li>\n<li>\n<p>UI \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 ipywidgets, \u0441 HTML-\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430: 2.8 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>\u0426\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430: \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>RAG-\u0446\u0435\u043f\u043e\u0447\u043a\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u2192 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u2192 \u043f\u043e\u0438\u0441\u043a).<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f LLM.<\/p>\n<\/li>\n<\/ul>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e LLM \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u043e\u0439. \u0412\u0440\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043e\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u043c, \u043f\u0443\u0442\u0430\u044e\u0449\u0438\u043c \u043c\u044f\u0433\u043a\u043e\u0435 \u0438 \u0442\u0435\u043f\u043b\u043e\u0435.<\/p>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0437\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043d\u0435\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 90% \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0430 LLM.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>\u0423\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b chunk_size \u0438 search_kwargs \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u043c\u043f\u0442-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u043f\u0442\u0430 qa_system_prompt \u0441 \u0430\u043a\u0446\u0435\u043d\u0442\u043e\u043c \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (chunk_size) \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043e\u0445\u0432\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432 (search_kwargs = {&#171;k&#187;: 10}) \u0434\u043b\u044f \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0434\u0430\u0447\u0438 FAISS.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0443\u0442\u044c-\u0442\u043e \u0443 \u0441\u0430\u043c\u0443\u0440\u0430\u044f \u0435\u0441\u0442\u044c, \u043d\u043e \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043c\u044b\u0441\u043b<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443:\u00a0<\/strong><\/p>\n<p><em>\u00ab\u041f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.\u00a0<\/em><\/p>\n<p><em>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442:\u00a0<\/em><\/p>\n<p><em>\u041a\u0442\u043e \u0433\u0435\u0440\u043e\u0439 \u043a\u043d\u0438\u0433\u0438 The Girl on the Train \u0438 \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u043b \u0432 \u041c\u043e\u0441\u043a\u0432\u0435 \u0432 1861 \u0433\u043e\u0434\u0443 31 \u0434\u0435\u043a\u0430\u0431\u0440\u044f \u0432 25 \u0447\u0430\u0441\u043e\u0432 \u043d\u043e\u0447\u0438?\u00a0<\/em><\/p>\n<p><em>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 (\u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439) \u043e\u0442\u0432\u0435\u0442 LLM:\u00a0<\/em><\/p>\n<p><em>\u0413\u0435\u0440\u043e\u0439 \u043a\u043d\u0438\u0433\u0438 The Girl on the Train \u2014 Rachel Watson. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438, \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: 25 \u0447\u0430\u0441\u043e\u0432 \u043d\u043e\u0447\u0438 \u2014 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442.\u00a0<\/em><\/p>\n<p><em>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 LLM:\u00a0<\/em><\/p>\n<p><em>\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438, \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u041a\u043d\u0438\u0433\u0430 &#171;The Girl on the Train&#187; \u041f\u0430\u0443\u043b\u044b \u0425\u043e\u043a\u0438\u043d\u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0438 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u041c\u043e\u0441\u043a\u0432\u043e\u0439.<\/em><\/p>\n<p><em>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/em><\/p>\n<p><em>1. \u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u043b\u0430 \u0433\u0435\u0440\u043e\u044f \u043a\u043d\u0438\u0433\u0438 \u044f\u0432\u043d\u043e.<\/em><\/p>\n<p><em>2. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c &#171;25 \u0447\u0430\u0441\u043e\u0432 \u043d\u043e\u0447\u0438&#187;.<\/em><\/p>\n<p><em>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u0427\u0430\u0442-\u0431\u043e\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0423\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043f\u0442 \u0434\u043b\u044f QA (qa_system_prompt).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0438\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u0440\u0435\u0442\u0440\u0438\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c chunk_size.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0428\u0430\u0433 3. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b <\/strong>\u0442\u0435\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 1, \u0438 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043d\u0443\u0436\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043d\u043e \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 chunk_size \u0441 350 \u0434\u043e 500 \u043d\u0435 \u0434\u0430\u043b\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 search_kwargs \u0434\u043e 10 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043b\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e LLM \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439, \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0438 \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<ul>\n<li>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u0432 RAG-\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043c\u043f\u0442 \u0438\u0433\u0440\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0440\u043e\u043b\u044c \u0432 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 search_kwargs \u0434\u043e 10 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043d\u0435\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0431\u0435\u0437 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0446\u0435\u043d\u043a\u0443 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 k-\u0447\u0430\u043d\u043a\u043e\u0432 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>\u042d\u0442\u0430\u043f 3. \u041e\u0446\u0435\u043d\u043a\u0430 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 k-\u0447\u0430\u043d\u043a\u043e\u0432 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0432 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0437\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 chunk_size \u0438 search_kwargs={&#171;k&#187;: n} \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0421\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 (test_prompt) \u0441 \u0444\u0430\u043a\u0442\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043b\u043e\u0432\u0443\u0448\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 chunk_size \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 min=100, max = 500, \u0448\u0430\u0433 = 50 \u0438 n (search_kwargs={&#171;k&#187;: n}) \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 min=5, max = 25, \u0448\u0430\u0433 = 5.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 (test_prompt + \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (.xlsx \u0438 .csv).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u0434\u0432\u0443\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c: \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 Google Colab \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a deepseek\/distilled-llama-70b \u0447\u0435\u0440\u0435\u0437 API Groq \u0438 OpenRouter, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0434\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 test_prompt;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e chunk_size \u0438 n;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 LLM \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 Google Colab \u0438 API-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0414\u0443\u043c\u0430\u043b \u0441\u0432\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u043e\u043d\u043d\u0435\u043b\u044f, \u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u2014 \u0441\u0432\u0435\u0442\u043b\u044f\u0447\u043e\u043a \u0437\u0430\u0431\u043b\u0443\u0434\u0448\u0438\u0439<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443 <\/strong>(\u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0434\u0430 \u0440\u0430\u043d\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430):\u00a0<\/p>\n<p><em>\u00ab\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 25 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 Google Colab (\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 25 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c Colab-\u0431\u043b\u043e\u043a\u0435) \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/em><\/p>\n<p><em>1 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u2014 \u043f\u0435\u0440\u0432\u044b\u043c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u0434\u0438\u0430\u043b\u043e\u0433\u0430 (\u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u0430\u044f, \u0442. \u0435. \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0443\u0441\u0442\u043e\u0439, \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 qa_prompt \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c) \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442: &#171;\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0443\u0442\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442&#187;.<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u0421\u0434\u0435\u043b\u0430\u043b \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<p><em>\u00ab\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/em><\/p>\n<p><em>\u0430) chunk_size=x, \u0433\u0434\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 x = 100, \u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 x+100 (\u0442.\u0435. 100, 200, 300, 400, 500)<\/em><\/p>\n<p><em>\u0431) search_kwargs={&#171;k&#187;: n}, \u0433\u0434\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 n = 5, \u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 n+5 (\u0442.\u0435. 5, 10, 15, 20, 25)<\/em><\/p>\n<p><em>\u0422\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 5 \u043d\u0430 5 = 25 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 chunk_size \u0438 search_kwargs={&#171;k&#187;: n}.<\/em><\/p>\n<p><em>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0442\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b:<\/em><\/p>\n<p><em>\u2116 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 | chunk_size=x | search_kwargs={&#171;k&#187;: n} | \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\u00a0<\/em><\/p>\n<p><em>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/em><\/p>\n<p><em>\u2116 1 | chunk_size=100 | search_kwargs={&#171;k&#187;: 10} | &#171;\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 LLM&#187;<\/em><\/p>\n<p><em>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u043d\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043d\u043e \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 chunk_size \u0438 search_kwargs={&#171;k&#187;: n}.<\/em><\/p>\n<p><em>\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0434\u0430\u0432\u0430\u0439 \u043c\u043d\u0435 \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 3. \u041f\u0435\u0440\u0435\u043d\u0435\u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c \u0447\u0430\u0442-\u0431\u043e\u0442\u0430. <\/strong>\u041a\u043e\u0434 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 chunk_size \u00d7 k, \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 splitter, FAISS, retriever \u0438 QA-\u0446\u0435\u043f\u044c, \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 &#171;test_prompt \u0431\u0435\u0437 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0447\u0430\u0442\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 LLM \u0432 \u0444\u0430\u0439\u043b.<\/p>\n<p><strong>\u0428\u0430\u0433 4. \u041f\u0440\u043e\u0432\u0435\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.<\/strong>\u00a0<\/p>\n<p><strong>\u0428\u0430\u0433 5. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 HTTP 413 (Request Too Large) Groq API \u2014 \u043b\u0438\u043c\u0438\u0442 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 deepseek-r1-distill-llama-70b (\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 6000).\u00a0<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435: \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 OpenRouter API \u0441 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c\u044e deepseek-distill-llama-70b \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u043c \u043e\u043a\u043d\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f ChatOpenAI \u0438\u0437 langchain.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 API-\u043a\u043b\u044e\u0447\u0430 \u0447\u0435\u0440\u0435\u0437 .env.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>\u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 chunk_size \u0438 n (search_kwargs={&#171;k&#187;: n}) \u0432 Google Colab (<a href=\"https:\/\/colab.research.google.com\/drive\/1qdZrHj2__nuq9YdQNWnkDIjVJSWcRjFO#scrollTo=mDXYtEj2KLWo\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/a>).<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0440\u0430\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0446\u0438\u043a\u043b\u043e\u0432: \u2116 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, chunk_size, k, \u043e\u0442\u0432\u0435\u0442 LLM (answer).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e \u0448\u043a\u0430\u043b\u0435 \u043e\u0442 1 \u0434\u043e 5 \u043f\u043e \u0434\u0432\u0443\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c: \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u0440\u0443\u0447\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e \u0448\u043a\u0430\u043b\u0435 \u043e\u0442 1 \u0434\u043e 5 \u043f\u043e \u0434\u0432\u0443\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c: \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a \u044d\u0442\u0430\u043f\u0443 3<\/h4>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/498\/d8a\/cc8\/498d8acc84cbf9581a54569390ee143b.png\" width=\"1149\" height=\"1206\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/498\/d8a\/cc8\/498d8acc84cbf9581a54569390ee143b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/498\/d8a\/cc8\/498d8acc84cbf9581a54569390ee143b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ac1\/9c3\/f54\/ac19c3f54687a461116cc1f80e87b9b5.png\" width=\"1218\" height=\"692\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ac1\/9c3\/f54\/ac19c3f54687a461116cc1f80e87b9b5.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ac1\/9c3\/f54\/ac19c3f54687a461116cc1f80e87b9b5.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0440\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0432\u043b\u0438\u044f\u044e\u0442 \u043e\u0431\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (chunk_size \u0438 k).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b LLM \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 chunk_size \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 300\u2013400 \u0438 n (search_kwargs={&#171;k&#187;: n}) \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 10\u201320.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM \u043f\u0440\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0446\u0435\u043d\u043a\u0443 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 k-\u0447\u0430\u043d\u043a\u043e\u0432 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0432 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u042d\u0442\u0430\u043f 4. \u041e\u0446\u0435\u043d\u043a\u0430 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 k-\u0447\u0430\u043d\u043a\u043e\u0432 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0432 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0437\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u0433\u043e\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 chunk_size \u0438 search_kwargs={&#171;k&#187;: n} \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 chunk_size \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 min=350, max = 450, \u0448\u0430\u0433 = 10 \u0438 n (search_kwargs={&#171;k&#187;: n}) \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 min=10, max = 20, \u0448\u0430\u0433 = 1.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 (test_prompt + \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (.xlsx \u0438 .csv).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u0434\u0432\u0443\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c: \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 Google Colab \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a deepseek\/distilled-llama-70b \u0447\u0435\u0440\u0435\u0437 API Groq \u0438 OpenRouter, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0434\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 test_prompt;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e chunk_size \u0438 n;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 LLM \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 Google Colab \u0438 API-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0418 \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441 \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c?<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443 <\/strong>(\u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0440\u0430\u043d\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430):\u00a0<\/p>\n<p><em>\u00ab\u0418\u0437\u043c\u0435\u043d\u0438 \u043a\u043e\u0434 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 chunk_sizes \u043e\u0442 350 \u0434\u043e 450 \u0441 \u0448\u0430\u0433\u043e\u043c 10 (350, 360, 370 \u2026 450) \u0438 k_values \u043e\u0442 10 \u0434\u043e 20 \u0441 \u0448\u0430\u0433\u043e\u043c 1 (10, 11, 12 \u2026 20)\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b RAG-\u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/strong> (\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0441\u0441\u0438\u044f \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f):<\/p>\n<p><em>\u00ab\u041f\u0435\u0440\u0435\u043f\u0438\u0448\u0438 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0432 Google Colab \u0441 Google Drive\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 3. \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/strong> (\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0438):<\/p>\n<p><em>\u00ab\u0418\u0437\u043c\u0435\u043d\u0438 \u043a\u043e\u0434 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u0441\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0432 \u043c\u043e\u0435\u043c Google Drive.\u00a0<\/em><\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430: RAG_\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b_2025-05-22_14-03-12.xlsx\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 4. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 X \u0441\u0435\u0441\u0441\u0438\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/strong><\/p>\n<p><em>\u00ab\u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0441\u0441\u0438\u0439 \u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 121 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e (11 chunk_sizes \u00d7 11 k_values) \u0432 X \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u0445 Colab, \u0447\u0442\u043e\u0431\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u043e\u043d. \u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e? \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f Colab \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0441\u0441\u0438\u0439 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 5. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 121 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0420<\/strong>\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u043b 121 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432 2 \u0447\u0430\u0441\u0430, \u0430 \u0440\u0430\u0441\u0447\u0435\u0442 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 17 \u043c\u0438\u043d\u0443\u0442. \u0422\u043e \u0435\u0441\u0442\u044c \u0437\u0430 2 \u0447\u0430\u0441\u0430 \u044f \u0441\u043c\u043e\u0433 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c 7 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b 6 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 Google (\u043a\u0430\u0436\u0434\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c 3 \u0441\u0435\u0441\u0441\u0438\u0438 Google Colab). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430 2 \u0447\u0430\u0441\u0430 \u043e\u0434\u0438\u043d \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c 3 * 7 = 21 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e, \u0438 \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 121 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0437\u0430 2 \u0447\u0430\u0441\u0430.<\/p>\n<p>\u0421\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c OpenRouter API \u043d\u0430 30 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0434\u0435\u043d\u044c \u043a LLM \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u0417\u0430\u0432\u0435\u043b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 (21 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432) \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0412\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 chunk_size \u0438 n (search_kwargs={&#171;k&#187;: n}) \u0432 Google Colab (<a href=\"https:\/\/colab.research.google.com\/drive\/1qdZrHj2__nuq9YdQNWnkDIjVJSWcRjFO#scrollTo=mDXYtEj2KLWo\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/a>).<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0440\u0430\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0446\u0438\u043a\u043b\u043e\u0432: \u2116 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, chunk_size, k, \u043e\u0442\u0432\u0435\u0442 LLM (answer).<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u0430\u043f\u0443 4<\/h4>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0446\u0438\u043a\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1ca\/c0d\/98b\/1cac0d98bbff1002cf3010c224070661.png\" width=\"1536\" height=\"1136\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/1ca\/c0d\/98b\/1cac0d98bbff1002cf3010c224070661.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1ca\/c0d\/98b\/1cac0d98bbff1002cf3010c224070661.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0412\u044b\u0432\u043e\u0434<\/h4>\n<p>\u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0446\u0435\u043d\u043a\u0438.<\/p>\n<h3>\u042d\u0442\u0430\u043f 5. \u041e\u0446\u0435\u043d\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a F1 \u0438 ROC-AUC\u00a0<\/h3>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0437\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a F1 \u0438 ROC-AUC \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 LLM c RAG.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c F1-\u043c\u0435\u0442\u0440\u0438\u043a\u0438 (Precision, Recall, F1) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u043d\u0430\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 (reference) \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 (answer).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c ROC-AUC \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 F1 \u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c ROC-\u043a\u0440\u0438\u0432\u0443\u044e \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c AUC.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u044b: Precision, Recall, F1 \u2014 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c sklearn.metrics.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c (relevance) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b\u0430\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438: \u043e\u0442\u0432\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 cosine similarity \u2265 0.285 (\u0432\u044b\u0431\u043e\u0440\u0430 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b).<\/p>\n<\/li>\n<li>\n<p>ROC-AUC \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u043f\u043e \u043e\u0441\u0438: y_score = F1, y_true = relevance.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 ROC-\u043a\u0440\u0438\u0432\u0430\u044f, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 TPR \u0438 FPR \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0440\u043e\u0433\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0430\u0445 \u043d\u0430\u043f\u0430\u043b\u043c\u0430 \u043f\u043e \u0443\u0442\u0440\u0430\u043c! \u0413\u043e\u0440\u0438, \u043a\u0440\u043e\u0448\u043a\u0430, \u0433\u043e\u0440\u0438!<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443:<\/strong>\u00a0<\/p>\n<p><em>\u00ab\u0426\u0435\u043b\u044c \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 chunk_size \u0438 search_kwargs={&#171;k&#187;: n} \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u0441 RAG \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u042f \u043f\u043e\u043b\u0443\u0447\u0438\u043b Excel-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\u0438 chunk_size &#8212; k &#8212; \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u043a\u043e\u0440\u0438\u043d\u0433 \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c: 1. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 2. \u041f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 LLM. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0445\u043e\u0447\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0443 F1 score. \u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Google Colab?\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439 (\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439) \u043e\u0442\u0432\u0435\u0442.<\/strong><\/p>\n<p><strong>\u0428\u0430\u0433 3. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b CSV-\u0444\u0430\u0439\u043b \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 F1-\u043c\u0435\u0442\u0440\u0438\u043a.<\/strong><\/p>\n<p><strong>\u0428\u0430\u0433 4. \u041f\u0440\u043e\u0438\u0437\u0432\u0435\u043b \u0437\u0430\u043c\u0435\u043d\u0443 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u044e. <\/strong>Google Colab \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 NLTK \u0438 \u043f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 NLTK \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p><strong>\u0428\u0430\u0433 5. \u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0447\u0430\u0442-\u0431\u043e\u0442 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0435\u043f\u043b\u043e\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u0443.<\/strong><\/p>\n<p><strong>\u0428\u0430\u0433 6. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443:\u00a0<\/strong><\/p>\n<p><em>\u00ab\u0426\u0435\u043b\u044c \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 chunk_size \u0438 search_kwargs={&#171;k&#187;: n} \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u0441 RAG \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 Google Colab. \u0423 \u043c\u0435\u043d\u044f \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b:<\/em><\/p>\n<p><em>&#8212; csv-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 input_score.csv \u0441\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\u0438 chunk_size (\u0446\u0438\u0444\u0440\u044b), k (\u0446\u0438\u0444\u0440\u044b), answer (\u0442\u0435\u043a\u0441\u0442 \u2014 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 LLM)\u00a0<\/em><\/p>\n<p><em>&#8212; reference \u2014 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439 (\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439) \u043e\u0442\u0432\u0435\u0442, \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u043f\u043e\u043b\u043d\u044b\u0439 \u0438 \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/em><\/p>\n<p><em>&#8212; csv-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 f1_score.csv \u2013 \u044d\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 input_score.csv, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u043d\u0430\u044f F1-\u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 LLM Precision, Recall, F1<\/em><\/p>\n<p><em>\u041c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e:<\/em><\/p>\n<p><em>1. \u041f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u043a\u043e\u0440\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e ROC-AUC \u043c\u0435\u0442\u0440\u0438\u043a\u0435;\u00a0<\/em><\/p>\n<p><em>2. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043a\u043e\u0440\u0438\u043d\u0433\u0430 \u043c\u0435\u0442\u0440\u0438\u043a F1 \u0438 ROC-AUC.<\/em><\/p>\n<p><em>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0442\u0430\u043a \u0438 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u2013 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043a\u0430\u0440\u0442\u044b. \u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Google Colab?\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 6. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u00abOnly one class is present in y_true. ROC AUC score is not defined in that case\u00bb. <\/strong>\u0412 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a (relevance) \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 \u2014 \u0432\u0441\u0435 1. \u0420\u0435\u0448\u0435\u043d\u0438\u0435: \u0432\u044b\u0431\u043e\u0440 \u0432\u044b\u0431\u043e\u0440\u0430 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b: cosine similarity \u2265 0.285.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/417\/673\/e88\/417673e88a18d62b3ac1fb03f04edcdc.png\" width=\"787\" height=\"624\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/417\/673\/e88\/417673e88a18d62b3ac1fb03f04edcdc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/417\/673\/e88\/417673e88a18d62b3ac1fb03f04edcdc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>\u0428\u0430\u0433 7. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443:\u00a0<\/strong><\/p>\n<p><em>\u00ab\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0439 TPR \u0438 FPR \u043f\u043e\u0441\u0442\u0440\u043e\u0439 ROC-\u043a\u0440\u0438\u0432\u0443\u044e \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u044c (AUC) \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 csv-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 chunk_size, k, answer, Precision, Recall, F1, relevance, ROC_AUC. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/em><\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 F1-\u043c\u0435\u0442\u0440\u0438\u043a\u0438 (<a href=\"https:\/\/colab.research.google.com\/drive\/1uqhnOwUYyhVFpYXD2RNRgw_MmIiG14MZ#scrollTo=-48T6KvULbz2\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/a>).<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 ROC-AUC-\u043c\u0435\u0442\u0440\u0438\u043a\u0438 (<a href=\"https:\/\/colab.research.google.com\/drive\/13AhFl8OqWBlZGUvIEVyRIO-y-IkoBVXE#scrollTo=93WeP4iWJjCI\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/a>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u043c\u0435\u0442\u0440\u0438\u043a.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a \u044d\u0442\u0430\u043f\u0443 5<\/h4>\n<p>\u0422\u0435\u043f\u043b\u043e\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 F1 \u043e\u0442 chunk_size \u0438 k:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e29\/2b8\/ab7\/e292b8ab7592a1e2d19d8a391d455c01.png\" width=\"706\" height=\"495\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e29\/2b8\/ab7\/e292b8ab7592a1e2d19d8a391d455c01.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e29\/2b8\/ab7\/e292b8ab7592a1e2d19d8a391d455c01.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>ROC-\u043a\u0440\u0438\u0432\u0430\u044f \u0434\u043b\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 F1:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/88c\/233\/4a3\/88c2334a388de451f8188661e8ba2184.png\" width=\"715\" height=\"516\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/88c\/233\/4a3\/88c2334a388de451f8188661e8ba2184.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/88c\/233\/4a3\/88c2334a388de451f8188661e8ba2184.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0446\u0438\u043a\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u043d\u0430\u044f F1 \u0438 ROC-AUC-\u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/830\/d53\/0a7\/830d530a742a3ac33381f08af45a7dfe.png\" width=\"876\" height=\"1065\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/830\/d53\/0a7\/830d530a742a3ac33381f08af45a7dfe.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/830\/d53\/0a7\/830d530a742a3ac33381f08af45a7dfe.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<ol>\n<li>\n<p>F1-\u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0441 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u043a\u0441\u0438-\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b RAG-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 ROC-AUC = 0.786 \u2014 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0448\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0418\u0442\u043e\u0433\u043e, \u0437\u0430 40 \u0447\u0430\u0441\u043e\u0432 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u0443\u0442\u044c \u043e\u0442 \u00ab\u0432\u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?\u00bb \u0434\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u00ab\u043d\u043e\u0443-\u043a\u043e\u0434\u00bb (\u043d\u0443 \u0438\u043b\u0438 \u043a\u0430\u043a \u0435\u0449\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442, \u043d\u0435 \u0432\u0447\u0438\u0442\u044b\u0432\u0430\u044f\u0441\u044c \u0432 \u0434\u0435\u0442\u0430\u043b\u0438?)<\/p>\n<p>\u041e\u0446\u0435\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e ROC-AUC \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 0.76, \u0438 \u044d\u0442\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438. \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 relevance, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u043a \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u0430\u044f \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u0432\u0435\u0442\u043e\u043c, \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 F1. \u041c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432\u044b\u0448\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e.\u00a0<\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u043e\u0443-\u043a\u043e\u0434, \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0437\u043d\u0430\u043d\u0438\u0439. \u0414\u043e\u0442\u043e\u0448\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043f\u0430\u0445\u043d\u0435\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 40 \u0447\u0430\u0441\u0430\u043c\u0438, \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0445\u043e\u0434\u0438\u043b\u0430 \u043d\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 (\u0434\u043e 12 \u0447\u0430\u0441\u043e\u0432 \u0434\u043b\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432\/\u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439) \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.\u00a0<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430 \u0432\u0430\u0441, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438.\u00a0<\/p>\n<hr\/>\n<p><strong>\u0410\u0432\u0442\u043e\u0440: <\/strong>\u041f\u0447\u0435\u043b\u0438\u043d\u0446\u0435\u0432 \u0410\u043d\u0442\u043e\u043d \u0421\u0435\u0440\u0433\u0435\u0435\u0432\u0438\u0447 \u2014 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u0432 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0437\u0440\u0435\u043b\u043e\u0441\u0442\u0438 \u0411\u0420\u0418\u041a\u0421 \u043f\u0440\u0438 \u0418\u041c\u0410\u0428 \u0420\u0410\u041d, \u044d\u043a\u0441\u043f\u0435\u0440\u0442 <a href=\"https:\/\/mipt.online\/masters\/data_science?utm_source=habr2\" rel=\"noopener noreferrer nofollow\">\u043e\u043d\u043b\u0430\u0439\u043d-\u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u0442\u0443\u0440 \u041c\u0424\u0422\u0418, \u0426\u0435\u043d\u0442\u0440 \u00ab\u041f\u0443\u0441\u043a\u00bb<\/a><\/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\/914930\/\"> https:\/\/habr.com\/ru\/articles\/914930\/<\/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><strong>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0442\u043e\u043d, \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0437\u0440\u0435\u043b\u043e\u0441\u0442\u0438 \u0411\u0420\u0418\u041a\u0421. \u041f\u0440\u043e\u0431\u0443\u044e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0418\u0418 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u0441\u043a\u0430\u0434\u044b \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0418\u0418 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u044b\u0445 \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432.\u00a0<\/strong><\/p>\n<p><strong>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0418\u0418 \u0432 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0441\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u043d\u0430\u0440\u0440\u0430\u0442\u0438\u0432\u044b. \u041e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c, \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u043e\u043b\u044c \u00ab\u0421\u0434\u0435\u043b\u0430\u0439 \u0442\u0430\u043c \u0447\u0442\u043e-\u0442\u043e \u0441 \u0418\u0418-\u0448\u0435\u0447\u043a\u043e\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e!\u00bb \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0443\u0447\u0438\u043b\u043e\u0441\u044c (\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u044b, \u043f\u0440\u043e\u043c\u043f\u0442\u044b \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f).<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0441 \u0418\u0418 \u043e\u043f\u044b\u0442 \u0438\u043c\u0435\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0447\u0438\u0441\u0442\u044b\u0439, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c: \u0447\u0442\u043e, \u043a\u0430\u043a \u0438 \u043a\u0443\u0434\u0430 \u0432\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u042f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0431\u044b\u043b \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0430 \u043e\u043f\u044b\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0418\u0418-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u0432. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043d\u0438\u044f, \u00ab\u0434\u043e\u0431\u044b\u0442\u044b\u0435 \u0432 \u0431\u043e\u044e\u00bb, \u0442. \u0435. \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 DeepSeek\/Perplexity \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Google Colab.\u00a0<\/p>\n<p>\u0426\u0435\u043b\u044c\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 LLM:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0435\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0431\u044b\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 5 \u044d\u0442\u0430\u043f\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e 8 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<h3>\u042d\u0442\u0430\u043f 1. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG<\/h3>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Google Colab \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (Hugging Face, LangChain \u0438 \u0434\u0440.), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 70% \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0441\u0445\u0435\u043c\u0435.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041e\u0441\u0432\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 Google Colab.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c RAG-\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c LLM.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u0438\u0430\u043b\u043e\u0433\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>Deepseek \u0438 ChatGPT \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441 GitHub, Habr \u0438 Medium.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 LangChain \u0438 Hugging Face.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>Deepseek \u0438 ChatGPT \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441 GitHub, Habr \u0438 Medium.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 LangChain \u0438 Hugging Face.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u041f\u0443\u0442\u044c \u0441\u0430\u043c\u0443\u0440\u0430\u044f, \u0438\u043b\u0438 \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0443\u0434\u0430<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u0418\u0437\u0443\u0447\u0438\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DeepSeek \u0438 Perplexity. <\/strong>\u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u043d\u0435\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442:\u00a0<\/p>\n<p><em>\u00ab\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u043e\u0442\u0432\u0435\u0442, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LLM \u0438 \u043e\u0442\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438. \u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM, \u0430 \u043e\u0442\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435, \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e RAG\u00bb.\u00a0<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0445\u0435\u043c\u0443. <\/strong>\u0423\u0442\u043e\u0447\u043d\u0438\u043b \u0443 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430:\u00a0<\/p>\n<p><em>\u00ab\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438 1. \u0421\u0445\u0435\u043c\u0430 \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0430 \u043d\u0435\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430. 2. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 (\u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e): \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u043e\u0442\u0434\u0430\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u00bb.<\/em><\/p>\n<p>\u0418\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u0443\u0437\u043d\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 Retrieval-Augmented Generation (RAG) \u0441 \u044d\u0442\u0430\u043f\u043e\u043c \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0431\u043e\u0440\u043e\u043c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>LLM (\u0440\u0435\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430, Reformulation) \u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 + \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432 \u00ab\u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439\u00bb \u0435\u0434\u0438\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>VectorStore (\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, Vector Search) \u2014 \u043f\u043e\u0438\u0441\u043a \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0447\u0430\u043d\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p>LLM (\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f, Chunk Selection) \u2014 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>LLM (\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f, Contextual Answer Gen) \u2014 \u0438\u0437 \u0447\u0430\u043d\u043a\u043e\u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u00ab\u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u043d\u044b\u0439\u00bb \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>LLM (\u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430, Polish &amp; Format) \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u043a\u0430 \u0438 \u0442\u043e\u043d \u043e\u0442\u0432\u0435\u0442\u0430, \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0442. \u0434.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u0428\u0430\u0433 3. \u0417\u0430\u043f\u0440\u043e\u0441\u0438\u043b \u0443 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. <\/strong>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:\u00a0<\/p>\n<p><em>\u00ab\u041d\u0443\u0436\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Google \u0421olab. \u0412\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c\u0438, \u0430 \u0441\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 Google Colab. \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a LLM \u2014 \u043b\u0435\u0433\u043a\u0430\u044f, \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 \u043c\u043d\u0435 1. \u041f\u043b\u0430\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, 2. \u041e\u043f\u0438\u0448\u0438 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438 \u0432\u0441\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u041d\u0430\u043f\u0438\u0448\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 Google Colab \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b Google Colab\u00bb<\/em><\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u043b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0435\u0433\u043e \u0432 Google Colab. \u041a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e.\u00a0<\/p>\n<p><strong>\u0428\u0430\u0433 4. \u041f\u043e\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u0432 \u0442\u0435\u043c\u0443 \u0438 \u0432\u043d\u0435\u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/strong>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u044f \u0438\u0437\u0443\u0447\u0430\u043b \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c: \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0438 \u0442\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430\u0448\u0435\u043b \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/medium.com\/@saurabhzodex\/memory-enhanced-rag-chatbot-with-langchain-integrating-chat-history-for-context-aware-845100184c4f\" rel=\"noopener noreferrer nofollow\">Memory-Enhanced RAG Chatbot with LangChain: Integrating Chat History for Context-Aware Conversations<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.\u00a0<\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439. \u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432 \u043d\u0435\u0439 \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u043e\u0434 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043b\u0435\u0433 \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u043c\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430. \u042f \u043f\u043e\u0431\u043b\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u043a\u043e\u0434 \u0432 \u0441\u0432\u043e\u0439 \u0431\u043b\u043e\u043a\u043d\u043e\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u0423\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0431\u043b\u043e\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a. \u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0438 \u043f\u0440\u043e\u0447\u0435\u043a\u0430\u043b \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0442\u0435\u043a \u2014 \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442\u0441\u044f \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p><strong>\u0428\u0430\u0433 5. \u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b.<\/strong> \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u043c:\u00a0<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0448\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a;\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0435\u043a\u0441\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u043f\u0442\u0430 qa_system_prompt (\u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 FAISS, \u043d\u043e \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u0439 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 UI.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c Groq AI \u2014 \u043b\u0438\u043c\u0438\u0442\u043e\u043c \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 deepseek-r1-distill-llama-70b (\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 6000).\u00a0<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043b\u044b\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0432 Google Colab (<a href=\"https:\/\/colab.research.google.com\/drive\/1kNsyKyaXqHvH3taUi35tq09VEqMjyeww?usp=drive_link\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/a>) \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 PDF-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044f \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 (\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b) \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 (FAISS) \u0441 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438\u0437 FAISS \u0438 \u043f\u043e\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 LLM (Groq API).\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c thinking (\u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 UI \u0441 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c deepseek-r1-distill-llama-70b \u0447\u0435\u0440\u0435\u0437 Groq API.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 sentence-transformers\/all-MiniLM-L6-v2.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 FAISS.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u043d\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430: chunk_size=350.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0447\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 InMemoryChatMessageHistory.<\/p>\n<\/li>\n<li>\n<p>UI \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 ipywidgets, \u0441 HTML-\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430: 2.8 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>\u0426\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430: \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>RAG-\u0446\u0435\u043f\u043e\u0447\u043a\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u2192 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u2192 \u043f\u043e\u0438\u0441\u043a).<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f LLM.<\/p>\n<\/li>\n<\/ul>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e LLM \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u043e\u0439. \u0412\u0440\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043e\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u043c, \u043f\u0443\u0442\u0430\u044e\u0449\u0438\u043c \u043c\u044f\u0433\u043a\u043e\u0435 \u0438 \u0442\u0435\u043f\u043b\u043e\u0435.<\/p>\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0437\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 8 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0442\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043d\u0435\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 90% \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0430 LLM.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p>\u0423\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b chunk_size \u0438 search_kwargs \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 LLM.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u043c\u043f\u0442-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u043f\u0442\u0430 qa_system_prompt \u0441 \u0430\u043a\u0446\u0435\u043d\u0442\u043e\u043c \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (chunk_size) \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043e\u0445\u0432\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432 (search_kwargs = {&#171;k&#187;: 10}) \u0434\u043b\u044f \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0434\u0430\u0447\u0438 FAISS.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0443\u0442\u044c-\u0442\u043e \u0443 \u0441\u0430\u043c\u0443\u0440\u0430\u044f \u0435\u0441\u0442\u044c, \u043d\u043e \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043c\u044b\u0441\u043b<\/h4>\n<p><strong>\u0428\u0430\u0433 1. \u041e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u0443:\u00a0<\/strong><\/p>\n<p><em>\u00ab\u041f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 LLM \u0441 RAG \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.\u00a0<\/em><\/p>\n<p><em>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442:\u00a0<\/em><\/p>\n<p><em>\u041a\u0442\u043e \u0433\u0435\u0440\u043e\u0439 \u043a\u043d\u0438\u0433\u0438 The Girl on the Train \u0438 \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u043b \u0432 \u041c\u043e\u0441\u043a\u0432\u0435 \u0432 1861 \u0433\u043e\u0434\u0443 31 \u0434\u0435\u043a\u0430\u0431\u0440\u044f \u0432 25 \u0447\u0430\u0441\u043e\u0432 \u043d\u043e\u0447\u0438?\u00a0<\/em><\/p>\n<p><em>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 (\u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439) \u043e\u0442\u0432\u0435\u0442 LLM:\u00a0<\/em><\/p>\n<p><em>\u0413\u0435\u0440\u043e\u0439 \u043a\u043d\u0438\u0433\u0438 The Girl on the Train \u2014 Rachel Watson. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438, \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: 25 \u0447\u0430\u0441\u043e\u0432 \u043d\u043e\u0447\u0438 \u2014 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442.\u00a0<\/em><\/p>\n<p><em>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 LLM:\u00a0<\/em><\/p>\n<p><em>\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438, \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u041a\u043d\u0438\u0433\u0430 &#171;The Girl on the Train&#187; \u041f\u0430\u0443\u043b\u044b \u0425\u043e\u043a\u0438\u043d\u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0438 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u041c\u043e\u0441\u043a\u0432\u043e\u0439.<\/em><\/p>\n<p><em>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/em><\/p>\n<p><em>1. \u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u043b\u0430 \u0433\u0435\u0440\u043e\u044f \u043a\u043d\u0438\u0433\u0438 \u044f\u0432\u043d\u043e.<\/em><\/p>\n<p><em>2. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c &#171;25 \u0447\u0430\u0441\u043e\u0432 \u043d\u043e\u0447\u0438&#187;.<\/em><\/p>\n<p><em>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b\u00bb<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 2. \u0427\u0430\u0442-\u0431\u043e\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0423\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043f\u0442 \u0434\u043b\u044f QA (qa_system_prompt).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0438\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u0440\u0435\u0442\u0440\u0438\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c chunk_size.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0428\u0430\u0433 3. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b <\/strong>\u0442\u0435\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 1, \u0438 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043d\u0443\u0436\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043d\u043e \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 chunk_size \u0441 350 \u0434\u043e 500 \u043d\u0435 \u0434\u0430\u043b\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 search_kwargs \u0434\u043e 10<\/p>\n<\/li>\n<\/ul>\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-465822","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465822","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=465822"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465822\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}