{"id":478548,"date":"2026-05-04T16:16:22","date_gmt":"2026-05-04T16:16:22","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=478548"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=478548","title":{"rendered":"AI-\u0430\u0433\u0435\u043d\u0442\u044b \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435: \u043f\u043e\u0447\u0435\u043c\u0443 demo \u043d\u0435 \u0440\u0430\u0432\u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041a\u0430\u043a \u044f \u0441\u0442\u0440\u043e\u0438\u043b \u0430\u0433\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u043d\u0430 LangGraph \u0438 \u0433\u0434\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u0430\u0441\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0442\u0435\u043e\u0440\u0438\u044f<\/h3>\n<p>\u041f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0434\u0435\u043c\u043a\u0443: AI-\u0430\u0433\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442, \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u043b \u043f\u043e diff-\u0443, \u043d\u0430\u0445\u043e\u0434\u0438\u043b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 race condition \u0438 \u043f\u0438\u0441\u0430\u043b \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0444\u0438\u043a\u0441\u0430. \u0412\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u043e\u043a\u043e\u043b\u043e 40 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0440\u0435\u0432\u044c\u044e \u0434\u0430\u0432\u043d\u043e \u0441\u0442\u0430\u043b\u043e \u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u044b\u043c \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u043c. \u0414\u0432\u043e\u0435 \u0441\u0435\u043d\u044c\u043e\u0440\u043e\u0432, \u043e\u043a\u043e\u043b\u043e \u0434\u0432\u0435\u043d\u0430\u0434\u0446\u0430\u0442\u0438 PR \u0432 \u0434\u0435\u043d\u044c, \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0441\u0438\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043e \u043f\u043e\u043b\u0434\u043d\u044f. \u0418\u0434\u0435\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434 \u2014 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u0430, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u2014 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u0441\u043e\u0431\u043b\u0430\u0437\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u042f \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u043b \u043f\u043b\u0430\u043d: LangGraph \u0434\u043b\u044f \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438, GPT-4 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, GitHub API \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438. \u041d\u0435\u0434\u0435\u043b\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u0435\u0449\u0451 \u043d\u0435\u0434\u0435\u043b\u044f \u043d\u0430 \u043f\u043e\u043b\u0438\u0440\u043e\u0432\u043a\u0443. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u0442\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d.<\/p>\n<p>\u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u044f \u043e\u0448\u0438\u0431\u0441\u044f \u0432 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430. \u0410 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u0435\u043c, \u0447\u0442\u043e \u044f \u043e\u0436\u0438\u0434\u0430\u043b. \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u044f \u0441\u0434\u0435\u043b\u0430\u043b.<\/p>\n<hr\/>\n<h3>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h3>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0415\u0441\u0442\u044c PR, \u0432 \u043d\u0451\u043c diff \u2014 \u043d\u0430\u0431\u043e\u0440 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0410\u0433\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u0443: \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0439\u0442\u0438 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438: \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0435\u0447\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0437\u0430\u0431\u044b\u0442\u044b\u0435 await;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0431\u044b \u0436\u0438\u0432\u043e\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440. \u0417\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u044f \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b. \u0418\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u0433\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434, \u0430 \u0441\u0435\u043d\u044c\u043e\u0440, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044f PR, \u0432\u0438\u0434\u0435\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u043e \u043c\u0435\u043b\u043e\u0447\u0430\u043c \u0438 \u043c\u043e\u0433 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439. Webhook \u043e\u0442 GitHub \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u0430\u0433\u0435\u043d\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 diff \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 LLM, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432 \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a, \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR.<\/p>\n<pre><code>[GitHub Webhook]       \u2502       \u25bc[\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c diff \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432]       \u2502       \u25bc[\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c]       \u2502       \u25bc[\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430: \u0430\u043d\u0430\u043b\u0438\u0437 \u2192 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f]       \u2502       \u25bc[\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f]       \u2502       \u25bc[\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0438\u0441\u0442\u043e, \u043b\u0438\u043d\u0435\u0439\u043d\u043e, \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0418, \u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0437\u0436\u0435, \u043d\u0430\u0438\u0432\u043d\u043e.<\/p>\n<hr\/>\n<h3>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043d\u0430 LangGraph<\/h3>\n<p>MVP \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0437\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0434\u043d\u044f. LangGraph \u0443\u0434\u043e\u0431\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u0433\u0440\u0430\u0444 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e: \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0434\u0430 \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0451\u0431\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u2014 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u044b\u0439 \u0441\u043a\u0435\u043b\u0435\u0442 \u0433\u0440\u0430\u0444\u0430. \u042f \u043e\u043f\u0443\u0441\u043a\u0430\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a, \u0440\u0435\u0442\u0440\u0430\u0438 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 GitHub API, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435.<\/p>\n<pre><code class=\"python\">from langgraph.graph import StateGraph, ENDfrom typing import TypedDict  class ReviewState(TypedDict):    pr_url: str    diff_chunks: list[dict]    reviews: list[dict]    final_comments: list[dict]  def fetch_diff(state: ReviewState) -&gt; ReviewState:    \"\"\"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c diff \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c.\"\"\"    chunks = github_client.get_pr_diff(state[\"pr_url\"])    return {\"diff_chunks\": chunks}  def analyze_chunk(state: ReviewState) -&gt; ReviewState:    \"\"\"\u041f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u043d\u043a \u0447\u0435\u0440\u0435\u0437 LLM \u0438 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c JSON \u0441 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c\u0438.\"\"\"    reviews = []    for chunk in state[\"diff_chunks\"]:        prompt = f\"\"\"\u0422\u044b \u2014 \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e\u0435\u0440.\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 diff \u0438 \u043d\u0430\u0439\u0434\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.\u0421\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434: {STYLE_GUIDE} Diff:{chunk['content']} \u041e\u0442\u0432\u0435\u0442\u044c \u0432 JSON: [{{\"file\": \"...\", \"line\": N, \"comment\": \"...\", \"severity\": \"...\"}}]\"\"\"        result = llm.invoke(prompt)        reviews.extend(parse_json(result))    return {\"reviews\": reviews}  def filter_and_post(state: ReviewState) -&gt; ReviewState:    \"\"\"\u0414\u0435\u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0438 \u043f\u043e\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR.\"\"\"    comments = deduplicate(state[\"reviews\"])    github_client.post_review_comments(state[\"pr_url\"], comments)    return {\"final_comments\": comments}  graph = StateGraph(ReviewState)graph.add_node(\"fetch\", fetch_diff)graph.add_node(\"analyze\", analyze_chunk)graph.add_node(\"post\", filter_and_post)graph.add_edge(\"fetch\", \"analyze\")graph.add_edge(\"analyze\", \"post\")graph.add_edge(\"post\", END) app = graph.compile()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c PR \u0430\u0433\u0435\u043d\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0441\u0435\u0431\u044f \u0445\u043e\u0440\u043e\u0448\u043e. \u041d\u0430\u0448\u0451\u043b \u043d\u0435\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440, \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u0439 <code>except Exception<\/code>, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u043b\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u043e\u0431\u0440\u043e \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435.<\/p>\n<hr\/>\n<h3>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0434\u043d\u044f \u0430\u0433\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u00ab\u043f\u0438\u0448\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043d\u043e \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0440\u0434\u0436\u00bb. \u042f \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u043d\u0435\u0451 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0420\u0430\u0434\u0443\u0436\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0441 \u0434\u0435\u043c\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043a\u0443\u0434\u0430 \u043c\u0435\u043d\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439.<\/p>\n<h4>\u0413\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0434\u0430<\/h4>\n<p>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0438 \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0410\u0433\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 diff-\u043e\u043c, \u0430 diff \u2014 \u044d\u0442\u043e \u043d\u0435 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b. \u041c\u043e\u0434\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432\u043e\u043a\u0440\u0443\u0433.<\/p>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439: \u0430\u0433\u0435\u043d\u0442 \u0432\u0438\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 <code>self.cache.get(key)<\/code>, \u043d\u0435 \u0432\u0438\u0434\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>self.cache<\/code> \u2014 \u043e\u043d\u043e \u0433\u0434\u0435-\u0442\u043e \u0432\u044b\u0448\u0435, \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 diff-\u0430 \u2014 \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043f\u0438\u0448\u0435\u0442, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 <code>None<\/code>.<\/p>\n<p>\u0417\u0432\u0443\u0447\u0438\u0442 \u0440\u0430\u0437\u0443\u043c\u043d\u043e. \u041d\u043e <code>self.cache<\/code> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 <code>__init__<\/code> \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 <code>None<\/code>. \u0410\u0433\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>__init__<\/code> \u043d\u0435 \u043f\u043e\u043f\u0430\u043b \u0432 diff.<\/p>\n<p>\u041f\u043e \u043c\u043e\u0438\u043c \u0437\u0430\u043c\u0435\u0440\u0430\u043c, \u043e\u043a\u043e\u043b\u043e 30% \u0432\u0441\u0435\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u0431\u044b\u043b\u0438 \u0442\u0430\u043a\u0438\u043c\u0438 \u00ab\u0443\u043c\u043d\u044b\u043c\u0438\u00bb \u0434\u043e\u0433\u0430\u0434\u043a\u0430\u043c\u0438 \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u041a\u0430\u0436\u0434\u043e\u0435 \u0442\u0440\u0435\u0442\u044c\u0435 \u2014 \u043c\u0438\u043c\u043e.<\/p>\n<h4>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 PR<\/h4>\n<p>\u041d\u0430 \u0434\u0435\u043c\u043e \u0431\u044b\u043b \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0439 PR \u0438\u0437 \u0442\u0440\u0451\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 80 \u0441\u0442\u0440\u043e\u043a diff-\u0430. \u0412 \u0436\u0438\u0437\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f PR \u043d\u0430 40 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 2000 \u0441 \u043b\u0438\u0448\u043d\u0438\u043c \u0441\u0442\u0440\u043e\u043a. \u042d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0430\u044f.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u0445\u043e\u0434 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0443\u0442\u0430\u0435\u0442, \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435. \u041e\u0434\u0438\u043d \u0440\u0430\u0437 \u0430\u0433\u0435\u043d\u0442 \u0432\u0435\u0440\u043d\u0443\u043b JSON \u0441 \u043d\u0435\u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439, \u043f\u0430\u0440\u0441\u0435\u0440 \u0443\u043f\u0430\u043b, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b, \u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u044d\u0442\u043e\u0433\u043e \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0434\u043d\u044f.<\/p>\n<h4>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c<\/h4>\n<p>\u0413\u0440\u0443\u0431\u0430\u044f \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a. \u041e\u0434\u0438\u043d \u0440\u0435\u0432\u044c\u044e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e PR \u2014 \u044d\u0442\u043e 500\u2013700 \u0441\u0442\u0440\u043e\u043a diff-\u0430, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 15\u201320 \u0442\u044b\u0441\u044f\u0447\u0430\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 2\u20133 \u0442\u044b\u0441\u044f\u0447\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445. \u041d\u0430 GPT-4 \u0446\u0435\u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0432\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 0.50\u20130.70 \u0434\u043e\u043b\u043b\u0430\u0440\u0430.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. 12 PR \u0432 \u0434\u0435\u043d\u044c, 22 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0434\u043d\u044f \u2014 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 130\u2013185 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u0432 \u043c\u0435\u0441\u044f\u0446. \u041d\u0435 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430, \u043d\u043e \u0438 \u043d\u0435 \u043a\u043e\u043f\u0435\u0439\u043a\u0438. \u0410 \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u044f\u043c\u0438, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0432 \u0442\u0440\u0438-\u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430.<\/p>\n<h4>\u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0437\u043c<\/h4>\n<p>\u041e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 PR, \u0434\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434\u0440\u044f\u0434. \u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0430\u0433\u0435\u043d\u0442 \u043f\u0438\u0448\u0435\u0442 \u043f\u0440\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 thread safety. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u2014 \u043c\u043e\u043b\u0447\u0438\u0442 \u043f\u0440\u043e thread safety, \u0437\u0430\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>temperature=0<\/code> \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u043d\u043e \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043c\u043f\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u00ab\u043f\u043b\u0430\u0432\u0430\u0435\u0442\u00bb.<\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u044d\u0442\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0416\u0438\u0432\u043e\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440 \u0442\u043e\u0436\u0435 \u043e\u0448\u0438\u0431\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u043e\u043d \u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f\u0445. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043a \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u0421 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0435\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0435\u0432\u044c\u044e.<\/p>\n<h4>\u042d\u0444\u0444\u0435\u043a\u0442 \u00ab\u043c\u0430\u043b\u044c\u0447\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0440\u0438\u0447\u0430\u043b \u0432\u043e\u043b\u043a\u00bb<\/h4>\n<p>\u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0434\u0435\u043b\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0430\u0433\u0435\u043d\u0442\u0430. \u0421\u043a\u0440\u043e\u043b\u043b\u044f\u0442 \u0438 \u0438\u0434\u0443\u0442 \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430: \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430.<\/p>\n<p>\u0418\u0437 \u0434\u0435\u0441\u044f\u0442\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0440\u0438-\u0447\u0435\u0442\u044b\u0440\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438, \u0435\u0449\u0451 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u2014 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0435\u0440\u043d\u044b\u043c\u0438, \u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0432 \u0434\u0443\u0445\u0435 \u00ab\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c docstring\u00bb, \u0438 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0434\u0432\u0430-\u0442\u0440\u0438 \u2014 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u0435\u0434. \u041a\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u043b\u044e\u0434\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435.<\/p>\n<hr\/>\n<h3>\u0427\u0442\u043e \u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b<\/h3>\n<p>\u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0430\u0433\u0435\u043d\u0442\u0430 \u043d\u0430 \u043f\u043e\u043b\u043a\u0443 \u0438 \u0437\u0430\u0431\u044b\u0442\u044c \u0431\u044b\u043b\u043e \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c. \u041d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0441\u044c: \u0440\u0435\u0432\u044c\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0432 \u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043d\u0430\u0447\u0430\u043b.<\/p>\n<h4>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043e\u043b\u043e\u0433\u043e diff-\u0430<\/h4>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0430\u043b\u043e\u0441\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410\u0433\u0435\u043d\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e diff, \u0430 diff \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u044f \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2014 \u043a\u043b\u0430\u0441\u0441 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043f\u043b\u044e\u0441 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u0434\u043e\u0440\u043e\u0436\u0435 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c, \u043d\u043e \u0447\u0438\u0441\u043b\u043e \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0439 \u043f\u0440\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u043f\u0430\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u0434\u0432\u043e\u0435.<\/p>\n<pre><code class=\"python\">def fetch_diff_with_context(state: ReviewState) -&gt; ReviewState:    \"\"\"\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u043d\u043a \u0434\u0438\u0444\u0444\u0430 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c.\"\"\"    chunks = github_client.get_pr_diff(state[\"pr_url\"])    enriched = []    for chunk in chunks:        full_file = github_client.get_file_content(            chunk[\"repo\"], chunk[\"file_path\"], chunk[\"base_ref\"]        )        # \u0411\u0435\u0440\u0451\u043c \u043d\u0435 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c        context = extract_surrounding_context(            full_file,            chunk[\"changed_lines\"],            context_window=50,  # 50 \u0441\u0442\u0440\u043e\u043a \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f        )        chunk[\"full_context\"] = context        enriched.append(chunk)    return {\"diff_chunks\": enriched}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>Few-shot \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0432\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/h4>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u2014 \u0441\u0442\u0438\u043b\u044c \u0438 \u0442\u043e\u043d. \u0412\u043c\u0435\u0441\u0442\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u00ab\u0442\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u00bb \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u043f\u043e\u0448\u043b\u0438 15\u201320 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0432\u044c\u044e-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 PR. \u0421 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u0442\u0438\u043b\u0435\u043c, \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u042d\u0444\u0444\u0435\u043a\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439. \u0410\u0433\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0442\u0438\u043b\u0435 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430. \u041c\u0435\u043d\u044c\u0448\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u0432\u0440\u043e\u0434\u0435 \u00ab\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u00bb, \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u043a\u0438 \u0442\u0438\u043f\u0430 \u00ab\u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 NPE \u0435\u0441\u043b\u0438 user None, \u0434\u043e\u0431\u0430\u0432\u044c guard clause\u00bb.<\/p>\n<h4>Confidence score \u0438 \u043f\u043e\u0440\u043e\u0433 \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0422\u0440\u0435\u0442\u044c\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043f\u0440\u043e\u043c\u043f\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u0448\u043a\u0430\u043b\u0435 \u043e\u0442 1 \u0434\u043e 10. \u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0438\u0436\u0435 7, \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f, \u0430 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043b\u043e\u0433 \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430.<\/p>\n<p>\u041f\u0440\u0438\u0451\u043c \u0433\u0440\u0443\u0431\u044b\u0439, \u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439. \u0414\u043e\u043b\u044f \u043c\u0443\u0441\u043e\u0440\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0443\u043f\u0430\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441 60% \u0434\u043e 25%.<\/p>\n<pre><code class=\"python\">def analyze_with_confidence(state: ReviewState) -&gt; ReviewState:    \"\"\"\u0410\u0433\u0435\u043d\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0438; \u043d\u0438\u0436\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c.\"\"\"    reviews = []    for chunk in state[\"diff_chunks\"]:        prompt = f\"\"\"...\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0436\u0438 confidence \u043e\u0442 1 \u0434\u043e 10.10 = \u0442\u044b \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0430\u0433 \u0438\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u0430.5 = \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u043e \u043d\u0443\u0436\u0435\u043d \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.1 = \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u0442\u0432\u0435\u0442\u044c JSON: [{{\"file\": \"...\", \"line\": N, \"comment\": \"...\",                \"severity\": \"...\", \"confidence\": N}}]\"\"\"        result = llm.invoke(prompt)        parsed = parse_json(result)        # \u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f        reviews.extend([r for r in parsed if r[\"confidence\"] &gt;= 7])    return {\"reviews\": reviews}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0413\u0438\u0431\u0440\u0438\u0434: LLM \u043f\u043b\u044e\u0441 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/h4>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u0434\u0432\u0438\u0433 \u2014 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0438\u0434\u0435\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0435\u0440\u0435\u0437 \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0427\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438: \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 naming convention, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 type hints. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u043b\u0438\u043d\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 AST-\u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0430 \u043d\u0435 \u0434\u043b\u044f LLM.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0430\u0433\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043d\u044e\u0430\u043d\u0441\u044b, \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0431\u0430\u0433\u0438. \u0420\u0443\u0442\u0438\u043d\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0438\u0440\u0443\u0435\u0442.<\/p>\n<pre><code>[GitHub Webhook]       \u2502       \u25bc[\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c diff + \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442]       \u2502       \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510       \u25bc                  \u25bc[Rule-based \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438]  [LLM-\u0430\u043d\u0430\u043b\u0438\u0437 (\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u0435\u0439\u0441\u044b)]       \u2502                  \u2502       \u25bc                  \u25bc[\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432]       \u2502       \u25bc[\u0424\u0438\u043b\u044c\u0442\u0440 \u043f\u043e confidence + \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f]       \u2502       \u25bc[\u041f\u043e\u0441\u0442 \u0432 PR]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<hr\/>\n<h3>\u0426\u0438\u0444\u0440\u044b<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u044f \u0442\u0440\u0438 \u043d\u0435\u0434\u0435\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043d\u0438\u0436\u0435.<\/p>\n<p><strong>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f (\u0442\u043e\u043b\u044c\u043a\u043e LLM):<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043d\u0430 PR<\/p>\n<\/td>\n<td>\n<p align=\"left\">8.3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0414\u043e\u043b\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u043e \u043e\u0446\u0435\u043d\u043a\u0435 \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">35%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0414\u043e\u043b\u044f \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439<\/p>\n<\/td>\n<td>\n<p align=\"left\">30%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0432\u044c\u044e<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.60 USD<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f (\u0433\u0438\u0431\u0440\u0438\u0434):<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043d\u0430 PR<\/p>\n<\/td>\n<td>\n<p align=\"left\">4.1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0414\u043e\u043b\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445<\/p>\n<\/td>\n<td>\n<p align=\"left\">72%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0414\u043e\u043b\u044f \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439<\/p>\n<\/td>\n<td>\n<p align=\"left\">8%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0432\u044c\u044e<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.85 USD<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0441\u0442\u0430\u043b\u043e \u0432\u0434\u0432\u043e\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u0434\u043e\u043b\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043d\u043e\u0432\u0430 \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0445 \u0447\u0438\u0442\u0430\u0442\u044c. \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043d\u044f\u043b\u0430\u0441\u044c \u0437\u0430 \u0441\u0447\u0451\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0430 \u0441\u0442\u0430\u043b\u0430 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u043e\u0432 \u043d\u0430 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0435 \u2014 \u043e\u043a\u043e\u043b\u043e 15\u201320 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 PR. \u041f\u0440\u0438 \u0434\u0432\u0435\u043d\u0430\u0434\u0446\u0430\u0442\u0438 PR \u0432 \u0434\u0435\u043d\u044c \u044d\u0442\u043e 3\u20134 \u0447\u0430\u0441\u0430 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0435\u0441\u0442\u044c \u043c\u043e\u0451 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443: \u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u0432, \u0440\u0430\u0437\u0431\u043e\u0440 edge cases, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 few-shot \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 3\u20135 \u0447\u0430\u0441\u043e\u0432 \u0432 \u043d\u0435\u0434\u0435\u043b\u044e.<\/p>\n<hr\/>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>\u0414\u0435\u043c\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0427\u0438\u0441\u0442\u044b\u0439 PR, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u044f\u0437\u044b\u043a, \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438. \u041f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d \u2014 \u044d\u0442\u043e legacy-\u043c\u043e\u043d\u043e\u043b\u0438\u0442 \u0441 \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439, \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0435 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b \u0438 \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0434\u0430\u0436\u0435 \u0435\u0451 \u0430\u0432\u0442\u043e\u0440\u044b. \u041c\u0435\u0436\u0434\u0443 \u0434\u0435\u043c\u043e \u0438 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u043e\u043c \u2014 \u043f\u0440\u043e\u043f\u0430\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u043c\u043f\u0442-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u044f \u0432 \u043e\u0434\u0438\u043d\u043e\u0447\u043a\u0443 \u043d\u0435 \u0437\u0430\u043a\u0440\u043e\u0435\u0442.<\/p>\n<p>\u0413\u0438\u0431\u0440\u0438\u0434 \u043f\u043e\u0431\u0435\u0436\u0434\u0430\u0435\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 LLM \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430. \u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0438\u0445\u0430\u0442\u044c \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0443\u0434\u0430, \u0433\u0434\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u043b\u0438 \u043b\u0438\u043d\u0442\u0435\u0440. LLM \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439, \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0438 \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0430 \u043d\u0435 \u0442\u0430\u043c, \u0433\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0430.<\/p>\n<p>\u041c\u0435\u0442\u0440\u0438\u043a\u0430 \u00ab\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432\u00bb \u2014 \u043b\u043e\u0432\u0443\u0448\u043a\u0430. \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u043c\u043d\u043e\u0433\u043e \u0438 \u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0438\u0442\u0430\u044e\u0442 \u043b\u0438 \u0435\u0451 \u043b\u044e\u0434\u0438. \u041e\u0434\u0438\u043d \u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0446\u0435\u043d\u043d\u0435\u0435 \u0434\u0435\u0441\u044f\u0442\u0438 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u0445.<\/p>\n<p>\u0410\u0433\u0435\u043d\u0442 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u00ab\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0438 \u0437\u0430\u0431\u044b\u043b\u00bb. \u041f\u0440\u043e\u043c\u043f\u0442\u044b \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u044e\u0442 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043d\u043e\u0432\u044b\u0435 \u043b\u044e\u0434\u0438 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0432 \u043d\u0435\u0434\u0435\u043b\u044e, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430 \u043d\u0435\u0451 \u043d\u0435 \u0431\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0437\u0430\u043d\u043e\u0432\u043e, \u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043b \u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u00ab\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u0430\u00bb. \u042f \u0431\u044b \u0432\u0437\u044f\u043b \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0438\u0441\u043a \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u2014 \u0438 \u0434\u043e\u0432\u0451\u043b \u0435\u0451 \u0434\u043e 95% \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0431\u044b \u0432\u0442\u043e\u0440\u0443\u044e. \u0418\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u0431\u0435\u0437 \u0433\u0435\u0440\u043e\u0438\u0437\u043c\u0430.<\/p>\n<hr\/>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043e\u043f\u044b\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f AI-\u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443 \u0432\u0430\u0441 \u0441\u043e\u0432\u043f\u0430\u043b\u0438, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442. \u0410 \u0435\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0451 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0434\u0435\u043c\u043a\u0438 \u0438 \u043f\u0440\u0438\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0440\u043e\u043a\u0438 \u2014 \u0437\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0439\u0442\u0435 \u0432 \u043e\u0446\u0435\u043d\u043a\u0443 \u0437\u0430\u043f\u0430\u0441. \u0411\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<\/div>\n<p>\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\/1031352\/\">https:\/\/habr.com\/ru\/articles\/1031352\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u044f \u0441\u0442\u0440\u043e\u0438\u043b \u0430\u0433\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u043d\u0430 LangGraph \u0438 \u0433\u0434\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u0430\u0441\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0442\u0435\u043e\u0440\u0438\u044f\u041f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0434\u0435\u043c\u043a\u0443: AI-\u0430\u0433\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442, \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u043b \u043f\u043e diff-\u0443, \u043d\u0430\u0445\u043e\u0434\u0438\u043b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 race condition \u0438 \u043f\u0438\u0441\u0430\u043b \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0444\u0438\u043a\u0441\u0430. \u0412\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u043e\u043a\u043e\u043b\u043e 40 \u0441\u0435\u043a\u0443\u043d\u0434.\u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0440\u0435\u0432\u044c\u044e \u0434\u0430\u0432\u043d\u043e \u0441\u0442\u0430\u043b\u043e \u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u044b\u043c \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u043c. \u0414\u0432\u043e\u0435 \u0441\u0435\u043d\u044c\u043e\u0440\u043e\u0432, \u043e\u043a\u043e\u043b\u043e \u0434\u0432\u0435\u043d\u0430\u0434\u0446\u0430\u0442\u0438 PR \u0432 \u0434\u0435\u043d\u044c, \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0441\u0438\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043e \u043f\u043e\u043b\u0434\u043d\u044f. \u0418\u0434\u0435\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434 \u2014 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u0430, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u2014 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u0441\u043e\u0431\u043b\u0430\u0437\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e.\u042f \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u043b \u043f\u043b\u0430\u043d: LangGraph \u0434\u043b\u044f \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438, GPT-4 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, GitHub API \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438. \u041d\u0435\u0434\u0435\u043b\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u0435\u0449\u0451 \u043d\u0435\u0434\u0435\u043b\u044f \u043d\u0430 \u043f\u043e\u043b\u0438\u0440\u043e\u0432\u043a\u0443. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u0442\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d.\u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u044f \u043e\u0448\u0438\u0431\u0441\u044f \u0432 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430. \u0410 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u0435\u043c, \u0447\u0442\u043e \u044f \u043e\u0436\u0438\u0434\u0430\u043b. \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u044f \u0441\u0434\u0435\u043b\u0430\u043b.\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0415\u0441\u0442\u044c PR, \u0432 \u043d\u0451\u043c diff \u2014 \u043d\u0430\u0431\u043e\u0440 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0410\u0433\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d:\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u0443: \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b;\u043d\u0430\u0439\u0442\u0438 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438: \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0435\u0447\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0437\u0430\u0431\u044b\u0442\u044b\u0435 await;\u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e;\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0431\u044b \u0436\u0438\u0432\u043e\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440. \u0417\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u044f \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b. \u0418\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u0433\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434, \u0430 \u0441\u0435\u043d\u044c\u043e\u0440, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044f PR, \u0432\u0438\u0434\u0435\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u043e \u043c\u0435\u043b\u043e\u0447\u0430\u043c \u0438 \u043c\u043e\u0433 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435.\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439. Webhook \u043e\u0442 GitHub \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u0430\u0433\u0435\u043d\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 diff \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 LLM, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432 \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a, \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR.[GitHub Webhook]       \u2502       \u25bc[\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c diff \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432]       \u2502       \u25bc[\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c]       \u2502       \u25bc[\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430: \u0430\u043d\u0430\u043b\u0438\u0437 \u2192 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f]       \u2502       \u25bc[\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f]       \u2502       \u25bc[\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR]\u0427\u0438\u0441\u0442\u043e, \u043b\u0438\u043d\u0435\u0439\u043d\u043e, \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0418, \u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0437\u0436\u0435, \u043d\u0430\u0438\u0432\u043d\u043e.\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043d\u0430 LangGraphMVP \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0437\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0434\u043d\u044f. LangGraph \u0443\u0434\u043e\u0431\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u0433\u0440\u0430\u0444 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e: \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0434\u0430 \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0451\u0431\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c.\u041d\u0438\u0436\u0435 \u2014 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u044b\u0439 \u0441\u043a\u0435\u043b\u0435\u0442 \u0433\u0440\u0430\u0444\u0430. \u042f \u043e\u043f\u0443\u0441\u043a\u0430\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a, \u0440\u0435\u0442\u0440\u0430\u0438 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 GitHub API, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435.from langgraph.graph import StateGraph, ENDfrom typing import TypedDict  class ReviewState(TypedDict):    pr_url: str    diff_chunks: list[dict]    reviews: list[dict]    final_comments: list[dict]  def fetch_diff(state: ReviewState) -&gt; ReviewState:    &#171;&#187;&#187;\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c diff \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c.&#187;&#187;&#187;    chunks = github_client.get_pr_diff(state[&#171;pr_url&#187;])    return {&#171;diff_chunks&#187;: chunks}  def analyze_chunk(state: ReviewState) -&gt; ReviewState:    &#171;&#187;&#187;\u041f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u043d\u043a \u0447\u0435\u0440\u0435\u0437 LLM \u0438 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c JSON \u0441 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c\u0438.&#187;&#187;&#187;    reviews = []    for chunk in state[&#171;diff_chunks&#187;]:        prompt = f&#187;&#187;&#187;\u0422\u044b \u2014 \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e\u0435\u0440.\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 diff \u0438 \u043d\u0430\u0439\u0434\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.\u0421\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434: {STYLE_GUIDE} Diff:{chunk[&#8216;content&#8217;]} \u041e\u0442\u0432\u0435\u0442\u044c \u0432 JSON: [{{&#171;file&#187;: &#171;&#8230;&#187;, &#171;line&#187;: N, &#171;comment&#187;: &#171;&#8230;&#187;, &#171;severity&#187;: &#171;&#8230;&#187;}}]&#187;&#187;&#187;        result = llm.invoke(prompt)        reviews.extend(parse_json(result))    return {&#171;reviews&#187;: reviews}  def filter_and_post(state: ReviewState) -&gt; ReviewState:    &#171;&#187;&#187;\u0414\u0435\u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0438 \u043f\u043e\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 PR.&#187;&#187;&#187;    comments = deduplicate(state[&#171;reviews&#187;])    github_client.post_review_comments(state[&#171;pr_url&#187;], comments)    return {&#171;final_comments&#187;: comments}  graph = StateGraph(ReviewState)graph.add_node(&#171;fetch&#187;, fetch_diff)graph.add_node(&#171;analyze&#187;, analyze_chunk)graph.add_node(&#171;post&#187;, filter_and_post)graph.add_edge(&#171;fetch&#187;, &#171;analyze&#187;)graph.add_edge(&#171;analyze&#187;, &#171;post&#187;)graph.add_edge(&#171;post&#187;, END) app = graph.compile()\u041d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c PR \u0430\u0433\u0435\u043d\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0441\u0435\u0431\u044f \u0445\u043e\u0440\u043e\u0448\u043e. \u041d\u0430\u0448\u0451\u043b \u043d\u0435\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440, \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u0439 except Exception, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u043b\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u043e\u0431\u0440\u043e \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435.\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0434\u043d\u044f \u0430\u0433\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u00ab\u043f\u0438\u0448\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043d\u043e \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0440\u0434\u0436\u00bb. \u042f \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u043d\u0435\u0451 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0420\u0430\u0434\u0443\u0436\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0441 \u0434\u0435\u043c\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043a\u0443\u0434\u0430 \u043c\u0435\u043d\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439.\u0413\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0434\u0430\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0438 \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0410\u0433\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 diff-\u043e\u043c, \u0430 diff \u2014 \u044d\u0442\u043e \u043d\u0435 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b. \u041c\u043e\u0434\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432\u043e\u043a\u0440\u0443\u0433.\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439: \u0430\u0433\u0435\u043d\u0442 \u0432\u0438\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 self.cache.get(key), \u043d\u0435 \u0432\u0438\u0434\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 self.cache \u2014 \u043e\u043d\u043e \u0433\u0434\u0435-\u0442\u043e \u0432\u044b\u0448\u0435, \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 diff-\u0430 \u2014 \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043f\u0438\u0448\u0435\u0442, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 None.\u0417\u0432\u0443\u0447\u0438\u0442 \u0440\u0430\u0437\u0443\u043c\u043d\u043e. \u041d\u043e self.cache \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 __init__ \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 None. \u0410\u0433\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e __init__ \u043d\u0435 \u043f\u043e\u043f\u0430\u043b \u0432 diff.\u041f\u043e \u043c\u043e\u0438\u043c \u0437\u0430\u043c\u0435\u0440\u0430\u043c, \u043e\u043a\u043e\u043b\u043e 30% \u0432\u0441\u0435\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u0431\u044b\u043b\u0438 \u0442\u0430\u043a\u0438\u043c\u0438 \u00ab\u0443\u043c\u043d\u044b\u043c\u0438\u00bb \u0434\u043e\u0433\u0430\u0434\u043a\u0430\u043c\u0438 \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u041a\u0430\u0436\u0434\u043e\u0435 \u0442\u0440\u0435\u0442\u044c\u0435 \u2014 \u043c\u0438\u043c\u043e.\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 PR\u041d\u0430 \u0434\u0435\u043c\u043e \u0431\u044b\u043b \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0439 PR \u0438\u0437 \u0442\u0440\u0451\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 80 \u0441\u0442\u0440\u043e\u043a diff-\u0430. \u0412 \u0436\u0438\u0437\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f PR \u043d\u0430 40 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 2000 \u0441 \u043b\u0438\u0448\u043d\u0438\u043c \u0441\u0442\u0440\u043e\u043a. \u042d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0430\u044f.\u041a\u043e\u0433\u0434\u0430 \u0432\u0445\u043e\u0434 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0443\u0442\u0430\u0435\u0442, \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435. \u041e\u0434\u0438\u043d \u0440\u0430\u0437 \u0430\u0433\u0435\u043d\u0442 \u0432\u0435\u0440\u043d\u0443\u043b JSON \u0441 \u043d\u0435\u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439, \u043f\u0430\u0440\u0441\u0435\u0440 \u0443\u043f\u0430\u043b, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b, \u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u044d\u0442\u043e\u0433\u043e \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0434\u043d\u044f.\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u0413\u0440\u0443\u0431\u0430\u044f \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a. \u041e\u0434\u0438\u043d \u0440\u0435\u0432\u044c\u044e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e PR \u2014 \u044d\u0442\u043e 500\u2013700 \u0441\u0442\u0440\u043e\u043a diff-\u0430, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 15\u201320 \u0442\u044b\u0441\u044f\u0447\u0430\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 2\u20133 \u0442\u044b\u0441\u044f\u0447\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445. \u041d\u0430 GPT-4 \u0446\u0435\u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0432\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 0.50\u20130.70 \u0434\u043e\u043b\u043b\u0430\u0440\u0430.\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. 12 PR \u0432 \u0434\u0435\u043d\u044c, 22 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0434\u043d\u044f \u2014 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 130\u2013185 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u0432 \u043c\u0435\u0441\u044f\u0446. \u041d\u0435 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430, \u043d\u043e \u0438 \u043d\u0435 \u043a\u043e\u043f\u0435\u0439\u043a\u0438. \u0410 \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u044f\u043c\u0438, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0432 \u0442\u0440\u0438-\u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430.\u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0437\u043c\u041e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 PR, \u0434\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434\u0440\u044f\u0434. \u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0430\u0433\u0435\u043d\u0442 \u043f\u0438\u0448\u0435\u0442 \u043f\u0440\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 thread safety. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u2014 \u043c\u043e\u043b\u0447\u0438\u0442 \u043f\u0440\u043e thread safety, \u0437\u0430\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e.\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 temperature=0 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u043d\u043e \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043c\u043f\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u00ab\u043f\u043b\u0430\u0432\u0430\u0435\u0442\u00bb.\u0414\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u044d\u0442\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0416\u0438\u0432\u043e\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440 \u0442\u043e\u0436\u0435 \u043e\u0448\u0438\u0431\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u043e\u043d \u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f\u0445. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043a \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u0421 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0435\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0435\u0432\u044c\u044e.\u042d\u0444\u0444\u0435\u043a\u0442 \u00ab\u043c\u0430\u043b\u044c\u0447\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0440\u0438\u0447\u0430\u043b \u0432\u043e\u043b\u043a\u00bb\u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0434\u0435\u043b\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0430\u0433\u0435\u043d\u0442\u0430. \u0421\u043a\u0440\u043e\u043b\u043b\u044f\u0442 \u0438 \u0438\u0434\u0443\u0442 \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430: \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430.\u0418\u0437 \u0434\u0435\u0441\u044f\u0442\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0440\u0438-\u0447\u0435\u0442\u044b\u0440\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438, \u0435\u0449\u0451 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u2014 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0435\u0440\u043d\u044b\u043c\u0438, \u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0432 \u0434\u0443\u0445\u0435 \u00ab\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c docstring\u00bb, \u0438 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0434\u0432\u0430-\u0442\u0440\u0438 \u2014 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u0435\u0434. \u041a\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u043b\u044e\u0434\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435.\u0427\u0442\u043e \u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0430\u0433\u0435\u043d\u0442\u0430 \u043d\u0430 \u043f\u043e\u043b\u043a\u0443 \u0438 \u0437\u0430\u0431\u044b\u0442\u044c \u0431\u044b\u043b\u043e \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c. \u041d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0441\u044c: \u0440\u0435\u0432\u044c\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0432 \u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043d\u0430\u0447\u0430\u043b.\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043e\u043b\u043e\u0433\u043e diff-\u0430\u041f\u0435\u0440\u0432\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0430\u043b\u043e\u0441\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410\u0433\u0435\u043d\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e diff, \u0430 diff \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u044f \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2014 \u043a\u043b\u0430\u0441\u0441 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043f\u043b\u044e\u0441 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432.\u041f\u043e\u0434\u0445\u043e\u0434 \u0434\u043e\u0440\u043e\u0436\u0435 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c, \u043d\u043e \u0447\u0438\u0441\u043b\u043e \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0439 \u043f\u0440\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u043f\u0430\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u0434\u0432\u043e\u0435.def fetch_diff_with_context(state: ReviewState) -&gt; ReviewState:    &#171;&#187;&#187;\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u043d\u043a \u0434\u0438\u0444\u0444\u0430 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c.&#187;&#187;&#187;    chunks = github_client.get_pr_diff(state[&#171;pr_url&#187;])    enriched = []    for chunk in chunks:        full_file = github_client.get_file_content(            chunk[&#171;repo&#187;], chunk[&#171;file_path&#187;], chunk[&#171;base_ref&#187;]        )        # \u0411\u0435\u0440\u0451\u043c \u043d\u0435 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c        context = extract_surrounding_context(            full_file,            chunk[&#171;changed_lines&#187;],            context_window=50,  # 50 \u0441\u0442\u0440\u043e\u043a \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f        )        chunk[&#171;full_context&#187;] = context        enriched.append(chunk)    return {&#171;diff_chunks&#187;: enriched}Few-shot \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0432\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u2014 \u0441\u0442\u0438\u043b\u044c \u0438 \u0442\u043e\u043d. \u0412\u043c\u0435\u0441\u0442\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u00ab\u0442\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u00bb \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u043f\u043e\u0448\u043b\u0438 15\u201320 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0432\u044c\u044e-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 PR. \u0421 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u0442\u0438\u043b\u0435\u043c, \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u043c\u0438.\u042d\u0444\u0444\u0435\u043a\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439. \u0410\u0433\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0442\u0438\u043b\u0435 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430. \u041c\u0435\u043d\u044c\u0448\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u0432\u0440\u043e\u0434\u0435 \u00ab\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u00bb, \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u043a\u0438 \u0442\u0438\u043f\u0430 \u00ab\u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 NPE \u0435\u0441\u043b\u0438 user None, \u0434\u043e\u0431\u0430\u0432\u044c guard clause\u00bb.Confidence score \u0438 \u043f\u043e\u0440\u043e\u0433 \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u044f\u0422\u0440\u0435\u0442\u044c\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043f\u0440\u043e\u043c\u043f\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u0448\u043a\u0430\u043b\u0435 \u043e\u0442 1 \u0434\u043e 10. \u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0438\u0436\u0435 7, \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f, \u0430 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043b\u043e\u0433 \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430.\u041f\u0440\u0438\u0451\u043c \u0433\u0440\u0443\u0431\u044b\u0439, \u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439. \u0414\u043e\u043b\u044f \u043c\u0443\u0441\u043e\u0440\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0443\u043f\u0430\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441 60% \u0434\u043e 25%.def analyze_with_confidence(state: ReviewState) -&gt; ReviewState:    &#171;&#187;&#187;\u0410\u0433\u0435\u043d\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0438; \u043d\u0438\u0436\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c.&#187;&#187;&#187;    reviews = []    for chunk in state[&#171;diff_chunks&#187;]:        prompt = f&#187;&#187;&#187;&#8230;\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0436\u0438 confidence \u043e\u0442 1 \u0434\u043e 10.10 = \u0442\u044b \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0430\u0433 \u0438\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u0430.5 = \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u043e \u043d\u0443\u0436\u0435\u043d \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.1 = \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u0442\u0432\u0435\u0442\u044c JSON: [{{&#171;file&#187;: &#171;&#8230;&#187;, &#171;line&#187;: N, &#171;comment&#187;: &#171;&#8230;&#187;,                &#171;severity&#187;: &#171;&#8230;&#187;, &#171;confidence&#187;: N}}]&#187;&#187;&#187;        result = llm.invoke(prompt)        parsed = parse_json(result)        # \u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f        reviews.extend([r for r in parsed if r[&#171;confidence&#187;] &gt;= 7])    return {&#171;reviews&#187;: reviews}\u0413\u0438\u0431\u0440\u0438\u0434: LLM \u043f\u043b\u044e\u0441 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u0434\u0432\u0438\u0433 \u2014 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0438\u0434\u0435\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0435\u0440\u0435\u0437 \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0427\u0430\u0441\u0442\u044c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-478548","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/478548","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=478548"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/478548\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=478548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=478548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=478548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}