[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"portal-settings:stajic:ru":3,"public-menus:all":38,"post:what-is-context-engineering-what-the-model-receives-before-it-answers:ru":205,"related:post:what-is-context-engineering-what-the-model-receives-before-it-answers:ru:1":3035},{"statusCode":4,"data":5,"message":37},200,{"tenantId":6,"lang":7,"defaultLang":8,"siteUrl":9,"contactEmail":10,"brandName":11,"logoUrl":12,"siteName":11,"siteDescription":13,"ogImage":10,"robotsIndex":14,"socialLinks":10,"reservedSlugs":10,"seoPolicy":15},"stajic","ru","de","https:\u002F\u002Fstajic.de",null,"Stajic Platform","\u002FLogo_Planet.svg","Stajic Portal",true,{"branding":16,"relatedContent":17,"crossDomainLinks":18},{"logoUrl":12},{"enabled":14},[19,22,25,28,31,34],{"url":20,"label":21,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Ffigure.rocks","figure.rocks",{"url":23,"label":24,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Floving.rocks","loving.rocks",{"url":26,"label":27,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.com","bazify.com",{"url":29,"label":30,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.de","bazify.de",{"url":32,"label":33,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.at","bazify.at",{"url":35,"label":36,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.ba","bazify.ba","Portal settings resolved",[39,45],{"id":40,"name":41,"location":42,"isActive":14,"isDefault":43,"items":44},1,"main-navigation","header",false,[],{"id":46,"name":47,"location":48,"isActive":14,"isDefault":14,"items":49},4,"main-menu","sidebar",[50,66,79,93,103,118,133],{"id":51,"title":52,"url":60,"target":61,"icon":62,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":64,"portfolioId":10,"children":65},"item-18",{"de":53,"en":54,"es":55,"fr":56,"it":54,"ru":57,"sr":58,"zh":59},"Startseite","Home","Inicio","Accueil","Главная","Почетна","首页","\u002Ffull-stack-web-developer-munich-performance-seo-and-maintainable-builds","_self","i-lucide-home","page",111,[],{"id":67,"title":68,"url":75,"target":61,"icon":76,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":77,"portfolioId":10,"children":78},"item-22",{"de":69,"en":69,"es":70,"fr":69,"it":71,"ru":72,"sr":73,"zh":74},"Vision","Visión","Visione","Видение","Визија","想象","\u002Fueber-uns-webdesign-muenchen-webaplikation","i-lucide-eye",113,[],{"id":80,"title":81,"url":89,"target":61,"icon":90,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":91,"portfolioId":10,"children":92},"item-19",{"de":82,"en":83,"es":84,"fr":83,"it":85,"ru":86,"sr":87,"zh":88},"Leistungen","Services","Servicios","Servizi","Услуги","Услуге","服务","\u002Fservices-dienstleistungen-muenchen","i-lucide-wrench",116,[],{"id":94,"title":95,"url":99,"target":61,"icon":100,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":101,"portfolioId":10,"children":102},"item-23",{"de":96,"en":96,"es":96,"fr":96,"it":96,"ru":97,"sr":97,"zh":98},"Blog","Блог","博客","\u002Fblog","i-lucide-book-open",112,[],{"id":104,"title":105,"url":114,"target":61,"icon":115,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":116,"portfolioId":10,"children":117},"item-32",{"de":106,"en":107,"es":108,"fr":109,"it":110,"ru":111,"sr":112,"zh":113},"Neue Technologien","New Technologies","Nuevas tecnologías","Nouvelles technologies","Nuove tecnologie","Новые технологии","Нове технологије","新技术！","\u002Fneue-webtechnologien","i-lucide-sparkles",122,[],{"id":119,"title":120,"url":129,"target":61,"icon":130,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":131,"portfolioId":10,"children":132},"item-20",{"de":121,"en":122,"es":123,"fr":124,"it":125,"ru":126,"sr":127,"zh":128},"Kontakt","Contact us!","Contacto","Contact","Contatto","Контакт","Контактирајте нас","联系我们！","\u002Fcontact","i-lucide-mail",115,[],{"id":134,"title":135,"url":144,"target":61,"icon":145,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":146,"portfolioId":10,"children":147},"item-21",{"de":136,"en":137,"es":138,"fr":139,"it":140,"ru":141,"sr":142,"zh":143},"Unsere Arbeit","Our Work","Nuestro trabajo","Nos réalisations","I nostri lavori","Наши работы","Наши радови","文件夹","\u002Fportfolio","i-lucide-briefcase",114,[148,161,175,181,193],{"id":149,"title":150,"url":144,"target":61,"icon":159,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":146,"portfolioId":10,"children":160},"item-24",{"de":151,"en":152,"es":153,"fr":154,"it":155,"ru":156,"sr":157,"zh":158},"Alle Projekte","All Projects","Todos los proyectos","Tous les projets","Tutti i progetti","Все проекты","Сви пројекти","所有项目","i-lucide-grid-3x3",[],{"id":162,"title":163,"url":171,"target":61,"icon":172,"isActive":14,"type":173,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":10,"children":174},"item-29",{"de":164,"en":165,"es":166,"fr":167,"it":168,"ru":169,"sr":170,"zh":143},"Local Roots, Global Reach","Local Roots - Global Reach","Empresa local ","Entreprise locale","Azienda locale","Местная компания","Локално предузеће глобално тржиште","\u002Fportfolio\u002Flocal-roots-global-reach-communication-media-systems-for-modern-business","i-lucide-folder","custom",[],{"id":176,"title":177,"url":179,"target":61,"icon":172,"isActive":14,"type":173,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":10,"children":180},"item-28",{"de":178,"en":178,"es":178,"fr":178,"it":178,"ru":178,"sr":178,"zh":178},"Solr Suggester","\u002Fportfolio\u002Fsolr-fuzzy-suggester-und-solr-infix-suggester-abfrage-ueber-ajax-und-filterung",[],{"id":182,"title":183,"url":191,"target":61,"icon":172,"isActive":14,"type":173,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":10,"children":192},"item-27",{"de":184,"en":185,"es":186,"fr":187,"it":188,"ru":189,"sr":190,"zh":185},"Firmenwebseite SEO","Company Website SEO","Sitio web corporativo SEO","Site web d’entreprise SEO","Sito web aziendale SEO","Корпоративный сайт SEO","Пословна веб-страница SEO","\u002Fportfolio\u002Fseo-sem-branding-mobile-webseite-muenchen",[],{"id":194,"title":195,"url":203,"target":61,"icon":172,"isActive":14,"type":173,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":10,"children":204},"item-31",{"de":196,"en":197,"es":198,"fr":199,"it":200,"ru":201,"sr":202,"zh":197},"Digitalisierungsportal","Digitalization Portal","Portal de digitalización","Portail de numérisation","Portale di digitalizzazione","Портал цифровизации","Портал за дигитализацију","\u002Fportfolio\u002Fdigitalisierungsportal-archiv-museum-bibliothek-ead-lido-mets-mods",[],{"statusCode":4,"data":206,"message":3034},{"id":207,"title":208,"slug":209,"content":210,"contentJson":211,"excerpt":1408,"featuredImage":1409,"featuredImageAlt":1410,"featuredImageCaption":10,"featuredImageTitle":10,"featuredImageCopyright":10,"featuredImageAuthor":10,"featuredImageSourceUrl":10,"featuredImageLicense":10,"featuredImageIsAiGenerated":43,"status":1411,"publishedAt":1412,"createdAt":1413,"updatedAt":1414,"seoLocalePaths":1415,"categories":1424,"author":1437,"translations":1442},"488","Что такое контекстная инженерия? Что получает модель до того, как она отвечает","what-is-context-engineering-what-the-model-receives-before-it-answers","\u003Cp>Контекстная инженерия — это проектирование того, какую информацию языковая модель получает во время вывода, в какой форме, в каком порядке и на какой срок. Она шире, чем промпт-инженерия, потому что контекст модели может включать системные инструкции, сообщения пользователя, извлечённые документы, результаты работы инструментов, память, текущее состояние приложения, примеры, структурированные данные и промежуточные артефакты. Цель не в том, чтобы максимизировать количество токенов, а в том, чтобы построить минимальный полезный контекст, сохраняющий информацию, ограничения и доказательства, необходимые для текущей задачи.\u003C\u002Fp>\n\u003Caside class=\"editorjs-callout editorjs-callout--info my-6 rounded-xl border p-5 border-blue-300 bg-blue-50 dark:border-blue-900 dark:bg-blue-950\u002F20\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Прямой ответ\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Промпт-инженерия спрашивает: \u003Cstrong>как нам инструктировать модель?\u003C\u002Fstrong> Контекстная инженерия спрашивает: \u003Cstrong>что модель должна знать прямо сейчас и как эту информацию следует собрать?\u003C\u002Fstrong>\u003Cbr>\u003Cbr>Поиск, память, управление состоянием, проектирование инструментов, обрезка истории, сжатие и упорядочивание — всё это механизмы контекстной инженерии, когда они определяют токены, доступные модели до того, как она выдаст следующий результат.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Caside class=\"editorjs-callout editorjs-callout--warning my-6 rounded-xl border p-5 border-amber-300 bg-amber-50 dark:border-amber-900 dark:bg-amber-950\u002F20\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Контекст — это не то же самое, что знание или память\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Система может что-то знать, не помещая это в текущий контекст. Она может помнить что-то за пределами окна модели. Она может извлечь документ, но позже исключить его из итогового промпта. Модель может напрямую использовать только тот контекст, который доходит до текущего вывода.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Caside class=\"editorjs-callout editorjs-callout--note my-6 rounded-xl border p-5 border-gray-300 bg-gray-50 dark:border-gray-700 dark:bg-gray-900\u002F40\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Примечание об актуальности — 8 октября 2026 г.\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Контекстная инженерия сейчас является устоявшимся практическим термином в ведущих руководствах по ИИ-инженерии, но это не единый формальный стандарт с одной обязательной архитектурой. Anthropic описывает её как курирование и поддержание оптимального набора токенов для вывода; текущее руководство OpenAI по агентам рассматривает контекст сессии, обрезку и сжатие как явные инженерные задачи для долго работающих систем.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Cnav class=\"editorjs-toc\" data-editorjs-toc=\"true\" aria-label=\"Содержание\">\u003Cstrong class=\"editorjs-toc__title\">Содержание\u003C\u002Fstrong>\u003Col class=\"editorjs-toc__list editorjs-toc__list--depth-0\">\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-6\" class=\"editorjs-toc__link\">Что на самом деле означает контекстная инженерия\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-10\" class=\"editorjs-toc__link\">Простейший пример\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-15\" class=\"editorjs-toc__link\">Где заканчивается простой пример\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-18\" class=\"editorjs-toc__link\">Что может попасть в контекст модели?\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-20\" class=\"editorjs-toc__link\">Контекстная инженерия против промпт-инженерии\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-23\" class=\"editorjs-toc__link\">Контекстная инженерия против поиска\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-28\" class=\"editorjs-toc__link\">Контекстная инженерия против памяти\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-33\" class=\"editorjs-toc__link\">Контекстная инженерия против состояния приложения\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-37\" class=\"editorjs-toc__link\">Проектирование инструментов — часть контекстной инженерии\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-41\" class=\"editorjs-toc__link\">Контекст точно в срок против предзагруженного контекста\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-44\" class=\"editorjs-toc__link\">Контекст — это бюджет, а не система хранения\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-48\" class=\"editorjs-toc__link\">Почему больше контекста может быть хуже\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-52\" class=\"editorjs-toc__link\">Порядок контекста должен быть намеренным\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-56\" class=\"editorjs-toc__link\">Конфликтующий контекст требует явного приоритета\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-60\" class=\"editorjs-toc__link\">Компактизация — это преобразование контекста, а не хранение без потерь\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-65\" class=\"editorjs-toc__link\">Сохраняйте границы действительности\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-69\" class=\"editorjs-toc__link\">Контекстная инженерия — это также граница безопасности\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-73\" class=\"editorjs-toc__link\">Практическая архитектура контекстной инженерии\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-77\" class=\"editorjs-toc__link\">Практическая политика построения контекста\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-79\" class=\"editorjs-toc__link\">Как оценивать контекстную инженерию\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-81\" class=\"editorjs-toc__link\">Сборка контекста — отдельный слой сбоев RAG\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-85\" class=\"editorjs-toc__link\">Доказательства оригинальной реализации\u003C\u002Fa>\u003Col class=\"editorjs-toc__list editorjs-toc__list--depth-1\">\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-86\" class=\"editorjs-toc__link\">Source of Truth Research Engine: ограниченное исследование вместо неограниченного контекста\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-90\" class=\"editorjs-toc__link\">Aaasaasa AI Client: среда выполнения, разрешения и контекст — это отдельные concerns\u003C\u002Fa>\u003C\u002Fli>\u003C\u002Fol>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-96\" class=\"editorjs-toc__link\">Распространённые режимы отказа контекстной инженерии\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-98\" class=\"editorjs-toc__link\">Распространённые заблуждения\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-100\" class=\"editorjs-toc__link\">Практическая последовательность контекстной инженерии\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-102\" class=\"editorjs-toc__link\">Контрольный список контекстной инженерии\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-104\" class=\"editorjs-toc__link\">Краевые случаи и ограничения\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-110\" class=\"editorjs-toc__link\">Что могло бы изменить этот ответ?\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-114\" class=\"editorjs-toc__link\">Связанные канонические знания\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-119\" class=\"editorjs-toc__link\">Часто задаваемые вопросы\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-121\" class=\"editorjs-toc__link\">Глоссарий\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-123\" class=\"editorjs-toc__link\">Заключение\u003C\u002Fa>\u003C\u002Fli>\u003Cli class=\"editorjs-toc__item\">\u003Ca href=\"#section-127\" class=\"editorjs-toc__link\">Первоисточники и актуальные рекомендации\u003C\u002Fa>\u003C\u002Fli>\u003C\u002Fol>\u003C\u002Fnav>\n\u003Ch2 id=\"section-6\">Что на самом деле означает контекстная инженерия\u003C\u002Fh2>\n\u003Cp>Каждый вызов модели происходит во временной рабочей среде: текущие инструкции, сообщения, извлечённые доказательства, выводы инструментов и состояние, которые помещаются в активное контекстное окно. Контекстная инженерия — это дисциплина осознанного построения такой среды.\u003C\u002Fp>\n\u003Cp>Ключевое слово — осознанного. Наивная система просто конкатенирует всё, что у неё есть: полную историю, все извлечённые документы, каждый ответ инструмента и большие системные промпты. Система с контекстной инженерией решает, какая информация необходима для текущего решения, а какая должна оставаться за пределами окна до момента необходимости.\u003C\u002Fp>\n\u003Cp>Это делает контекстную инженерию отчасти задачей информационной архитектуры, отчасти задачей времени выполнения и отчасти задачей оценки. Проектирование должно решить, что может попасть в контекст, откуда это берётся, какая версия является актуальной, как разрешаются конфликты, сколько деталей сохраняется и как результат проверяется.\u003C\u002Fp>\n\u003Ch2 id=\"section-10\">Простейший пример\u003C\u002Fh2>\n\u003Cp>Представьте внутреннего ассистента поддержки. Пользователь спрашивает: «Может ли этот клиент отменить без комиссии?»\u003C\u002Fp>\n\u003Cp>Модели могут понадобиться пять вещей: текущая политика отмены, текущий тип договора клиента, дата вступления договора в силу, соответствующие правила исключений и объём полномочий пользователя.\u003C\u002Fp>\n\u003Cp>Ей не обязательно нужна вся база клиентов, полный архив политик, каждый предыдущий разговор или каждый тикет поддержки. Контекстная инженерия — это процесс отбора и сборки пяти полезных фрагментов с исключением нерелевантной информации.\u003C\u002Fp>\n\u003Csection class=\"editorjs-process my-6\">\u003Ch3 class=\"mb-3 text-lg font-semibold\">От состояния приложения к контексту модели\u003C\u002Fh3>\u003Cdiv class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4\">\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">1\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">1. Понять задачу\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Классифицировать, что требует текущий вопрос и какие типы информации могут повлиять на ответ.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">2\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">2. Определить авторитетное состояние\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Прочитать текущее состояние приложения или бизнеса, которое не следует угадывать по памяти.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">3\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">3. Извлечь вспомогательные знания\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Найти политику, документы или внешние доказательства, относящиеся к конкретной задаче.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">4\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">4. Применить критерии допустимости и разрешения\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Исключить данные, которые текущий пользователь или среда выполнения не имеют права раскрывать модели.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">5\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">5. Сократить и структурировать\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Удалить дублирование, выбрать полезные фрагменты и сохранить критичные метаданные, условия и исключения.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">6\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">6. Упорядочить контекст\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Разместить инструкции, текущее состояние и решающие доказательства там, где модель сможет последовательно их использовать.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">7\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">7. Выполнить вывод\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Модель получает собранный контекст и выдаёт следующий ответ или предложение действия.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fsection>\n\u003Ch2 id=\"section-15\">Где заканчивается простой пример\u003C\u002Fh2>\n\u003Cp>Реальные системы сложнее, потому что информация, необходимая для одного шага, может быть неизвестна до начала выполнения. Агент может обнаруживать новые факты через инструменты, создавать промежуточные файлы, получать изменяющееся внешнее состояние или выполнять задачу дольше одного контекстного окна.\u003C\u002Fp>\n\u003Cp>Поэтому контекстная инженерия становится динамической. Контекст для шага 12 не должен быть просто контекстом шага 1 плюс одиннадцать слоёв накопленного вывода. Он должен отражать текущее состояние задачи, решения, которые всё ещё важны, и доказательства, необходимые для следующего действия.\u003C\u002Fp>\n\u003Ch2 id=\"section-18\">Что может попасть в контекст модели?\u003C\u002Fh2>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Компонент контекста\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Назначение\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Типичный риск\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Системные \u002F разработческие инструкции\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Определяют роль, ограничения, политики и поведение\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Слишком расплывчатые, противоречивые или перегруженные хрупкой логикой\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Текущий запрос пользователя\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Определяет непосредственную задачу и намерение\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Неоднозначность или конфликт с предыдущей историей\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">История диалога\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сохраняет непрерывность между ходами\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Устаревшие предположения, повторения и рост числа токенов\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Извлечённые документы\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Предоставляют внешние знания\u002Fдоказательства\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Несоответствие, устаревшие версии, слабый авторитет или дублирование\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Текущее состояние приложения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Предоставляет изменчивые бизнес\u002Fсистемные факты\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Использование кэшированного или запомненного состояния вместо текущего авторитетного источника\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Определения инструментов\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сообщают модели, какие возможности существуют и как их вызывать\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Слишком много пересекающихся инструментов или многословные схемы\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Результаты работы инструментов\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Привносят наблюдения из среды в цикл\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Большие зашумлённые выходные данные, недоверенный контент или устаревшие наблюдения\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Память\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Повторно вводит выбранную информацию из предыдущих взаимодействий\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Устаревание, неверное обобщение или чрезмерная персонализация\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Примеры\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Демонстрируют желаемое поведение\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Слишком много крайних случаев могут вытеснить текущую задачу\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Промежуточные артефакты\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Несут планы, резюме, код, вычисления или заметки\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Старое промежуточное состояние может быть ошибочно принято за окончательную истину\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Политики \u002F ограничения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Определяют запрещённое или ограниченное поведение\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Конфликт с бизнес-логикой или скрытые пробелы в принудительном исполнении\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-20\">Контекстная инженерия против промпт-инженерии\u003C\u002Fh2>\n\u003Csection class=\"editorjs-comparison my-6\">\u003Ch3 class=\"mb-3 text-lg font-semibold\">Промпт-инженерия и контекстная инженерия решают разные уровни задач\u003C\u002Fh3>\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 bg-gray-50 px-4 py-3 text-left dark:border-gray-700 dark:bg-gray-900\">\u003C\u002Fth>\u003Cth class=\"border border-gray-300 bg-gray-50 px-4 py-3 text-left font-semibold dark:border-gray-700 dark:bg-gray-900\">Промпт-инженерия\u003C\u002Fth>\u003Cth class=\"border border-gray-300 bg-gray-50 px-4 py-3 text-left font-semibold dark:border-gray-700 dark:bg-gray-900\">Контекстная инженерия\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Основной фокус\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Типичная область применения\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Когда меняется\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Типичная ошибка\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Взаимосвязь\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fsection>\n\u003Cp>Anthropic прямо описывает контекстную инженерию как естественное развитие промпт-инженерии для систем, в которых модель должна работать с инструментами, внешними данными, историей сообщений и долгоживущим состоянием агента. Практическое различие полезно, потому что идеально написанный промпт не может компенсировать отсутствие авторитетных данных или контекст, загрязнённый противоречивым состоянием.\u003C\u002Fp>\n\u003Ch2 id=\"section-23\">Контекстная инженерия против поиска\u003C\u002Fh2>\n\u003Cp>Поиск выбирает информацию-кандидата из внешнего корпуса или источника. Контекстная инженерия решает, что происходит после и вокруг этого поиска.\u003C\u002Fp>\n\u003Cp>Поисковик может вернуть 30 фрагментов. Реранкер может сократить их до 10. Слой контекста может выбрать четыре фрагмента, удалить дубликаты, прикрепить метаданные источника\u002Fверсии, объединить их с текущим состоянием приложения и разместить после системных инструкций.\u003C\u002Fp>\n\u003Cp>Именно поэтому RAG-система может извлечь правильный фрагмент и всё равно ответить плохо: сбой может произойти во время сборки контекста, а не во время поиска.\u003C\u002Fp>\n\u003Caside class=\"editorjs-callout editorjs-callout--success my-6 rounded-xl border p-5 border-emerald-300 bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950\u002F20\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Поиск находит кандидатов; контекстная инженерия конструирует входные данные модели\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Правильный результат поиска полезен только в том случае, если он выдерживает фильтрацию, упорядочивание, сжатие и решения по бюджету токенов и действительно доходит до модели в пригодной для использования форме.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Ch2 id=\"section-28\">Контекстная инженерия против памяти\u003C\u002Fh2>\n\u003Cp>Память — это информация, сохраняемая вне непосредственного вызова модели, чтобы её можно было использовать снова позже. Контекст — это информация, фактически загруженная в текущий вызов.\u003C\u002Fp>\n\u003Cp>Система памяти может содержать тысячи фактов, заметок или предыдущих решений. Контекстная инженерия выбирает, какие из них следует повторно ввести для текущей задачи. Загрузка всей памяти на каждом ходу сводит на нет смысл наличия внешнего слоя памяти.\u003C\u002Fp>\n\u003Cp>Это различие становится критически важным для изменчивого состояния. Запомненный статус проекта или предпочтение пользователя может быть полезным, но текущее авторитетное состояние может потребоваться перечитать перед принятием значимого решения.\u003C\u002Fp>\n\u003Caside class=\"editorjs-referral my-6\">\u003Ca href=\"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Fai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context\" class=\"flex flex-col sm:flex-row gap-4 rounded-xl border border-gray-200 dark:border-gray-700 p-4 transition hover:border-primary-500\">\u003Cdiv class=\"min-w-0 flex-1\">\u003Cstrong class=\"block text-lg text-gray-900 dark:text-gray-100\">Память ИИ-агента — это не RAG: как разделить память, поиск, состояние и контекст\u003C\u002Fstrong>\u003Cp class=\"mt-2 text-sm text-gray-600 dark:text-gray-300\">Практическая архитектура, разделяющая то, что сохраняется, что является авторитетным сейчас, что извлекается и что модель фактически получает.\u003C\u002Fp>\u003Cspan class=\"mt-3 inline-flex text-sm font-medium text-primary-600 dark:text-primary-400\">Читать статью об архитектуре памяти →\u003C\u002Fspan>\u003C\u002Fdiv>\u003C\u002Fa>\u003C\u002Faside>\n\u003Ch2 id=\"section-33\">Контекстная инженерия против состояния приложения\u003C\u002Fh2>\n\u003Cp>Состояние приложения — это текущее состояние внешней системы: баланс счёта, статус заявки, версия файла, этап рабочего процесса, состояние развёртывания или прогресс задачи.\u003C\u002Fp>\n\u003Cp>Состояние можно обобщить в контекст, но резюме — это не само состояние. Для значимых операций среда выполнения может потребовать перечитать авторитетную систему непосредственно перед действием, а не доверять более раннему снимку, видимому модели.\u003C\u002Fp>\n\u003Caside class=\"editorjs-callout editorjs-callout--warning my-6 rounded-xl border p-5 border-amber-300 bg-amber-50 dark:border-amber-900 dark:bg-amber-950\u002F20\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Контекст — это снимок\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Как только состояние скопировано в промпт, оно может устареть. Контекстная инженерия должна определять, когда изменчивое состояние требует обновления и какие операции требуют нового авторитетного чтения.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Ch2 id=\"section-37\">Проектирование инструментов — часть контекстной инженерии\u003C\u002Fh2>\n\u003Cp>Инструменты не просто дают агентам возможности. Имена инструментов, описания, схемы и результаты становятся видимой для модели информацией, которая формирует решения.\u003C\u002Fp>\n\u003Cp>Текущие рекомендации Anthropic по контекстной инженерии подчёркивают важность токен-эффективных инструментов и предостерегают от раздутых наборов инструментов с пересекающейся функциональностью. Каталог инструментов, который трудно различить человеку, также трудно надёжно маршрутизировать модели.\u003C\u002Fp>\n\u003Cp>Результаты работы инструментов также требуют контекстной дисциплины. Возврат всего журнала на 20 000 строк, когда агент запросил одно условие ошибки, расходует внимание и может похоронить решающее доказательство.\u003C\u002Fp>\n\u003Ch2 id=\"section-41\">Контекст точно в срок против предзагруженного контекста\u003C\u002Fh2>\n\u003Csection class=\"editorjs-comparison my-6\">\u003Ch3 class=\"mb-3 text-lg font-semibold\">Два способа предоставления информации\u003C\u002Fh3>\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 bg-gray-50 px-4 py-3 text-left dark:border-gray-700 dark:bg-gray-900\">\u003C\u002Fth>\u003Cth class=\"border border-gray-300 bg-gray-50 px-4 py-3 text-left font-semibold dark:border-gray-700 dark:bg-gray-900\">Предзагруженный контекст\u003C\u002Fth>\u003Cth class=\"border border-gray-300 bg-gray-50 px-4 py-3 text-left font-semibold dark:border-gray-700 dark:bg-gray-900\">Контекст точно в срок\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Метод\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Сильная сторона\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Риск\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-3 text-left font-semibold dark:border-gray-700\">Полезно, когда\u003C\u002Fth>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-3 dark:border-gray-700\">\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\u003C\u002Fsection>\n\u003Cp>Anthropic описывает гибридный подход, при котором часть стабильного контекста предзагружается, а агенты извлекают дополнительную информацию во время выполнения. Это полезный архитектурный шаблон, потому что не каждый важный факт заслуживает постоянного присутствия в контекстном окне.\u003C\u002Fp>\n\u003Ch2 id=\"section-44\">Контекст — это бюджет, а не система хранения\u003C\u002Fh2>\n\u003Cp>Контекстное окно определяет ёмкость. Оно не гарантирует, что каждый токен будет использован одинаково хорошо. Модель должна распределять внимание между инструкциями, историей, доказательствами, инструментами и промежуточным состоянием.\u003C\u002Fp>\n\u003Cp>Практическая цель, следовательно, не «заполнить окно». Она состоит в том, чтобы максимизировать полезность ограниченного бюджета внимания.\u003C\u002Fp>\n\u003Cp>Anthropic формулирует аналогичный принцип как поиск наименьшего набора токенов с высоким сигналом, который максимизирует вероятность желаемого поведения. Рекомендации OpenAI по управлению контекстом также предупреждают, что неотфильтрованная история, избыточные результаты инструментов и зашумлённое извлечение могут перегрузить даже большие окна.\u003C\u002Fp>\n\u003Ch2 id=\"section-48\">Почему больше контекста может быть хуже\u003C\u002Fh2>\n\u003Cp>Дополнительный контекст может вносить нерелевантную информацию, устаревшее состояние, дублирующиеся доказательства, противоречивые инструкции или конкуренцию за позицию. Он также может заставлять системы уплотнения отбрасывать детали, которые позже становятся важными.\u003C\u002Fp>\n\u003Cp>Классическое исследование Lost in the Middle показало, что модели с длинным контекстом могут использовать информацию по-разному в зависимости от того, где появляется релевантное содержимое, причём производительность часто снижается, когда решающая информация размещается в середине длинных входных данных.\u003C\u002Fp>\n\u003Cp>Это не означает, что длинный контекст inherently плох. Это означает, что доступность внутри окна не то же самое, что надёжное использование.\u003C\u002Fp>\n\u003Ch2 id=\"section-52\">Порядок контекста должен быть намеренным\u003C\u002Fh2>\n\u003Cp>Построение контекста — это также проблема порядка. Критические инструкции, текущее состояние, решающие доказательства и ограничения, специфичные для задачи, не следует объединять произвольно.\u003C\u002Fp>\n\u003Cp>Не существует универсального идеального порядка для каждой модели и задачи. Поэтому архитектура должна проверять, меняет ли переупорядочивание доказательств правильность и остаётся ли важная информация устойчивой при реалистичных вариациях контекста.\u003C\u002Fp>\n\u003Cp>Стабильный ответ, который резко меняется, когда два одинаково обоснованных фрагмента меняются местами, указывает на чувствительность к контексту, которую следует измерять, а не игнорировать.\u003C\u002Fp>\n\u003Ch2 id=\"section-56\">Конфликтующий контекст требует явного приоритета\u003C\u002Fh2>\n\u003Cp>Модель может получить старую политику и новую политику, запомненное предпочтение и текущую явную инструкцию или кэшированный статус и актуальный результат API. Система не должна ожидать, что модель выведет приоритет из стиля текста.\u003C\u002Fp>\n\u003Cp>Контекстная инженерия должна кодировать приоритет через выбор источника, метаданные, порядок или явные инструкции: актуальное авторитетное состояние переопределяет устаревшие копии; явная текущая инструкция пользователя переопределяет более раннее выведенное предпочтение; утверждённая политика имеет приоритет над устаревшими черновиками.\u003C\u002Fp>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Конфликт\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Предпочтительное правило контекста\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Текущее состояние против запомненного состояния\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Обновить и предпочесть авторитетный текущий источник.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Текущая политика против заменённой политики\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Включить текущую версию; сохранять старую версию только когда требуется историческое сравнение.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Явная инструкция пользователя против старого выведенного предпочтения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Предпочесть текущую явную инструкцию.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Первичный источник против вторичного резюме\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Использовать первичный источник для утверждений, требующих авторитетности; резюме может поддерживать объяснение.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Наблюдение инструмента против априорного знания модели\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Предпочесть текущее наблюдаемое состояние, когда инструмент авторитетен для этого факта.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Два неразрешённых авторитетных источника\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Раскрыть конфликт, а не фабриковать один согласованный ответ.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-60\">Компактизация — это преобразование контекста, а не хранение без потерь\u003C\u002Fh2>\n\u003Cp>Долго работающие системы в конечном итоге нуждаются в обрезке, суммировании или компактизации истории. Компактизация создаёт новое представление предыдущего контекста, чтобы агент мог продолжить, не воспроизводя каждый токен.\u003C\u002Fp>\n\u003Cp>Примеры управления контекстом OpenAI используют обрезку и сжатие для длительных сессий. Anthropic описывает компактизацию как основной приём для поддержания связности, когда взаимодействие приближается к лимиту контекста.\u003C\u002Fp>\n\u003Cp>Сложная часть — решить, что нельзя безопасно удалить: нерешённые задачи, идентификаторы, ограничения пользователя, границы безопасности, архитектурные решения, исключения, происхождение источника и условия, которые делают предыдущий вывод действительным.\u003C\u002Fp>\n\u003Caside class=\"editorjs-callout editorjs-callout--warning my-6 rounded-xl border p-5 border-amber-300 bg-amber-50 dark:border-amber-900 dark:bg-amber-950\u002F20\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Резюме может сохранить вывод и уничтожить причину\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Если компактизация сохраняет «использовать подход X», но отбрасывает, почему был выбран X, какая версия была протестирована или какое условие сделало бы его недействительным, последующие ответы могут оставаться внутренне согласованными, становясь при этом внешне ошибочными.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Ch2 id=\"section-65\">Сохраняйте границы действительности\u003C\u002Fh2>\n\u003Cp>Важные выводы должны нести условия, при которых они остаются обоснованными: версия, дата, область применения, допущения, авторитетность источника и неразрешённые разногласия.\u003C\u002Fp>\n\u003Cp>Таким образом, контекстная инженерия связана с границей действительности ответа. Сборщик контекста не должен удалять метаданные, определяющие, применимы ли ещё доказательства.\u003C\u002Fp>\n\u003Caside class=\"editorjs-referral my-6\">\u003Ca href=\"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Fthe-answer-validity-boundary-the-missing-layer-between-relevance-and-reliable-ai-answers\" class=\"flex flex-col sm:flex-row gap-4 rounded-xl border border-gray-200 dark:border-gray-700 p-4 transition hover:border-primary-500\">\u003Cdiv class=\"min-w-0 flex-1\">\u003Cstrong class=\"block text-lg text-gray-900 dark:text-gray-100\">Граница действительности ответа: недостающий слой между релевантностью и надёжными ответами ИИ\u003C\u002Fstrong>\u003Cp class=\"mt-2 text-sm text-gray-600 dark:text-gray-300\">Фреймворк для сохранения области применения, допущений, версий и условий доказательств, при которых утверждение ИИ остаётся обоснованным.\u003C\u002Fp>\u003Cspan class=\"mt-3 inline-flex text-sm font-medium text-primary-600 dark:text-primary-400\">Читать о границе действительности ответа →\u003C\u002Fspan>\u003C\u002Fdiv>\u003C\u002Fa>\u003C\u002Faside>\n\u003Ch2 id=\"section-69\">Контекстная инженерия — это также граница безопасности\u003C\u002Fh2>\n\u003Cp>Данные, достигающие модели, пересекли важную системную границу. Поэтому сборка контекста должна соблюдать правила авторизации, изоляции арендаторов, конфиденциальности и минимизации данных.\u003C\u002Fp>\n\u003Cp>Поисковик может технически найти фрагмент, к которому текущий пользователь не имеет доступа. Правильный подход — не допустить попадания этого фрагмента в контекст модели, а не полагаться на то, что модель его проигнорирует.\u003C\u002Fp>\n\u003Cp>Выводы инструментов также могут содержать недоверенные инструкции или враждебный контент. Контекстная инженерия должна сохранять различие между инструкциями приложения и внешними данными, чтобы извлечённый текст не мог незаметно получить авторитет инструкции.\u003C\u002Fp>\n\u003Ch2 id=\"section-73\">Практическая архитектура контекстной инженерии\u003C\u002Fh2>\n\u003Caside class=\"editorjs-callout editorjs-callout--note my-6 rounded-xl border p-5 border-gray-300 bg-gray-50 dark:border-gray-700 dark:bg-gray-900\u002F40\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Предлагаемая модель архитектуры\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Следующие слои представляют собой практический синтез для production-систем, а не формальный отраслевой стандарт. Цель — отделить владение информацией от временного контекста, видимого модели.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Слой\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Ответственность\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Авторитетные системы\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Владеют текущим бизнес-\u002Fсистемным состоянием и официальными записями.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Источники знаний\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Владеют документами, политиками, спецификациями, исследованиями или внешними доказательствами.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Хранилище памяти\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сохраняет выбранную информацию между ходами или сессиями.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Слой извлечения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Находит релевантные задаче кандидаты из внешних источников.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Слой инструментов\u002Fсреды выполнения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Читает состояние, выполняет действия и возвращает наблюдения.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сборщик контекста\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Выбирает, фильтрует, дедуплицирует, упорядочивает и форматирует информацию, видимую модели.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Модель\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Рассуждает и генерирует на основе собранного контекста.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Валидация\u002Fоценка\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Проверяет, соответствуют ли выбранный контекст и полученный результат требованиям конкретной задачи.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Сборщик контекста концептуально важен, даже если ни один модуль не носит такого точного названия. В небольшом приложении это может быть обычный код приложения. В крупной агентной платформе он может объединять управление сессиями, извлечение, память, middleware инструментов, компактификацию и применение политик.\u003C\u002Fp>\n\u003Ch2 id=\"section-77\">Практическая политика построения контекста\u003C\u002Fh2>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Правило\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Почему это важно\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Начинайте с текущей задачи\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Не переносите информацию только потому, что она существовала ранее.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Перечитывайте изменчивое состояние\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Память и старый контекст могут быть устаревшими.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Извлекайте ровно столько доказательств, сколько нужно\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Большие наборы кандидатов могут размывать решающую информацию.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сохраняйте метаданные источника\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Версия, дата и авторитетность определяют, применимо ли ещё доказательство.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Удаляйте дублирующееся содержимое\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Избыточность расходует токены, не добавляя информации.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Предпочитайте структурированные сводки для больших выводов инструментов\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Показывайте решающие поля вместо сырого шума, где это позволяет точность.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Храните правила вместе с исключениями\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Отделение правила от его исключения создаёт ложную определённость.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Делайте приоритет явным\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Не просите модель выводить, какой из конфликтующих источников побеждает.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Храните долговременное состояние вне контекста\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Контекст — это временная рабочая память, а не база данных.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сжимайте с проверками сохранения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Убедитесь, что идентификаторы, ограничения, происхождение и нерешённое состояние сохраняются.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Измеряйте чувствительность к порядку\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Корректность не должна случайно зависеть от произвольного порядка документов.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Оценивайте контекст отдельно от качества модели\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Более сильная модель не может надёжно компенсировать отсутствующие или неавторизованные доказательства.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-79\">Как оценивать контекстную инженерию\u003C\u002Fh2>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Свойство\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Вопрос\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Пример теста\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Достаточность\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Содержит ли контекст всё необходимое для решения задачи?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Удалите один элемент доказательств и посмотрите, станет ли ответ необоснованным.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Релевантность\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сколько контекста не нужно для задачи?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Измеряйте качество при добавлении или удалении нерелевантных фрагментов.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Авторитетность\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Основаны ли решающие утверждения на правильном классе источников?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Внедрите более гладкий, но неавторитетный конфликтующий источник.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Свежесть\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Переопределяет ли текущее состояние устаревшие копии?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Измените авторитетное состояние после предыдущего хода и запустите снова.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Устойчивость к позиции\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сильно ли качество ответа зависит от позиции доказательства?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Рандомизируйте порядок кандидатов в повторных испытаниях.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Обработка конфликтов\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Следует ли модель явным правилам приоритета?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Предъявите старое и новое состояние вместе.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сохранение при сжатии\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сохраняет ли суммаризация ограничения и границы валидности?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сравните производительность задачи до и после сжатия.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Эффективность токенов\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Улучшает ли дополнительный контекст качество достаточно, чтобы оправдать задержку\u002Fстоимость?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Проведите контролируемые абляции размера контекста.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Безопасность\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Может ли неавторизованное или враждебное содержимое попасть в контекст модели?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Проверьте границы тенанта, разрешений и prompt-injection.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-81\">Сборка контекста — отдельный слой сбоев RAG\u003C\u002Fh2>\n\u003Cp>Пайплайн RAG может успешно выполнить извлечение и всё равно потерпеть неудачу на последующих этапах. Релевантный источник может оказаться на 2-м месте, но сборщик контекста может его отбросить, обрезать, объединить с устаревшим противоречивым материалом или превысить бюджет токенов.\u003C\u002Fp>\n\u003Cp>Именно поэтому трассировки извлечения следует сравнивать с фактическим контекстом, отправленным модели. Без такого сравнения сбои контекста легко ошибочно диагностировать как сбои эмбеддингов или модели.\u003C\u002Fp>\n\u003Caside class=\"editorjs-referral my-6\">\u003Ca href=\"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Frag-failed-but-which-layer-actually-failed-a-diagnostic-method\" class=\"flex flex-col sm:flex-row gap-4 rounded-xl border border-gray-200 dark:border-gray-700 p-4 transition hover:border-primary-500\">\u003Cdiv class=\"min-w-0 flex-1\">\u003Cstrong class=\"block text-lg text-gray-900 dark:text-gray-100\">RAG не сработал — но какой слой на самом деле дал сбой? Метод диагностики\u003C\u002Fstrong>\u003Cp class=\"mt-2 text-sm text-gray-600 dark:text-gray-300\">Послойный подход к разделению сбоев покрытия источников, извлечения, ранжирования, сборки контекста, генерации, атрибуции доказательств и свежести.\u003C\u002Fp>\u003Cspan class=\"mt-3 inline-flex text-sm font-medium text-primary-600 dark:text-primary-400\">Читать метод диагностики RAG →\u003C\u002Fspan>\u003C\u002Fdiv>\u003C\u002Fa>\u003C\u002Faside>\n\u003Ch2 id=\"section-85\">Доказательства оригинальной реализации\u003C\u002Fh2>\n\u003Ch3 id=\"section-86\">Source of Truth Research Engine: ограниченное исследование вместо неограниченного контекста\u003C\u002Fh3>\n\u003Cp>Source of Truth Research Engine разделяет обнаружение, получение, извлечение, верификацию, анализ противоречий и синтез на ограниченные исследовательские этапы вместо отправки одной огромной исследовательской задачи и всего накопленного материала в один вызов модели.\u003C\u002Fp>\n\u003Cp>Его модель доказательств хранит Sources, Artifacts, Claims, Relations, Contradictions и происхождение вне контекста модели. Модель может получать подмножество, необходимое для текущего исследовательского шага, пока долговременные доказательства остаются во внешнем хранилище.\u003C\u002Fp>\n\u003Cp>Это конкретный паттерн контекстной инженерии: долговременное исследовательское состояние живёт вне окна модели; активный контекст модели реконструируется для текущего этапа.\u003C\u002Fp>\n\u003Ch3 id=\"section-90\">Aaasaasa AI Client: среда выполнения, разрешения и контекст — это отдельные concerns\u003C\u002Fh3>\n\u003Cp>Aaasaasa AI Client разделяет выбор провайдера\u002Fмодели, местоположение среды выполнения, разрешения рабочего пространства, локальные ресурсы и доступ к инструментам. Это предотвращает ситуацию, когда контекст модели становится владельцем авторизации или состояния приложения.\u003C\u002Fp>\n\u003Cp>Прямой чат и агентные среды выполнения могут иметь разные возможности инструментов. Профили разрешений рабочего пространства обеспечиваются средой выполнения, а не просто описываются в контексте на естественном языке. Это различие важно: контекст может сообщить модели, что она должна делать, но среда выполнения всё равно должна обеспечивать то, что ей фактически разрешено делать.\u003C\u002Fp>\n\u003Cp>Доказательством реализации здесь является архитектурное разделение, а не утверждение, что каждая продвинутая техника управления контекстом, описанная в этой статье, уже реализована.\u003C\u002Fp>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Паттерн реализации\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Урок контекстной инженерии\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Внешнее хранилище доказательств\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Долговременные знания не обязаны оставаться в окне модели.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Ограниченные этапы исследования\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Разные шаги могут получать разный контекст вместо накопления одной гигантской истории.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Утверждения + происхождение вне контекста\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Идентичность доказательства сохраняется за пределами временного состояния вывода.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Разрешения, обеспечиваемые средой выполнения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Полномочия безопасности не зависят от того, помнит ли модель инструкцию.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Раздельные концепции локального\u002Fпровайдера\u002Fмодели\u002Fсреды выполнения\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Контекст — лишь один слой более широкой архитектуры AI-приложения.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Caside class=\"editorjs-callout editorjs-callout--note my-6 rounded-xl border p-5 border-gray-300 bg-gray-50 dark:border-gray-700 dark:bg-gray-900\u002F40\" role=\"note\">\u003Cstrong class=\"block mb-2 text-gray-900 dark:text-gray-100\">Граница доказательств\u003C\u002Fstrong>\u003Cdiv class=\"text-gray-700 dark:text-gray-200\">Эти реализации поддерживают архитектурное разделение между долговременным состоянием, извлечением, элементами управления среды выполнения и контекстом, обращённым к модели. Они не представлены как эталонное доказательство того, что одна стратегия контекста универсально оптимальна.\u003C\u002Fdiv>\u003C\u002Faside>\n\u003Ch2 id=\"section-96\">Распространённые режимы отказа контекстной инженерии\u003C\u002Fh2>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Режим отказа\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Что идёт не так\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Воспроизводить весь разговор бесконечно\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Старые допущения, повторения и рост токенов подавляют текущее намерение.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Помещать каждый извлечённый результат в промпт\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Шум, дублирование и конфликтующие версии размывают решающие доказательства.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Использовать память как текущее состояние\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Устаревшая информация незаметно заменяет авторитетное актуальное состояние.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Возвращать необработанный вывод инструмента\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Большие журналы или ответы потребляют внимание, не добавляя ценности для решения.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Скрывать описания инструментов за расплывчатыми названиями\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Модель не может надёжно решить, какую возможность использовать.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сжимать без тестов на сохранение\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Критические ограничения, идентификаторы или исключения исчезают.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Смешивать инструкции и недоверенные данные\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Внешнее содержимое может быть истолковано как инструкция с более высоким авторитетом.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Использовать один статический шаблон контекста для каждой задачи\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Разные задачи получают нерелевантную информацию и упускают специфичные для задачи доказательства.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Игнорировать версию\u002Fдату источника\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Устаревшие, но релевантные доказательства могут доминировать над текущим авторитетным состоянием.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Считать большее окно контекста гарантией качества\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Ёмкость увеличивается, но проблемы внимания и конфликтов остаются.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-98\">Распространённые заблуждения\u003C\u002Fh2>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Заблуждение\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Исправление\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Контекстная инженерия — это просто промпт-инженерия под новым названием».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Промпты — лишь один компонент; контекстная инженерия также охватывает извлечение, память, состояние, результаты инструментов, историю и сжатие.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Контекст означает историю чата».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">История — лишь один из возможных источников контекста.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Больше контекста всегда лучше».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Дополнительная информация может снизить сигнал, внести конфликты и увеличить стоимость.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Если извлечение нашло это, модель это увидела».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Извлечённые кандидаты могут быть отфильтрованы, усечены или опущены перед выводом.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Длинный контекст устраняет необходимость в RAG».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Большие окна увеличивают ёмкость, но не решают проблемы свежести, авторитета, разрешений или динамического извлечения.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Память всегда должна загружаться».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Память следует выбирать в соответствии с текущей задачей.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Резюме сохраняет всё важное».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Сжатие является потерями, если явно не оценено на сохранение.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Инструкции могут обеспечивать разрешения».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Авторизация должна обеспечиваться элементами управления среды выполнения\u002Fприложения, а не только контекстом.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Один рецепт контекста работает для каждой модели».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Чувствительность к контексту варьируется в зависимости от модели, задачи, корпуса и среды выполнения.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">«Контекстная инженерия только для агентов».\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Агенты усиливают потребность, но обычные RAG и разговорные приложения также требуют построения контекста.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-100\">Практическая последовательность контекстной инженерии\u003C\u002Fh2>\n\u003Csection class=\"editorjs-process my-6\">\u003Ch3 class=\"mb-3 text-lg font-semibold\">Строить контекст от текущего решения назад\u003C\u002Fh3>\u003Cdiv class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4\">\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">1\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">1. Определите следующее решение модели\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Укажите, на что модель должна ответить, классифицировать, спланировать или выбрать на этом шаге.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">2\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">2. Определите необходимые факты и ограничения\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Перечислите минимальное состояние, правила, доказательства и инструкции, которые могут существенно изменить результат.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">3\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">3. Определите авторитет и разрешения\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Определите, какие источники являются текущими, авторитетными и доступными текущему субъекту.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">4\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">4. Извлекайте или читайте по требованию\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Получайте необходимые доказательства и изменчивое состояние, а не полагайтесь на устаревший контекст.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">5\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">5. Уменьшите шум\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Удаляйте дубликаты, суммируйте или выбирайте фрагменты, не отбрасывая решающие исключения или происхождение.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">6\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">6. Структурируйте и упорядочивайте\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Сделайте инструкции, текущее состояние, доказательства и наблюдения инструментов различимыми.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">7\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">7. Уложитесь в бюджет токенов\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Предпочитайте контекст с высоким сигналом и выносите долговременную информацию за пределы окна.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">8\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">8. Запустите модель\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Выполните вывод на основе собранного контекста.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">9\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">9. Наблюдайте за сбоями\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Зафиксируйте, возникла ли проблема из-за отсутствующего, устаревшего, шумного, конфликтующего или плохо упорядоченного контекста.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"editorjs-process__step min-w-0  rounded-xl border border-gray-200 dark:border-gray-700 p-4\">\u003Cdiv class=\"text-xs font-semibold text-gray-500 dark:text-gray-400\">10\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 font-semibold text-gray-900 dark:text-gray-100\">10. Переоцените после изменений модели\u002Fсреды выполнения\u003C\u002Fdiv>\u003Cdiv class=\"mt-1 text-sm text-gray-600 dark:text-gray-300\">Стратегия контекста действительна только для моделей, инструментов и рабочих нагрузок, на которых она была протестирована.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fsection>\n\u003Ch2 id=\"section-102\">Контрольный список контекстной инженерии\u003C\u002Fh2>\n\u003Cdiv class=\"overflow-x-auto\">\u003Ctable class=\"w-full border-collapse\">\u003Cthead>\u003Ctr>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Вопрос\u003C\u002Fth>\u003Cth class=\"border border-gray-300 px-4 py-2 text-left font-semibold\">Ожидаемый ответ\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какое именно решение модель примет следующим?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Ограниченная задача, а не расплывчатая долгосрочная цель.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какая информация может существенно изменить это решение?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Явный минимальный набор доказательств\u002Fсостояния.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какие данные сейчас авторитетны?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Текущий источник\u002Fверсия и правило свежести.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какие данные являются необязательным фоном?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Отделены от решающих доказательств.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Что не должно попадать в контекст?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Неавторизованные, ненужные или чрезмерно чувствительные данные.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какие элементы памяти релевантны?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Выбраны по задаче, а не воспроизводятся автоматически.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какие выводы инструментов следует сократить?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Большие ответы преобразуются в форму, релевантную для решения.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Какие ограничения должны пережить сжатие?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Идентификаторы, исключения, обязательства, нерешённое состояние и происхождение.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Как представлен приоритет?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Текущая\u002Fавторитетная информация может надёжно переопределять устаревшие или более слабые источники.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Как вы узнаете, что контекст не сработал?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Существуют оценки и трассировки, специфичные для контекста.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Можно ли воспроизвести ответ?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Вход модели или реконструируемая трассировка контекста доступны там, где это уместно.\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Может ли более сильная или большая модель изменить стратегию?\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Политика контекста учитывает версии и переоценивается эмпирически.\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"section-104\">Краевые случаи и ограничения\u003C\u002Fh2>\n\u003Cp>Некоторые задачи достаточно просты, чтобы контекстная инженерия сводилась к короткому системному промпту и одному сообщению пользователя. Добавление извлечения, памяти и сжатия лишь внесло бы ненужную архитектуру.\u003C\u002Fp>\n\u003Cp>Некоторые задачи требуют высокого охвата и могут намеренно включать больше контекста перед последующим синтезом. Исследование, обнаружение и юридическая экспертиза могут предпочитать избегание пропусков минимальному количеству токенов.\u003C\u002Fp>\n\u003Cp>Некоторую информацию никогда не следует суммировать перед использованием. Точные контракты, код, криптографический материал, числовые записи и нормативный текст могут требовать дословного или структурированного извлечения, где сжатие могло бы изменить смысл.\u003C\u002Fp>\n\u003Cp>Поведение при длинном контексте существенно различается между моделями. Стратегию, проверенную на одной модели, длине контекста или наборе инструментов, не следует автоматически переносить на другую.\u003C\u002Fp>\n\u003Cp>Модель всё ещё может игнорировать или неверно интерпретировать превосходный контекст. Контекстная инженерия улучшает информационную среду; она не гарантирует корректность рассуждений.\u003C\u002Fp>\n\u003Ch2 id=\"section-110\">Что могло бы изменить этот ответ?\u003C\u002Fh2>\n\u003Cp>Будущие модели могут стать более устойчивыми к длинному контексту, позиционным эффектам и противоречивой информации. Это могло бы уменьшить объём ручной курации, необходимой сейчас.\u003C\u002Fp>\n\u003Cp>Архитектурное различие всё равно останется полезным, потому что разрешения, актуальность, персистентность памяти, авторитетность источника и состояние внешнего приложения существуют вне модели независимо от размера контекстного окна.\u003C\u002Fp>\n\u003Cp>Рекомендуемый баланс между предзагруженным и контекстом, загружаемым по требованию, также меняется в зависимости от требований к задержке, надёжности инструментов, размера корпуса, стоимости модели и того, насколько динамична лежащая в основе информация.\u003C\u002Fp>\n\u003Ch2 id=\"section-114\">Связанные канонические знания\u003C\u002Fh2>\n\u003Cp>Контекстная инженерия находится между поиском и генерацией. RAG объясняет, как извлекаются внешние знания; R01 разделяет эмбеддинги, векторный поиск и реранжирование; контекстная инженерия объясняет, что в конечном итоге доходит до модели.\u003C\u002Fp>\n\u003Caside class=\"editorjs-referral my-6\">\u003Ca href=\"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Fwhat-is-rag-the-simplest-explanation-of-how-it-works\" class=\"flex flex-col sm:flex-row gap-4 rounded-xl border border-gray-200 dark:border-gray-700 p-4 transition hover:border-primary-500\">\u003Cdiv class=\"min-w-0 flex-1\">\u003Cstrong class=\"block text-lg text-gray-900 dark:text-gray-100\">Что такое RAG? Самое простое объяснение того, как это работает\u003C\u002Fstrong>\u003Cp class=\"mt-2 text-sm text-gray-600 dark:text-gray-300\">Основы поиска для понимания того, как внешние знания могут быть предоставлены модели перед генерацией.\u003C\u002Fp>\u003Cspan class=\"mt-3 inline-flex text-sm font-medium text-primary-600 dark:text-primary-400\">Читать основы RAG →\u003C\u002Fspan>\u003C\u002Fdiv>\u003C\u002Fa>\u003C\u002Faside>\n\u003Cp>Архитектура источника истины отвечает на другой вопрос: не какая информация присутствует в контексте, а какой источник уполномочен подтверждать утверждение.\u003C\u002Fp>\n\u003Cp>Существующая статья «Почему больше контекста может ухудшить ответы ИИ» является диагностическим дополнением к этому каноническому определению. Она сосредоточена на загрязнении контекста, позиционных эффектах, росте top-k, потерях при компактификации и деградации ответов, а не на переопределении самой контекстной инженерии.\u003C\u002Fp>\n\u003Ch2 id=\"section-119\">Часто задаваемые вопросы\u003C\u002Fh2>\n\u003Csection class=\"editorjs-faq my-6 rounded-xl border border-gray-200 p-5 dark:border-gray-700\">\u003Ch3 class=\"mb-3 text-lg font-semibold\">Часто задаваемые вопросы о контекстной инженерии\u003C\u002Fh3>\u003Cdiv id=\"faq1\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Что такое контекстная инженерия?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Контекстная инженерия — это проектирование и управление во время выполнения тем, какую информацию языковая модель получает во время инференса, включая инструкции, историю, извлечённые доказательства, память, состояние, инструменты и результаты работы инструментов.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq2\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Чем контекстная инженерия отличается от промпт-инженерии?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Промпт-инженерия сосредоточена на том, как написаны инструкции и примеры. Контекстная инженерия включает промпты, но также определяет, какая внешняя информация, состояние, история, память и наблюдения инструментов размещаются вокруг них.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq3\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">RAG — это то же самое, что контекстная инженерия?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Нет. RAG извлекает внешнюю информацию. Контекстная инженерия решает, как извлечённая информация фильтруется, объединяется с другим состоянием и фактически доставляется модели.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq4\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Память — это то же самое, что контекст?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Нет. Память сохраняет информацию вне текущего вызова модели. Контекст — это подмножество информации, загруженное в текущий инференс.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq5\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Почему больше контекста может ухудшить ответ?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Дополнительный контекст может вносить шум, устаревшее состояние, противоречивые доказательства, дублирование и позиционную конкуренцию. Большая ёмкость контекста не гарантирует столь же надёжного использования каждого токена.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq6\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Что такое компактификация контекста?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Компактификация суммирует или преобразует накопленную историю в меньшее представление, чтобы долго работающая система могла продолжать без воспроизведения каждого предыдущего токена.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq7\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Следует ли хранить текущее состояние приложения в контексте?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Оно может быть представлено в контексте для рассуждений, но значимые операции часто должны повторно считывать авторитетный источник, поскольку снимки контекста могут устаревать.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv id=\"faq8\" class=\"border-t border-gray-200 py-4 first:border-t-0 dark:border-gray-700\">\u003Ch4 class=\"font-semibold text-gray-900 dark:text-gray-100\">Нужна ли контекстная инженерия только для ИИ-агентов?\u003C\u002Fh4>\u003Cdiv class=\"mt-2 text-gray-600 dark:text-gray-300\">Нет. Агенты делают управление контекстом более динамичным, но RAG-системы, ассистенты, копилоты и многоходовые приложения также нуждаются в осознанном построении контекста.\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fsection>\n\u003Ch2 id=\"section-121\">Глоссарий\u003C\u002Fh2>\n\u003Csection class=\"editorjs-glossary my-6 rounded-xl border border-gray-200 dark:border-gray-700 p-5\">\u003Ch3 class=\"mb-3 text-lg font-semibold\">Ключевые термины контекстной инженерии\u003C\u002Fh3>\u003Cdl>\u003Cdiv id=\"context-engineering\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Контекстная инженерия\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Проектирование и управление во время выполнения информацией, предоставляемой языковой модели для конкретного шага инференса.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"context-window\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Контекстное окно\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Конечная ёмкость модели в токенах для входных данных и, в зависимости от интерфейса модели, связанных сгенерированных токенов или активной последовательности.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"prompt-engineering\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Промпт-инженерия\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Проектирование инструкций, примеров и структуры промпта, направленное на получение полезного поведения модели.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"context-assembly\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Сборка контекста\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Процесс отбора, фильтрации, упорядочивания и форматирования видимой модели информации перед инференсом.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"just-in-time-retrieval\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Извлечение по требованию\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Динамическая загрузка информации, когда она требуется текущей задачей, вместо предварительной загрузки всех потенциально релевантных данных.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"compaction\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Компактификация\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Сокращение накопленного контекста до меньшего представления с попыткой сохранить информацию, необходимую для будущих шагов.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"context-pollution\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Загрязнение контекста\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Ухудшение, вызванное нерелевантной, устаревшей, противоречивой или избыточной информацией, занимающей рабочий контекст модели.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"application-state\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Состояние приложения\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Текущее авторитетное состояние внешней системы, рабочего процесса или предметной области, существующее независимо от контекста модели.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"memory\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Память\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Информация, хранящаяся вне непосредственного вызова модели для возможного использования в последующих ходах или сессиях.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"retrieved-context\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Извлечённый контекст\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Внешняя информация, отобранная системой поиска и предоставленная модели полностью или частично.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"position-robustness\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Позиционная устойчивость\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Степень, в которой корректность модели остаётся стабильной при изменении местоположения или порядка релевантного контекста.\u003C\u002Fdd>\u003C\u002Fdiv>\u003Cdiv id=\"validity-boundary\" class=\"border-t border-gray-200 dark:border-gray-700 py-3 first:border-t-0\">\u003Cdt class=\"font-semibold text-gray-900 dark:text-gray-100\">Граница валидности\u003C\u002Fdt>\u003Cdd class=\"mt-1 text-gray-600 dark:text-gray-300\">Область, время, допущения, версии и условия доказательности, в пределах которых вывод остаётся обоснованным.\u003C\u002Fdd>\u003C\u002Fdiv>\u003C\u002Fdl>\u003C\u002Fsection>\n\u003Ch2 id=\"section-123\">Заключение\u003C\u002Fh2>\n\u003Cp>Контекстная инженерия — это слой, который решает, что модель увидит перед тем, как ответить. Это делает её шире промптинга и ниже по потоку от поиска, при этом она остаётся отличной от долговременной памяти и авторитетного состояния приложения.\u003C\u002Fp>\n\u003Cp>Сильная контекстная архитектура не рассматривает контекстное окно как базу данных. Она хранит долговременное состояние и знания вне модели, загружает то, что требуется для текущего решения, сохраняет авторитетность и происхождение, удаляет ненужный шум и обновляет изменчивую информацию при необходимости.\u003C\u002Fp>\n\u003Cp>Практическая цель, следовательно, не максимальный контекст. Это минимально достаточный, высокосигнальный, корректно авторизованный и сохраняющий валидность контекст для следующего решения модели.\u003C\u002Fp>\n\u003Ch2 id=\"section-127\">Первоисточники и актуальные рекомендации\u003C\u002Fh2>\n\u003Cp>Приведённые ниже источники подтверждают актуальную терминологию контекстной инженерии, поведение длинного контекста и операционные паттерны управления контекстом. Разделы проекта являются явным свидетельством реализации, а не универсальными утверждениями.\u003C\u002Fp>\n\u003Ca href=\"https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Feffective-context-engineering-for-ai-agents\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"editorjs-link-tool block border border-gray-200 dark:border-gray-700 rounded-lg p-4 transition text-gray-900 dark:text-gray-100 hover:border-primary-500 hover:bg-primary-50 dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-gray-100\">\u003Cstrong class=\"block font-semibold\">Anthropic — Эффективная контекстная инженерия для ИИ-агентов\u003C\u002Fstrong>\u003Cp class=\"text-sm text-gray-600 dark:text-gray-400\">Официальное инженерное руководство, определяющее контекстную инженерию, извлечение по запросу, компактификацию, структурированную память и курирование контекста для агентов.\u003C\u002Fp>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fdevelopers.openai.com\u002Fcookbook\u002Fexamples\u002Fagents_sdk\u002Fsession_memory\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"editorjs-link-tool block border border-gray-200 dark:border-gray-700 rounded-lg p-4 transition text-gray-900 dark:text-gray-100 hover:border-primary-500 hover:bg-primary-50 dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-gray-100\">\u003Cstrong class=\"block font-semibold\">OpenAI — Контекстная инженерия: управление краткосрочной памятью с помощью сессий\u003C\u002Fstrong>\u003Cp class=\"text-sm text-gray-600 dark:text-gray-400\">Официальное руководство по управлению контекстом, обрезке и сжатию для длительных сессий агентов.\u003C\u002Fp>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Fagents\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"editorjs-link-tool block border border-gray-200 dark:border-gray-700 rounded-lg p-4 transition text-gray-900 dark:text-gray-100 hover:border-primary-500 hover:bg-primary-50 dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-gray-100\">\u003Cstrong class=\"block font-semibold\">OpenAI — Руководство по агентам\u003C\u002Fstrong>\u003Cp class=\"text-sm text-gray-600 dark:text-gray-400\">Актуальные рекомендации OpenAI для разработчиков по средам выполнения агентов, контексту между шагами и ответственности за оркестрацию.\u003C\u002Fp>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.03172\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"editorjs-link-tool block border border-gray-200 dark:border-gray-700 rounded-lg p-4 transition text-gray-900 dark:text-gray-100 hover:border-primary-500 hover:bg-primary-50 dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-gray-100\">\u003Cstrong class=\"block font-semibold\">Потерянные в середине: как языковые модели используют длинные контексты\u003C\u002Fstrong>\u003Cp class=\"text-sm text-gray-600 dark:text-gray-400\">Исследование, показывающее, что производительность модели с длинным контекстом может сильно зависеть от позиции релевантной информации во входных данных.\u003C\u002Fp>\u003C\u002Fa>",{"time":212,"blocks":213,"version":1407},1791480988621,[214,220,228,235,242,250,255,260,265,270,275,280,285,290,319,324,329,334,339,393,398,433,438,443,448,453,458,465,470,475,480,485,494,499,504,509,515,520,525,530,535,540,569,574,579,584,589,594,599,604,609,614,619,624,629,634,639,644,649,675,680,685,690,695,701,706,711,716,724,729,734,739,744,749,755,787,792,797,841,846,891,896,901,906,914,919,924,929,934,939,944,949,954,959,982,988,993,1031,1036,1074,1079,1115,1120,1163,1168,1173,1178,1183,1188,1193,1198,1203,1208,1213,1218,1223,1231,1236,1241,1246,1284,1289,1340,1345,1350,1355,1360,1365,1370,1380,1389,1398],{"id":215,"data":216,"type":218,"tunes":219},"intro",{"text":217},"Контекстная инженерия — это проектирование того, какую информацию языковая модель получает во время вывода, в какой форме, в каком порядке и на какой срок. Она шире, чем промпт-инженерия, потому что контекст модели может включать системные инструкции, сообщения пользователя, извлечённые документы, результаты работы инструментов, память, текущее состояние приложения, примеры, структурированные данные и промежуточные артефакты. Цель не в том, чтобы максимизировать количество токенов, а в том, чтобы построить минимальный полезный контекст, сохраняющий информацию, ограничения и доказательства, необходимые для текущей задачи.","paragraph",{},{"id":221,"data":222,"type":226,"tunes":227},"direct",{"body":223,"title":224,"variant":225},"Промпт-инженерия спрашивает: \u003Cstrong>как нам инструктировать модель?\u003C\u002Fstrong> Контекстная инженерия спрашивает: \u003Cstrong>что модель должна знать прямо сейчас и как эту информацию следует собрать?\u003C\u002Fstrong>\u003Cbr>\u003Cbr>Поиск, память, управление состоянием, проектирование инструментов, обрезка истории, сжатие и упорядочивание — всё это механизмы контекстной инженерии, когда они определяют токены, доступные модели до того, как она выдаст следующий результат.","Прямой ответ","info","callout",{},{"id":229,"data":230,"type":226,"tunes":234},"boundary",{"body":231,"title":232,"variant":233},"Система может что-то знать, не помещая это в текущий контекст. Она может помнить что-то за пределами окна модели. Она может извлечь документ, но позже исключить его из итогового промпта. Модель может напрямую использовать только тот контекст, который доходит до текущего вывода.","Контекст — это не то же самое, что знание или память","warning",{},{"id":236,"data":237,"type":226,"tunes":241},"current",{"body":238,"title":239,"variant":240},"Контекстная инженерия сейчас является устоявшимся практическим термином в ведущих руководствах по ИИ-инженерии, но это не единый формальный стандарт с одной обязательной архитектурой. Anthropic описывает её как курирование и поддержание оптимального набора токенов для вывода; текущее руководство OpenAI по агентам рассматривает контекст сессии, обрезку и сжатие как явные инженерные задачи для долго работающих систем.","Примечание об актуальности — 8 октября 2026 г.","note",{},{"id":243,"data":244,"type":248,"tunes":249},"toc",{"title":245,"maxLevel":246,"minLevel":247},"Содержание",3,2,"tableOfContents",{},{"id":251,"data":252,"type":42,"tunes":254},"h-meaning",{"text":253,"level":247},"Что на самом деле означает контекстная инженерия",{},{"id":256,"data":257,"type":218,"tunes":259},"p-meaning-1",{"text":258},"Каждый вызов модели происходит во временной рабочей среде: текущие инструкции, сообщения, извлечённые доказательства, выводы инструментов и состояние, которые помещаются в активное контекстное окно. Контекстная инженерия — это дисциплина осознанного построения такой среды.",{},{"id":261,"data":262,"type":218,"tunes":264},"p-meaning-2",{"text":263},"Ключевое слово — осознанного. Наивная система просто конкатенирует всё, что у неё есть: полную историю, все извлечённые документы, каждый ответ инструмента и большие системные промпты. Система с контекстной инженерией решает, какая информация необходима для текущего решения, а какая должна оставаться за пределами окна до момента необходимости.",{},{"id":266,"data":267,"type":218,"tunes":269},"p-meaning-3",{"text":268},"Это делает контекстную инженерию отчасти задачей информационной архитектуры, отчасти задачей времени выполнения и отчасти задачей оценки. Проектирование должно решить, что может попасть в контекст, откуда это берётся, какая версия является актуальной, как разрешаются конфликты, сколько деталей сохраняется и как результат проверяется.",{},{"id":271,"data":272,"type":42,"tunes":274},"h-simple",{"text":273,"level":247},"Простейший пример",{},{"id":276,"data":277,"type":218,"tunes":279},"p-simple-1",{"text":278},"Представьте внутреннего ассистента поддержки. Пользователь спрашивает: «Может ли этот клиент отменить без комиссии?»",{},{"id":281,"data":282,"type":218,"tunes":284},"p-simple-2",{"text":283},"Модели могут понадобиться пять вещей: текущая политика отмены, текущий тип договора клиента, дата вступления договора в силу, соответствующие правила исключений и объём полномочий пользователя.",{},{"id":286,"data":287,"type":218,"tunes":289},"p-simple-3",{"text":288},"Ей не обязательно нужна вся база клиентов, полный архив политик, каждый предыдущий разговор или каждый тикет поддержки. Контекстная инженерия — это процесс отбора и сборки пяти полезных фрагментов с исключением нерелевантной информации.",{},{"id":291,"data":292,"type":317,"tunes":318},"simple-flow",{"steps":293,"title":315,"orientation":316},[294,297,300,303,306,309,312],{"label":295,"description":296},"1. Понять задачу","Классифицировать, что требует текущий вопрос и какие типы информации могут повлиять на ответ.",{"label":298,"description":299},"2. Определить авторитетное состояние","Прочитать текущее состояние приложения или бизнеса, которое не следует угадывать по памяти.",{"label":301,"description":302},"3. Извлечь вспомогательные знания","Найти политику, документы или внешние доказательства, относящиеся к конкретной задаче.",{"label":304,"description":305},"4. Применить критерии допустимости и разрешения","Исключить данные, которые текущий пользователь или среда выполнения не имеют права раскрывать модели.",{"label":307,"description":308},"5. Сократить и структурировать","Удалить дублирование, выбрать полезные фрагменты и сохранить критичные метаданные, условия и исключения.",{"label":310,"description":311},"6. Упорядочить контекст","Разместить инструкции, текущее состояние и решающие доказательства там, где модель сможет последовательно их использовать.",{"label":313,"description":314},"7. Выполнить вывод","Модель получает собранный контекст и выдаёт следующий ответ или предложение действия.","От состояния приложения к контексту модели","auto","processFlow",{},{"id":320,"data":321,"type":42,"tunes":323},"h-stops",{"text":322,"level":247},"Где заканчивается простой пример",{},{"id":325,"data":326,"type":218,"tunes":328},"p-stops-1",{"text":327},"Реальные системы сложнее, потому что информация, необходимая для одного шага, может быть неизвестна до начала выполнения. Агент может обнаруживать новые факты через инструменты, создавать промежуточные файлы, получать изменяющееся внешнее состояние или выполнять задачу дольше одного контекстного окна.",{},{"id":330,"data":331,"type":218,"tunes":333},"p-stops-2",{"text":332},"Поэтому контекстная инженерия становится динамической. Контекст для шага 12 не должен быть просто контекстом шага 1 плюс одиннадцать слоёв накопленного вывода. Он должен отражать текущее состояние задачи, решения, которые всё ещё важны, и доказательства, необходимые для следующего действия.",{},{"id":335,"data":336,"type":42,"tunes":338},"h-anatomy",{"text":337,"level":247},"Что может попасть в контекст модели?",{},{"id":340,"data":341,"type":391,"tunes":392},"anatomy-table",{"content":342,"stretched":43,"withHeadings":14},[343,347,351,355,359,363,367,371,375,379,383,387],[344,345,346],"Компонент контекста","Назначение","Типичный риск",[348,349,350],"Системные \u002F разработческие инструкции","Определяют роль, ограничения, политики и поведение","Слишком расплывчатые, противоречивые или перегруженные хрупкой логикой",[352,353,354],"Текущий запрос пользователя","Определяет непосредственную задачу и намерение","Неоднозначность или конфликт с предыдущей историей",[356,357,358],"История диалога","Сохраняет непрерывность между ходами","Устаревшие предположения, повторения и рост числа токенов",[360,361,362],"Извлечённые документы","Предоставляют внешние знания\u002Fдоказательства","Несоответствие, устаревшие версии, слабый авторитет или дублирование",[364,365,366],"Текущее состояние приложения","Предоставляет изменчивые бизнес\u002Fсистемные факты","Использование кэшированного или запомненного состояния вместо текущего авторитетного источника",[368,369,370],"Определения инструментов","Сообщают модели, какие возможности существуют и как их вызывать","Слишком много пересекающихся инструментов или многословные схемы",[372,373,374],"Результаты работы инструментов","Привносят наблюдения из среды в цикл","Большие зашумлённые выходные данные, недоверенный контент или устаревшие наблюдения",[376,377,378],"Память","Повторно вводит выбранную информацию из предыдущих взаимодействий","Устаревание, неверное обобщение или чрезмерная персонализация",[380,381,382],"Примеры","Демонстрируют желаемое поведение","Слишком много крайних случаев могут вытеснить текущую задачу",[384,385,386],"Промежуточные артефакты","Несут планы, резюме, код, вычисления или заметки","Старое промежуточное состояние может быть ошибочно принято за окончательную истину",[388,389,390],"Политики \u002F ограничения","Определяют запрещённое или ограниченное поведение","Конфликт с бизнес-логикой или скрытые пробелы в принудительном исполнении","table",{},{"id":394,"data":395,"type":42,"tunes":397},"h-prompt",{"text":396,"level":247},"Контекстная инженерия против промпт-инженерии",{},{"id":399,"data":400,"type":431,"tunes":432},"prompt-comparison",{"rows":401,"title":423,"layout":391,"columns":424},[402,407,411,415,419],{"id":403,"label":404,"values":405},"focus","Основной фокус",[406,406],"",{"id":408,"label":409,"values":410},"scope","Типичная область применения",[406,406],{"id":412,"label":413,"values":414},"timing","Когда меняется",[406,406],{"id":416,"label":417,"values":418},"failure","Типичная ошибка",[406,406],{"id":420,"label":421,"values":422},"relationship","Взаимосвязь",[406,406],"Промпт-инженерия и контекстная инженерия решают разные уровни задач",[425,428],{"id":426,"label":427},"prompt","Промпт-инженерия",{"id":429,"label":430},"context","Контекстная инженерия","comparison",{},{"id":434,"data":435,"type":218,"tunes":437},"p-prompt-1",{"text":436},"Anthropic прямо описывает контекстную инженерию как естественное развитие промпт-инженерии для систем, в которых модель должна работать с инструментами, внешними данными, историей сообщений и долгоживущим состоянием агента. Практическое различие полезно, потому что идеально написанный промпт не может компенсировать отсутствие авторитетных данных или контекст, загрязнённый противоречивым состоянием.",{},{"id":439,"data":440,"type":42,"tunes":442},"h-retrieval",{"text":441,"level":247},"Контекстная инженерия против поиска",{},{"id":444,"data":445,"type":218,"tunes":447},"p-ret-1",{"text":446},"Поиск выбирает информацию-кандидата из внешнего корпуса или источника. Контекстная инженерия решает, что происходит после и вокруг этого поиска.",{},{"id":449,"data":450,"type":218,"tunes":452},"p-ret-2",{"text":451},"Поисковик может вернуть 30 фрагментов. Реранкер может сократить их до 10. Слой контекста может выбрать четыре фрагмента, удалить дубликаты, прикрепить метаданные источника\u002Fверсии, объединить их с текущим состоянием приложения и разместить после системных инструкций.",{},{"id":454,"data":455,"type":218,"tunes":457},"p-ret-3",{"text":456},"Именно поэтому RAG-система может извлечь правильный фрагмент и всё равно ответить плохо: сбой может произойти во время сборки контекста, а не во время поиска.",{},{"id":459,"data":460,"type":226,"tunes":464},"retrieval-boundary",{"body":461,"title":462,"variant":463},"Правильный результат поиска полезен только в том случае, если он выдерживает фильтрацию, упорядочивание, сжатие и решения по бюджету токенов и действительно доходит до модели в пригодной для использования форме.","Поиск находит кандидатов; контекстная инженерия конструирует входные данные модели","success",{},{"id":466,"data":467,"type":42,"tunes":469},"h-memory",{"text":468,"level":247},"Контекстная инженерия против памяти",{},{"id":471,"data":472,"type":218,"tunes":474},"p-memory-1",{"text":473},"Память — это информация, сохраняемая вне непосредственного вызова модели, чтобы её можно было использовать снова позже. Контекст — это информация, фактически загруженная в текущий вызов.",{},{"id":476,"data":477,"type":218,"tunes":479},"p-memory-2",{"text":478},"Система памяти может содержать тысячи фактов, заметок или предыдущих решений. Контекстная инженерия выбирает, какие из них следует повторно ввести для текущей задачи. Загрузка всей памяти на каждом ходу сводит на нет смысл наличия внешнего слоя памяти.",{},{"id":481,"data":482,"type":218,"tunes":484},"p-memory-3",{"text":483},"Это различие становится критически важным для изменчивого состояния. Запомненный статус проекта или предпочтение пользователя может быть полезным, но текущее авторитетное состояние может потребоваться перечитать перед принятием значимого решения.",{},{"id":486,"data":487,"type":492,"tunes":493},"ref-memory",{"url":488,"title":489,"excerpt":490,"ctaLabel":491},"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Fai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context","Память ИИ-агента — это не RAG: как разделить память, поиск, состояние и контекст","Практическая архитектура, разделяющая то, что сохраняется, что является авторитетным сейчас, что извлекается и что модель фактически получает.","Читать статью об архитектуре памяти","referralArticle",{},{"id":495,"data":496,"type":42,"tunes":498},"h-state",{"text":497,"level":247},"Контекстная инженерия против состояния приложения",{},{"id":500,"data":501,"type":218,"tunes":503},"p-state-1",{"text":502},"Состояние приложения — это текущее состояние внешней системы: баланс счёта, статус заявки, версия файла, этап рабочего процесса, состояние развёртывания или прогресс задачи.",{},{"id":505,"data":506,"type":218,"tunes":508},"p-state-2",{"text":507},"Состояние можно обобщить в контекст, но резюме — это не само состояние. Для значимых операций среда выполнения может потребовать перечитать авторитетную систему непосредственно перед действием, а не доверять более раннему снимку, видимому модели.",{},{"id":510,"data":511,"type":226,"tunes":514},"state-rule",{"body":512,"title":513,"variant":233},"Как только состояние скопировано в промпт, оно может устареть. Контекстная инженерия должна определять, когда изменчивое состояние требует обновления и какие операции требуют нового авторитетного чтения.","Контекст — это снимок",{},{"id":516,"data":517,"type":42,"tunes":519},"h-tools",{"text":518,"level":247},"Проектирование инструментов — часть контекстной инженерии",{},{"id":521,"data":522,"type":218,"tunes":524},"p-tools-1",{"text":523},"Инструменты не просто дают агентам возможности. Имена инструментов, описания, схемы и результаты становятся видимой для модели информацией, которая формирует решения.",{},{"id":526,"data":527,"type":218,"tunes":529},"p-tools-2",{"text":528},"Текущие рекомендации Anthropic по контекстной инженерии подчёркивают важность токен-эффективных инструментов и предостерегают от раздутых наборов инструментов с пересекающейся функциональностью. Каталог инструментов, который трудно различить человеку, также трудно надёжно маршрутизировать модели.",{},{"id":531,"data":532,"type":218,"tunes":534},"p-tools-3",{"text":533},"Результаты работы инструментов также требуют контекстной дисциплины. Возврат всего журнала на 20 000 строк, когда агент запросил одно условие ошибки, расходует внимание и может похоронить решающее доказательство.",{},{"id":536,"data":537,"type":42,"tunes":539},"h-jit",{"text":538,"level":247},"Контекст точно в срок против предзагруженного контекста",{},{"id":541,"data":542,"type":431,"tunes":568},"jit-comparison",{"rows":543,"title":560,"layout":391,"columns":561},[544,548,552,556],{"id":545,"label":546,"values":547},"method","Метод",[406,406],{"id":549,"label":550,"values":551},"strength","Сильная сторона",[406,406],{"id":553,"label":554,"values":555},"risk","Риск",[406,406],{"id":557,"label":558,"values":559},"best","Полезно, когда",[406,406],"Два способа предоставления информации",[562,565],{"id":563,"label":564},"preload","Предзагруженный контекст",{"id":566,"label":567},"jit","Контекст точно в срок",{},{"id":570,"data":571,"type":218,"tunes":573},"p-jit-1",{"text":572},"Anthropic описывает гибридный подход, при котором часть стабильного контекста предзагружается, а агенты извлекают дополнительную информацию во время выполнения. Это полезный архитектурный шаблон, потому что не каждый важный факт заслуживает постоянного присутствия в контекстном окне.",{},{"id":575,"data":576,"type":42,"tunes":578},"h-budget",{"text":577,"level":247},"Контекст — это бюджет, а не система хранения",{},{"id":580,"data":581,"type":218,"tunes":583},"p-budget-1",{"text":582},"Контекстное окно определяет ёмкость. Оно не гарантирует, что каждый токен будет использован одинаково хорошо. Модель должна распределять внимание между инструкциями, историей, доказательствами, инструментами и промежуточным состоянием.",{},{"id":585,"data":586,"type":218,"tunes":588},"p-budget-2",{"text":587},"Практическая цель, следовательно, не «заполнить окно». Она состоит в том, чтобы максимизировать полезность ограниченного бюджета внимания.",{},{"id":590,"data":591,"type":218,"tunes":593},"p-budget-3",{"text":592},"Anthropic формулирует аналогичный принцип как поиск наименьшего набора токенов с высоким сигналом, который максимизирует вероятность желаемого поведения. Рекомендации OpenAI по управлению контекстом также предупреждают, что неотфильтрованная история, избыточные результаты инструментов и зашумлённое извлечение могут перегрузить даже большие окна.",{},{"id":595,"data":596,"type":42,"tunes":598},"h-more",{"text":597,"level":247},"Почему больше контекста может быть хуже",{},{"id":600,"data":601,"type":218,"tunes":603},"p-more-1",{"text":602},"Дополнительный контекст может вносить нерелевантную информацию, устаревшее состояние, дублирующиеся доказательства, противоречивые инструкции или конкуренцию за позицию. Он также может заставлять системы уплотнения отбрасывать детали, которые позже становятся важными.",{},{"id":605,"data":606,"type":218,"tunes":608},"p-more-2",{"text":607},"Классическое исследование Lost in the Middle показало, что модели с длинным контекстом могут использовать информацию по-разному в зависимости от того, где появляется релевантное содержимое, причём производительность часто снижается, когда решающая информация размещается в середине длинных входных данных.",{},{"id":610,"data":611,"type":218,"tunes":613},"p-more-3",{"text":612},"Это не означает, что длинный контекст inherently плох. Это означает, что доступность внутри окна не то же самое, что надёжное использование.",{},{"id":615,"data":616,"type":42,"tunes":618},"h-order",{"text":617,"level":247},"Порядок контекста должен быть намеренным",{},{"id":620,"data":621,"type":218,"tunes":623},"p-order-1",{"text":622},"Построение контекста — это также проблема порядка. Критические инструкции, текущее состояние, решающие доказательства и ограничения, специфичные для задачи, не следует объединять произвольно.",{},{"id":625,"data":626,"type":218,"tunes":628},"p-order-2",{"text":627},"Не существует универсального идеального порядка для каждой модели и задачи. Поэтому архитектура должна проверять, меняет ли переупорядочивание доказательств правильность и остаётся ли важная информация устойчивой при реалистичных вариациях контекста.",{},{"id":630,"data":631,"type":218,"tunes":633},"p-order-3",{"text":632},"Стабильный ответ, который резко меняется, когда два одинаково обоснованных фрагмента меняются местами, указывает на чувствительность к контексту, которую следует измерять, а не игнорировать.",{},{"id":635,"data":636,"type":42,"tunes":638},"h-conflict",{"text":637,"level":247},"Конфликтующий контекст требует явного приоритета",{},{"id":640,"data":641,"type":218,"tunes":643},"p-conflict-1",{"text":642},"Модель может получить старую политику и новую политику, запомненное предпочтение и текущую явную инструкцию или кэшированный статус и актуальный результат API. Система не должна ожидать, что модель выведет приоритет из стиля текста.",{},{"id":645,"data":646,"type":218,"tunes":648},"p-conflict-2",{"text":647},"Контекстная инженерия должна кодировать приоритет через выбор источника, метаданные, порядок или явные инструкции: актуальное авторитетное состояние переопределяет устаревшие копии; явная текущая инструкция пользователя переопределяет более раннее выведенное предпочтение; утверждённая политика имеет приоритет над устаревшими черновиками.",{},{"id":650,"data":651,"type":391,"tunes":674},"conflict-table",{"content":652,"stretched":43,"withHeadings":14},[653,656,659,662,665,668,671],[654,655],"Конфликт","Предпочтительное правило контекста",[657,658],"Текущее состояние против запомненного состояния","Обновить и предпочесть авторитетный текущий источник.",[660,661],"Текущая политика против заменённой политики","Включить текущую версию; сохранять старую версию только когда требуется историческое сравнение.",[663,664],"Явная инструкция пользователя против старого выведенного предпочтения","Предпочесть текущую явную инструкцию.",[666,667],"Первичный источник против вторичного резюме","Использовать первичный источник для утверждений, требующих авторитетности; резюме может поддерживать объяснение.",[669,670],"Наблюдение инструмента против априорного знания модели","Предпочесть текущее наблюдаемое состояние, когда инструмент авторитетен для этого факта.",[672,673],"Два неразрешённых авторитетных источника","Раскрыть конфликт, а не фабриковать один согласованный ответ.",{},{"id":676,"data":677,"type":42,"tunes":679},"h-compaction",{"text":678,"level":247},"Компактизация — это преобразование контекста, а не хранение без потерь",{},{"id":681,"data":682,"type":218,"tunes":684},"p-comp-1",{"text":683},"Долго работающие системы в конечном итоге нуждаются в обрезке, суммировании или компактизации истории. Компактизация создаёт новое представление предыдущего контекста, чтобы агент мог продолжить, не воспроизводя каждый токен.",{},{"id":686,"data":687,"type":218,"tunes":689},"p-comp-2",{"text":688},"Примеры управления контекстом OpenAI используют обрезку и сжатие для длительных сессий. Anthropic описывает компактизацию как основной приём для поддержания связности, когда взаимодействие приближается к лимиту контекста.",{},{"id":691,"data":692,"type":218,"tunes":694},"p-comp-3",{"text":693},"Сложная часть — решить, что нельзя безопасно удалить: нерешённые задачи, идентификаторы, ограничения пользователя, границы безопасности, архитектурные решения, исключения, происхождение источника и условия, которые делают предыдущий вывод действительным.",{},{"id":696,"data":697,"type":226,"tunes":700},"compaction-rule",{"body":698,"title":699,"variant":233},"Если компактизация сохраняет «использовать подход X», но отбрасывает, почему был выбран X, какая версия была протестирована или какое условие сделало бы его недействительным, последующие ответы могут оставаться внутренне согласованными, становясь при этом внешне ошибочными.","Резюме может сохранить вывод и уничтожить причину",{},{"id":702,"data":703,"type":42,"tunes":705},"h-validity",{"text":704,"level":247},"Сохраняйте границы действительности",{},{"id":707,"data":708,"type":218,"tunes":710},"p-validity-1",{"text":709},"Важные выводы должны нести условия, при которых они остаются обоснованными: версия, дата, область применения, допущения, авторитетность источника и неразрешённые разногласия.",{},{"id":712,"data":713,"type":218,"tunes":715},"p-validity-2",{"text":714},"Таким образом, контекстная инженерия связана с границей действительности ответа. Сборщик контекста не должен удалять метаданные, определяющие, применимы ли ещё доказательства.",{},{"id":717,"data":718,"type":492,"tunes":723},"ref-avb",{"url":719,"title":720,"excerpt":721,"ctaLabel":722},"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Fthe-answer-validity-boundary-the-missing-layer-between-relevance-and-reliable-ai-answers","Граница действительности ответа: недостающий слой между релевантностью и надёжными ответами ИИ","Фреймворк для сохранения области применения, допущений, версий и условий доказательств, при которых утверждение ИИ остаётся обоснованным.","Читать о границе действительности ответа",{},{"id":725,"data":726,"type":42,"tunes":728},"h-security",{"text":727,"level":247},"Контекстная инженерия — это также граница безопасности",{},{"id":730,"data":731,"type":218,"tunes":733},"p-sec-1",{"text":732},"Данные, достигающие модели, пересекли важную системную границу. Поэтому сборка контекста должна соблюдать правила авторизации, изоляции арендаторов, конфиденциальности и минимизации данных.",{},{"id":735,"data":736,"type":218,"tunes":738},"p-sec-2",{"text":737},"Поисковик может технически найти фрагмент, к которому текущий пользователь не имеет доступа. Правильный подход — не допустить попадания этого фрагмента в контекст модели, а не полагаться на то, что модель его проигнорирует.",{},{"id":740,"data":741,"type":218,"tunes":743},"p-sec-3",{"text":742},"Выводы инструментов также могут содержать недоверенные инструкции или враждебный контент. Контекстная инженерия должна сохранять различие между инструкциями приложения и внешними данными, чтобы извлечённый текст не мог незаметно получить авторитет инструкции.",{},{"id":745,"data":746,"type":42,"tunes":748},"h-architecture",{"text":747,"level":247},"Практическая архитектура контекстной инженерии",{},{"id":750,"data":751,"type":226,"tunes":754},"arch-note",{"body":752,"title":753,"variant":240},"Следующие слои представляют собой практический синтез для production-систем, а не формальный отраслевой стандарт. Цель — отделить владение информацией от временного контекста, видимого модели.","Предлагаемая модель архитектуры",{},{"id":756,"data":757,"type":391,"tunes":786},"arch-table",{"content":758,"stretched":43,"withHeadings":14},[759,762,765,768,771,774,777,780,783],[760,761],"Слой","Ответственность",[763,764],"Авторитетные системы","Владеют текущим бизнес-\u002Fсистемным состоянием и официальными записями.",[766,767],"Источники знаний","Владеют документами, политиками, спецификациями, исследованиями или внешними доказательствами.",[769,770],"Хранилище памяти","Сохраняет выбранную информацию между ходами или сессиями.",[772,773],"Слой извлечения","Находит релевантные задаче кандидаты из внешних источников.",[775,776],"Слой инструментов\u002Fсреды выполнения","Читает состояние, выполняет действия и возвращает наблюдения.",[778,779],"Сборщик контекста","Выбирает, фильтрует, дедуплицирует, упорядочивает и форматирует информацию, видимую модели.",[781,782],"Модель","Рассуждает и генерирует на основе собранного контекста.",[784,785],"Валидация\u002Fоценка","Проверяет, соответствуют ли выбранный контекст и полученный результат требованиям конкретной задачи.",{},{"id":788,"data":789,"type":218,"tunes":791},"p-arch-1",{"text":790},"Сборщик контекста концептуально важен, даже если ни один модуль не носит такого точного названия. В небольшом приложении это может быть обычный код приложения. В крупной агентной платформе он может объединять управление сессиями, извлечение, память, middleware инструментов, компактификацию и применение политик.",{},{"id":793,"data":794,"type":42,"tunes":796},"h-policy",{"text":795,"level":247},"Практическая политика построения контекста",{},{"id":798,"data":799,"type":391,"tunes":840},"policy-table",{"content":800,"stretched":43,"withHeadings":14},[801,804,807,810,813,816,819,822,825,828,831,834,837],[802,803],"Правило","Почему это важно",[805,806],"Начинайте с текущей задачи","Не переносите информацию только потому, что она существовала ранее.",[808,809],"Перечитывайте изменчивое состояние","Память и старый контекст могут быть устаревшими.",[811,812],"Извлекайте ровно столько доказательств, сколько нужно","Большие наборы кандидатов могут размывать решающую информацию.",[814,815],"Сохраняйте метаданные источника","Версия, дата и авторитетность определяют, применимо ли ещё доказательство.",[817,818],"Удаляйте дублирующееся содержимое","Избыточность расходует токены, не добавляя информации.",[820,821],"Предпочитайте структурированные сводки для больших выводов инструментов","Показывайте решающие поля вместо сырого шума, где это позволяет точность.",[823,824],"Храните правила вместе с исключениями","Отделение правила от его исключения создаёт ложную определённость.",[826,827],"Делайте приоритет явным","Не просите модель выводить, какой из конфликтующих источников побеждает.",[829,830],"Храните долговременное состояние вне контекста","Контекст — это временная рабочая память, а не база данных.",[832,833],"Сжимайте с проверками сохранения","Убедитесь, что идентификаторы, ограничения, происхождение и нерешённое состояние сохраняются.",[835,836],"Измеряйте чувствительность к порядку","Корректность не должна случайно зависеть от произвольного порядка документов.",[838,839],"Оценивайте контекст отдельно от качества модели","Более сильная модель не может надёжно компенсировать отсутствующие или неавторизованные доказательства.",{},{"id":842,"data":843,"type":42,"tunes":845},"h-eval",{"text":844,"level":247},"Как оценивать контекстную инженерию",{},{"id":847,"data":848,"type":391,"tunes":890},"eval-table",{"content":849,"stretched":43,"withHeadings":14},[850,854,858,862,866,870,874,878,882,886],[851,852,853],"Свойство","Вопрос","Пример теста",[855,856,857],"Достаточность","Содержит ли контекст всё необходимое для решения задачи?","Удалите один элемент доказательств и посмотрите, станет ли ответ необоснованным.",[859,860,861],"Релевантность","Сколько контекста не нужно для задачи?","Измеряйте качество при добавлении или удалении нерелевантных фрагментов.",[863,864,865],"Авторитетность","Основаны ли решающие утверждения на правильном классе источников?","Внедрите более гладкий, но неавторитетный конфликтующий источник.",[867,868,869],"Свежесть","Переопределяет ли текущее состояние устаревшие копии?","Измените авторитетное состояние после предыдущего хода и запустите снова.",[871,872,873],"Устойчивость к позиции","Сильно ли качество ответа зависит от позиции доказательства?","Рандомизируйте порядок кандидатов в повторных испытаниях.",[875,876,877],"Обработка конфликтов","Следует ли модель явным правилам приоритета?","Предъявите старое и новое состояние вместе.",[879,880,881],"Сохранение при сжатии","Сохраняет ли суммаризация ограничения и границы валидности?","Сравните производительность задачи до и после сжатия.",[883,884,885],"Эффективность токенов","Улучшает ли дополнительный контекст качество достаточно, чтобы оправдать задержку\u002Fстоимость?","Проведите контролируемые абляции размера контекста.",[887,888,889],"Безопасность","Может ли неавторизованное или враждебное содержимое попасть в контекст модели?","Проверьте границы тенанта, разрешений и prompt-injection.",{},{"id":892,"data":893,"type":42,"tunes":895},"h-rag-diagnostic",{"text":894,"level":247},"Сборка контекста — отдельный слой сбоев RAG",{},{"id":897,"data":898,"type":218,"tunes":900},"p-ragdiag-1",{"text":899},"Пайплайн RAG может успешно выполнить извлечение и всё равно потерпеть неудачу на последующих этапах. Релевантный источник может оказаться на 2-м месте, но сборщик контекста может его отбросить, обрезать, объединить с устаревшим противоречивым материалом или превысить бюджет токенов.",{},{"id":902,"data":903,"type":218,"tunes":905},"p-ragdiag-2",{"text":904},"Именно поэтому трассировки извлечения следует сравнивать с фактическим контекстом, отправленным модели. Без такого сравнения сбои контекста легко ошибочно диагностировать как сбои эмбеддингов или модели.",{},{"id":907,"data":908,"type":492,"tunes":913},"ref-ragfail",{"url":909,"title":910,"excerpt":911,"ctaLabel":912},"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Frag-failed-but-which-layer-actually-failed-a-diagnostic-method","RAG не сработал — но какой слой на самом деле дал сбой? Метод диагностики","Послойный подход к разделению сбоев покрытия источников, извлечения, ранжирования, сборки контекста, генерации, атрибуции доказательств и свежести.","Читать метод диагностики RAG",{},{"id":915,"data":916,"type":42,"tunes":918},"h-implementation",{"text":917,"level":247},"Доказательства оригинальной реализации",{},{"id":920,"data":921,"type":42,"tunes":923},"h-sot-engine",{"text":922,"level":246},"Source of Truth Research Engine: ограниченное исследование вместо неограниченного контекста",{},{"id":925,"data":926,"type":218,"tunes":928},"p-sot-1",{"text":927},"Source of Truth Research Engine разделяет обнаружение, получение, извлечение, верификацию, анализ противоречий и синтез на ограниченные исследовательские этапы вместо отправки одной огромной исследовательской задачи и всего накопленного материала в один вызов модели.",{},{"id":930,"data":931,"type":218,"tunes":933},"p-sot-2",{"text":932},"Его модель доказательств хранит Sources, Artifacts, Claims, Relations, Contradictions и происхождение вне контекста модели. Модель может получать подмножество, необходимое для текущего исследовательского шага, пока долговременные доказательства остаются во внешнем хранилище.",{},{"id":935,"data":936,"type":218,"tunes":938},"p-sot-3",{"text":937},"Это конкретный паттерн контекстной инженерии: долговременное исследовательское состояние живёт вне окна модели; активный контекст модели реконструируется для текущего этапа.",{},{"id":940,"data":941,"type":42,"tunes":943},"h-ai-client",{"text":942,"level":246},"Aaasaasa AI Client: среда выполнения, разрешения и контекст — это отдельные concerns",{},{"id":945,"data":946,"type":218,"tunes":948},"p-client-1",{"text":947},"Aaasaasa AI Client разделяет выбор провайдера\u002Fмодели, местоположение среды выполнения, разрешения рабочего пространства, локальные ресурсы и доступ к инструментам. Это предотвращает ситуацию, когда контекст модели становится владельцем авторизации или состояния приложения.",{},{"id":950,"data":951,"type":218,"tunes":953},"p-client-2",{"text":952},"Прямой чат и агентные среды выполнения могут иметь разные возможности инструментов. Профили разрешений рабочего пространства обеспечиваются средой выполнения, а не просто описываются в контексте на естественном языке. Это различие важно: контекст может сообщить модели, что она должна делать, но среда выполнения всё равно должна обеспечивать то, что ей фактически разрешено делать.",{},{"id":955,"data":956,"type":218,"tunes":958},"p-client-3",{"text":957},"Доказательством реализации здесь является архитектурное разделение, а не утверждение, что каждая продвинутая техника управления контекстом, описанная в этой статье, уже реализована.",{},{"id":960,"data":961,"type":391,"tunes":981},"impl-table",{"content":962,"stretched":43,"withHeadings":14},[963,966,969,972,975,978],[964,965],"Паттерн реализации","Урок контекстной инженерии",[967,968],"Внешнее хранилище доказательств","Долговременные знания не обязаны оставаться в окне модели.",[970,971],"Ограниченные этапы исследования","Разные шаги могут получать разный контекст вместо накопления одной гигантской истории.",[973,974],"Утверждения + происхождение вне контекста","Идентичность доказательства сохраняется за пределами временного состояния вывода.",[976,977],"Разрешения, обеспечиваемые средой выполнения","Полномочия безопасности не зависят от того, помнит ли модель инструкцию.",[979,980],"Раздельные концепции локального\u002Fпровайдера\u002Fмодели\u002Fсреды выполнения","Контекст — лишь один слой более широкой архитектуры AI-приложения.",{},{"id":983,"data":984,"type":226,"tunes":987},"impl-boundary",{"body":985,"title":986,"variant":240},"Эти реализации поддерживают архитектурное разделение между долговременным состоянием, извлечением, элементами управления среды выполнения и контекстом, обращённым к модели. Они не представлены как эталонное доказательство того, что одна стратегия контекста универсально оптимальна.","Граница доказательств",{},{"id":989,"data":990,"type":42,"tunes":992},"h-failures",{"text":991,"level":247},"Распространённые режимы отказа контекстной инженерии",{},{"id":994,"data":995,"type":391,"tunes":1030},"failure-table",{"content":996,"stretched":43,"withHeadings":14},[997,1000,1003,1006,1009,1012,1015,1018,1021,1024,1027],[998,999],"Режим отказа","Что идёт не так",[1001,1002],"Воспроизводить весь разговор бесконечно","Старые допущения, повторения и рост токенов подавляют текущее намерение.",[1004,1005],"Помещать каждый извлечённый результат в промпт","Шум, дублирование и конфликтующие версии размывают решающие доказательства.",[1007,1008],"Использовать память как текущее состояние","Устаревшая информация незаметно заменяет авторитетное актуальное состояние.",[1010,1011],"Возвращать необработанный вывод инструмента","Большие журналы или ответы потребляют внимание, не добавляя ценности для решения.",[1013,1014],"Скрывать описания инструментов за расплывчатыми названиями","Модель не может надёжно решить, какую возможность использовать.",[1016,1017],"Сжимать без тестов на сохранение","Критические ограничения, идентификаторы или исключения исчезают.",[1019,1020],"Смешивать инструкции и недоверенные данные","Внешнее содержимое может быть истолковано как инструкция с более высоким авторитетом.",[1022,1023],"Использовать один статический шаблон контекста для каждой задачи","Разные задачи получают нерелевантную информацию и упускают специфичные для задачи доказательства.",[1025,1026],"Игнорировать версию\u002Fдату источника","Устаревшие, но релевантные доказательства могут доминировать над текущим авторитетным состоянием.",[1028,1029],"Считать большее окно контекста гарантией качества","Ёмкость увеличивается, но проблемы внимания и конфликтов остаются.",{},{"id":1032,"data":1033,"type":42,"tunes":1035},"h-misconceptions",{"text":1034,"level":247},"Распространённые заблуждения",{},{"id":1037,"data":1038,"type":391,"tunes":1073},"misconceptions-table",{"content":1039,"stretched":43,"withHeadings":14},[1040,1043,1046,1049,1052,1055,1058,1061,1064,1067,1070],[1041,1042],"Заблуждение","Исправление",[1044,1045],"«Контекстная инженерия — это просто промпт-инженерия под новым названием».","Промпты — лишь один компонент; контекстная инженерия также охватывает извлечение, память, состояние, результаты инструментов, историю и сжатие.",[1047,1048],"«Контекст означает историю чата».","История — лишь один из возможных источников контекста.",[1050,1051],"«Больше контекста всегда лучше».","Дополнительная информация может снизить сигнал, внести конфликты и увеличить стоимость.",[1053,1054],"«Если извлечение нашло это, модель это увидела».","Извлечённые кандидаты могут быть отфильтрованы, усечены или опущены перед выводом.",[1056,1057],"«Длинный контекст устраняет необходимость в RAG».","Большие окна увеличивают ёмкость, но не решают проблемы свежести, авторитета, разрешений или динамического извлечения.",[1059,1060],"«Память всегда должна загружаться».","Память следует выбирать в соответствии с текущей задачей.",[1062,1063],"«Резюме сохраняет всё важное».","Сжатие является потерями, если явно не оценено на сохранение.",[1065,1066],"«Инструкции могут обеспечивать разрешения».","Авторизация должна обеспечиваться элементами управления среды выполнения\u002Fприложения, а не только контекстом.",[1068,1069],"«Один рецепт контекста работает для каждой модели».","Чувствительность к контексту варьируется в зависимости от модели, задачи, корпуса и среды выполнения.",[1071,1072],"«Контекстная инженерия только для агентов».","Агенты усиливают потребность, но обычные RAG и разговорные приложения также требуют построения контекста.",{},{"id":1075,"data":1076,"type":42,"tunes":1078},"h-sequence",{"text":1077,"level":247},"Практическая последовательность контекстной инженерии",{},{"id":1080,"data":1081,"type":317,"tunes":1114},"design-sequence",{"steps":1082,"title":1113,"orientation":316},[1083,1086,1089,1092,1095,1098,1101,1104,1107,1110],{"label":1084,"description":1085},"1. Определите следующее решение модели","Укажите, на что модель должна ответить, классифицировать, спланировать или выбрать на этом шаге.",{"label":1087,"description":1088},"2. Определите необходимые факты и ограничения","Перечислите минимальное состояние, правила, доказательства и инструкции, которые могут существенно изменить результат.",{"label":1090,"description":1091},"3. Определите авторитет и разрешения","Определите, какие источники являются текущими, авторитетными и доступными текущему субъекту.",{"label":1093,"description":1094},"4. Извлекайте или читайте по требованию","Получайте необходимые доказательства и изменчивое состояние, а не полагайтесь на устаревший контекст.",{"label":1096,"description":1097},"5. Уменьшите шум","Удаляйте дубликаты, суммируйте или выбирайте фрагменты, не отбрасывая решающие исключения или происхождение.",{"label":1099,"description":1100},"6. Структурируйте и упорядочивайте","Сделайте инструкции, текущее состояние, доказательства и наблюдения инструментов различимыми.",{"label":1102,"description":1103},"7. Уложитесь в бюджет токенов","Предпочитайте контекст с высоким сигналом и выносите долговременную информацию за пределы окна.",{"label":1105,"description":1106},"8. Запустите модель","Выполните вывод на основе собранного контекста.",{"label":1108,"description":1109},"9. Наблюдайте за сбоями","Зафиксируйте, возникла ли проблема из-за отсутствующего, устаревшего, шумного, конфликтующего или плохо упорядоченного контекста.",{"label":1111,"description":1112},"10. Переоцените после изменений модели\u002Fсреды выполнения","Стратегия контекста действительна только для моделей, инструментов и рабочих нагрузок, на которых она была протестирована.","Строить контекст от текущего решения назад",{},{"id":1116,"data":1117,"type":42,"tunes":1119},"h-checklist",{"text":1118,"level":247},"Контрольный список контекстной инженерии",{},{"id":1121,"data":1122,"type":391,"tunes":1162},"checklist-table",{"content":1123,"stretched":43,"withHeadings":14},[1124,1126,1129,1132,1135,1138,1141,1144,1147,1150,1153,1156,1159],[852,1125],"Ожидаемый ответ",[1127,1128],"Какое именно решение модель примет следующим?","Ограниченная задача, а не расплывчатая долгосрочная цель.",[1130,1131],"Какая информация может существенно изменить это решение?","Явный минимальный набор доказательств\u002Fсостояния.",[1133,1134],"Какие данные сейчас авторитетны?","Текущий источник\u002Fверсия и правило свежести.",[1136,1137],"Какие данные являются необязательным фоном?","Отделены от решающих доказательств.",[1139,1140],"Что не должно попадать в контекст?","Неавторизованные, ненужные или чрезмерно чувствительные данные.",[1142,1143],"Какие элементы памяти релевантны?","Выбраны по задаче, а не воспроизводятся автоматически.",[1145,1146],"Какие выводы инструментов следует сократить?","Большие ответы преобразуются в форму, релевантную для решения.",[1148,1149],"Какие ограничения должны пережить сжатие?","Идентификаторы, исключения, обязательства, нерешённое состояние и происхождение.",[1151,1152],"Как представлен приоритет?","Текущая\u002Fавторитетная информация может надёжно переопределять устаревшие или более слабые источники.",[1154,1155],"Как вы узнаете, что контекст не сработал?","Существуют оценки и трассировки, специфичные для контекста.",[1157,1158],"Можно ли воспроизвести ответ?","Вход модели или реконструируемая трассировка контекста доступны там, где это уместно.",[1160,1161],"Может ли более сильная или большая модель изменить стратегию?","Политика контекста учитывает версии и переоценивается эмпирически.",{},{"id":1164,"data":1165,"type":42,"tunes":1167},"h-edge",{"text":1166,"level":247},"Краевые случаи и ограничения",{},{"id":1169,"data":1170,"type":218,"tunes":1172},"p-edge-1",{"text":1171},"Некоторые задачи достаточно просты, чтобы контекстная инженерия сводилась к короткому системному промпту и одному сообщению пользователя. Добавление извлечения, памяти и сжатия лишь внесло бы ненужную архитектуру.",{},{"id":1174,"data":1175,"type":218,"tunes":1177},"p-edge-2",{"text":1176},"Некоторые задачи требуют высокого охвата и могут намеренно включать больше контекста перед последующим синтезом. Исследование, обнаружение и юридическая экспертиза могут предпочитать избегание пропусков минимальному количеству токенов.",{},{"id":1179,"data":1180,"type":218,"tunes":1182},"p-edge-3",{"text":1181},"Некоторую информацию никогда не следует суммировать перед использованием. Точные контракты, код, криптографический материал, числовые записи и нормативный текст могут требовать дословного или структурированного извлечения, где сжатие могло бы изменить смысл.",{},{"id":1184,"data":1185,"type":218,"tunes":1187},"p-edge-4",{"text":1186},"Поведение при длинном контексте существенно различается между моделями. Стратегию, проверенную на одной модели, длине контекста или наборе инструментов, не следует автоматически переносить на другую.",{},{"id":1189,"data":1190,"type":218,"tunes":1192},"p-edge-5",{"text":1191},"Модель всё ещё может игнорировать или неверно интерпретировать превосходный контекст. Контекстная инженерия улучшает информационную среду; она не гарантирует корректность рассуждений.",{},{"id":1194,"data":1195,"type":42,"tunes":1197},"h-change",{"text":1196,"level":247},"Что могло бы изменить этот ответ?",{},{"id":1199,"data":1200,"type":218,"tunes":1202},"p-change-1",{"text":1201},"Будущие модели могут стать более устойчивыми к длинному контексту, позиционным эффектам и противоречивой информации. Это могло бы уменьшить объём ручной курации, необходимой сейчас.",{},{"id":1204,"data":1205,"type":218,"tunes":1207},"p-change-2",{"text":1206},"Архитектурное различие всё равно останется полезным, потому что разрешения, актуальность, персистентность памяти, авторитетность источника и состояние внешнего приложения существуют вне модели независимо от размера контекстного окна.",{},{"id":1209,"data":1210,"type":218,"tunes":1212},"p-change-3",{"text":1211},"Рекомендуемый баланс между предзагруженным и контекстом, загружаемым по требованию, также меняется в зависимости от требований к задержке, надёжности инструментов, размера корпуса, стоимости модели и того, насколько динамична лежащая в основе информация.",{},{"id":1214,"data":1215,"type":42,"tunes":1217},"h-related",{"text":1216,"level":247},"Связанные канонические знания",{},{"id":1219,"data":1220,"type":218,"tunes":1222},"p-related-1",{"text":1221},"Контекстная инженерия находится между поиском и генерацией. RAG объясняет, как извлекаются внешние знания; R01 разделяет эмбеддинги, векторный поиск и реранжирование; контекстная инженерия объясняет, что в конечном итоге доходит до модели.",{},{"id":1224,"data":1225,"type":492,"tunes":1230},"ref-rag",{"url":1226,"title":1227,"excerpt":1228,"ctaLabel":1229},"https:\u002F\u002Fstajic.de\u002Fru\u002Fblog\u002Fwhat-is-rag-the-simplest-explanation-of-how-it-works","Что такое RAG? Самое простое объяснение того, как это работает","Основы поиска для понимания того, как внешние знания могут быть предоставлены модели перед генерацией.","Читать основы RAG",{},{"id":1232,"data":1233,"type":218,"tunes":1235},"p-related-2",{"text":1234},"Архитектура источника истины отвечает на другой вопрос: не какая информация присутствует в контексте, а какой источник уполномочен подтверждать утверждение.",{},{"id":1237,"data":1238,"type":218,"tunes":1240},"p-related-3",{"text":1239},"Существующая статья «Почему больше контекста может ухудшить ответы ИИ» является диагностическим дополнением к этому каноническому определению. Она сосредоточена на загрязнении контекста, позиционных эффектах, росте top-k, потерях при компактификации и деградации ответов, а не на переопределении самой контекстной инженерии.",{},{"id":1242,"data":1243,"type":42,"tunes":1245},"h-faq",{"text":1244,"level":247},"Часто задаваемые вопросы",{},{"id":1247,"data":1248,"type":1247,"tunes":1283},"faq",{"items":1249,"title":1282},[1250,1254,1258,1262,1266,1270,1274,1278],{"id":1251,"answer":1252,"question":1253},"faq1","Контекстная инженерия — это проектирование и управление во время выполнения тем, какую информацию языковая модель получает во время инференса, включая инструкции, историю, извлечённые доказательства, память, состояние, инструменты и результаты работы инструментов.","Что такое контекстная инженерия?",{"id":1255,"answer":1256,"question":1257},"faq2","Промпт-инженерия сосредоточена на том, как написаны инструкции и примеры. Контекстная инженерия включает промпты, но также определяет, какая внешняя информация, состояние, история, память и наблюдения инструментов размещаются вокруг них.","Чем контекстная инженерия отличается от промпт-инженерии?",{"id":1259,"answer":1260,"question":1261},"faq3","Нет. RAG извлекает внешнюю информацию. Контекстная инженерия решает, как извлечённая информация фильтруется, объединяется с другим состоянием и фактически доставляется модели.","RAG — это то же самое, что контекстная инженерия?",{"id":1263,"answer":1264,"question":1265},"faq4","Нет. Память сохраняет информацию вне текущего вызова модели. Контекст — это подмножество информации, загруженное в текущий инференс.","Память — это то же самое, что контекст?",{"id":1267,"answer":1268,"question":1269},"faq5","Дополнительный контекст может вносить шум, устаревшее состояние, противоречивые доказательства, дублирование и позиционную конкуренцию. Большая ёмкость контекста не гарантирует столь же надёжного использования каждого токена.","Почему больше контекста может ухудшить ответ?",{"id":1271,"answer":1272,"question":1273},"faq6","Компактификация суммирует или преобразует накопленную историю в меньшее представление, чтобы долго работающая система могла продолжать без воспроизведения каждого предыдущего токена.","Что такое компактификация контекста?",{"id":1275,"answer":1276,"question":1277},"faq7","Оно может быть представлено в контексте для рассуждений, но значимые операции часто должны повторно считывать авторитетный источник, поскольку снимки контекста могут устаревать.","Следует ли хранить текущее состояние приложения в контексте?",{"id":1279,"answer":1280,"question":1281},"faq8","Нет. Агенты делают управление контекстом более динамичным, но RAG-системы, ассистенты, копилоты и многоходовые приложения также нуждаются в осознанном построении контекста.","Нужна ли контекстная инженерия только для ИИ-агентов?","Часто задаваемые вопросы о контекстной инженерии",{},{"id":1285,"data":1286,"type":42,"tunes":1288},"h-glossary",{"text":1287,"level":247},"Глоссарий",{},{"id":1290,"data":1291,"type":1290,"tunes":1339},"glossary",{"title":1292,"entries":1293},"Ключевые термины контекстной инженерии",[1294,1297,1301,1304,1308,1312,1316,1320,1324,1327,1331,1335],{"term":430,"anchor":1295,"definition":1296},"context-engineering","Проектирование и управление во время выполнения информацией, предоставляемой языковой модели для конкретного шага инференса.",{"term":1298,"anchor":1299,"definition":1300},"Контекстное окно","context-window","Конечная ёмкость модели в токенах для входных данных и, в зависимости от интерфейса модели, связанных сгенерированных токенов или активной последовательности.",{"term":427,"anchor":1302,"definition":1303},"prompt-engineering","Проектирование инструкций, примеров и структуры промпта, направленное на получение полезного поведения модели.",{"term":1305,"anchor":1306,"definition":1307},"Сборка контекста","context-assembly","Процесс отбора, фильтрации, упорядочивания и форматирования видимой модели информации перед инференсом.",{"term":1309,"anchor":1310,"definition":1311},"Извлечение по требованию","just-in-time-retrieval","Динамическая загрузка информации, когда она требуется текущей задачей, вместо предварительной загрузки всех потенциально релевантных данных.",{"term":1313,"anchor":1314,"definition":1315},"Компактификация","compaction","Сокращение накопленного контекста до меньшего представления с попыткой сохранить информацию, необходимую для будущих шагов.",{"term":1317,"anchor":1318,"definition":1319},"Загрязнение контекста","context-pollution","Ухудшение, вызванное нерелевантной, устаревшей, противоречивой или избыточной информацией, занимающей рабочий контекст модели.",{"term":1321,"anchor":1322,"definition":1323},"Состояние приложения","application-state","Текущее авторитетное состояние внешней системы, рабочего процесса или предметной области, существующее независимо от контекста модели.",{"term":376,"anchor":1325,"definition":1326},"memory","Информация, хранящаяся вне непосредственного вызова модели для возможного использования в последующих ходах или сессиях.",{"term":1328,"anchor":1329,"definition":1330},"Извлечённый контекст","retrieved-context","Внешняя информация, отобранная системой поиска и предоставленная модели полностью или частично.",{"term":1332,"anchor":1333,"definition":1334},"Позиционная устойчивость","position-robustness","Степень, в которой корректность модели остаётся стабильной при изменении местоположения или порядка релевантного контекста.",{"term":1336,"anchor":1337,"definition":1338},"Граница валидности","validity-boundary","Область, время, допущения, версии и условия доказательности, в пределах которых вывод остаётся обоснованным.",{},{"id":1341,"data":1342,"type":42,"tunes":1344},"h-conclusion",{"text":1343,"level":247},"Заключение",{},{"id":1346,"data":1347,"type":218,"tunes":1349},"p-conclusion-1",{"text":1348},"Контекстная инженерия — это слой, который решает, что модель увидит перед тем, как ответить. Это делает её шире промптинга и ниже по потоку от поиска, при этом она остаётся отличной от долговременной памяти и авторитетного состояния приложения.",{},{"id":1351,"data":1352,"type":218,"tunes":1354},"p-conclusion-2",{"text":1353},"Сильная контекстная архитектура не рассматривает контекстное окно как базу данных. Она хранит долговременное состояние и знания вне модели, загружает то, что требуется для текущего решения, сохраняет авторитетность и происхождение, удаляет ненужный шум и обновляет изменчивую информацию при необходимости.",{},{"id":1356,"data":1357,"type":218,"tunes":1359},"p-conclusion-3",{"text":1358},"Практическая цель, следовательно, не максимальный контекст. Это минимально достаточный, высокосигнальный, корректно авторизованный и сохраняющий валидность контекст для следующего решения модели.",{},{"id":1361,"data":1362,"type":42,"tunes":1364},"h-sources",{"text":1363,"level":247},"Первоисточники и актуальные рекомендации",{},{"id":1366,"data":1367,"type":218,"tunes":1369},"p-sources-note",{"text":1368},"Приведённые ниже источники подтверждают актуальную терминологию контекстной инженерии, поведение длинного контекста и операционные паттерны управления контекстом. Разделы проекта являются явным свидетельством реализации, а не универсальными утверждениями.",{},{"id":1371,"data":1372,"type":1378,"tunes":1379},"src-anthropic",{"link":1373,"meta":1374},"https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Feffective-context-engineering-for-ai-agents",{"image":1375,"title":1376,"description":1377},{"url":406},"Anthropic — Эффективная контекстная инженерия для ИИ-агентов","Официальное инженерное руководство, определяющее контекстную инженерию, извлечение по запросу, компактификацию, структурированную память и курирование контекста для агентов.","linkTool",{},{"id":1381,"data":1382,"type":1378,"tunes":1388},"src-openai-session",{"link":1383,"meta":1384},"https:\u002F\u002Fdevelopers.openai.com\u002Fcookbook\u002Fexamples\u002Fagents_sdk\u002Fsession_memory",{"image":1385,"title":1386,"description":1387},{"url":406},"OpenAI — Контекстная инженерия: управление краткосрочной памятью с помощью сессий","Официальное руководство по управлению контекстом, обрезке и сжатию для длительных сессий агентов.",{},{"id":1390,"data":1391,"type":1378,"tunes":1397},"src-openai-agents",{"link":1392,"meta":1393},"https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Fagents",{"image":1394,"title":1395,"description":1396},{"url":406},"OpenAI — Руководство по агентам","Актуальные рекомендации OpenAI для разработчиков по средам выполнения агентов, контексту между шагами и ответственности за оркестрацию.",{},{"id":1399,"data":1400,"type":1378,"tunes":1406},"src-lost-middle",{"link":1401,"meta":1402},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.03172",{"image":1403,"title":1404,"description":1405},{"url":406},"Потерянные в середине: как языковые модели используют длинные контексты","Исследование, показывающее, что производительность модели с длинным контекстом может сильно зависеть от позиции релевантной информации во входных данных.",{},"2.31","Проектирование контекста определяет, какую информацию модель ИИ получает перед выводом, включая подсказки, извлечение, память, состояние приложения, результаты работы инструментов и историю разговоров.","\u002Fuploads\u002F2026\u002F10\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers-1791480653258-018kcv.webp","what-is-context-engineering-what-the-model-receives-before-it-answers-1791480653258-018kcv","PUBLISHED","2026-10-08T13:29:00.000Z","2026-10-08T17:29:05.600Z","2026-10-08T17:43:15.694Z",{"en":1416,"de":1417,"sr":1418,"es":1419,"fr":1420,"it":1421,"ru":1422,"zh":1423},"\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Fde\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Fsr\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Fes\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Ffr\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Fit\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Fru\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers","\u002Fzh\u002Fblog\u002Fwhat-is-context-engineering-what-the-model-receives-before-it-answers",[1425,1429,1433],{"id":1426,"name":1427,"slug":1428},55,"Референсная модель: Возможности LLM","llm-capability",{"id":1430,"name":1431,"slug":1432},64,"Информационная архитектура","information-architecture",{"id":1434,"name":1435,"slug":1436},88,"Версионирование (промпты, модели)","versioning",{"id":1438,"login":1439,"email":1440,"displayName":1441},"20","rooth8233","aleksandar@stajic.de","Aleksandar Stajić",[1443,2459],{"lang":1444,"title":1445,"content":1446,"contentJson":1447,"excerpt":2458},"en","What Is Context Engineering? What the Model Receives Before It Answers","{\"time\":1791480654232,\"blocks\":[{\"id\":\"intro\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context engineering is the design of what information a language model receives at inference time, in what form, in what order and for how long. It is broader than prompt engineering because the model context can include system instructions, user messages, retrieved documents, tool results, memory, current application state, examples, structured data and intermediate artifacts. The goal is not to maximize the number of tokens, but to construct the smallest useful context that preserves the information, constraints and evidence needed for the current task.\"},\"tunes\":{}},{\"id\":\"direct\",\"type\":\"callout\",\"data\":{\"variant\":\"info\",\"title\":\"Direct answer\",\"body\":\"Prompt engineering asks \u003Cstrong>how should we instruct the model?\u003C\u002Fstrong> Context engineering asks \u003Cstrong>what should the model know right now, and how should that information be assembled?\u003C\u002Fstrong>\u003Cbr>\u003Cbr>Retrieval, memory, state management, tool design, history trimming, compaction and ordering are therefore context-engineering mechanisms when they determine the tokens available to the model before it produces the next output.\"},\"tunes\":{}},{\"id\":\"boundary\",\"type\":\"callout\",\"data\":{\"variant\":\"warning\",\"title\":\"Context is not the same as knowledge or memory\",\"body\":\"A system can know something without placing it in the current context. It can remember something outside the model window. It can retrieve a document but later exclude it from the final prompt. The model can only directly use the context that reaches the current inference.\"},\"tunes\":{}},{\"id\":\"current\",\"type\":\"callout\",\"data\":{\"variant\":\"note\",\"title\":\"Current-source note — 8 October 2026\",\"body\":\"Context engineering is now established practical terminology in major AI engineering guidance, but it is not a single formal standard with one mandatory architecture. Anthropic describes it as curating and maintaining the optimal set of tokens for inference; OpenAI's current agent guidance treats session context, trimming and compression as explicit engineering concerns for long-running systems.\"},\"tunes\":{}},{\"id\":\"toc\",\"type\":\"tableOfContents\",\"data\":{\"title\":\"Contents\",\"minLevel\":2,\"maxLevel\":3},\"tunes\":{}},{\"id\":\"h-meaning\",\"type\":\"header\",\"data\":{\"text\":\"What context engineering really means\",\"level\":2},\"tunes\":{}},{\"id\":\"p-meaning-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Every model call is made under a temporary working environment: the current instructions, messages, retrieved evidence, tool outputs and state that fit into the active context window. Context engineering is the discipline of constructing that environment deliberately.\"},\"tunes\":{}},{\"id\":\"p-meaning-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"The key word is deliberately. A naive system simply concatenates everything it has: full history, all retrieved documents, every tool response and large system prompts. A context-engineered system decides which information is required for the current decision and which information should remain outside the window until needed.\"},\"tunes\":{}},{\"id\":\"p-meaning-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"This makes context engineering partly an information-architecture problem, partly a runtime problem and partly an evaluation problem. The design must decide what can enter context, where it comes from, which version is current, how conflicts are resolved, how much detail is retained and how the result is tested.\"},\"tunes\":{}},{\"id\":\"h-simple\",\"type\":\"header\",\"data\":{\"text\":\"The simplest example\",\"level\":2},\"tunes\":{}},{\"id\":\"p-simple-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Imagine an internal support assistant. A user asks: “Can this customer cancel without a fee?”\"},\"tunes\":{}},{\"id\":\"p-simple-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"The model might need five things: the current cancellation policy, the customer's current contract type, the effective contract date, the relevant exception rules and the user's authorization scope.\"},\"tunes\":{}},{\"id\":\"p-simple-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"It does not necessarily need the entire customer database, the full policy archive, every previous conversation or every support ticket. Context engineering is the process that selects and assembles the five useful pieces while excluding unrelated information.\"},\"tunes\":{}},{\"id\":\"simple-flow\",\"type\":\"processFlow\",\"data\":{\"title\":\"From application state to model context\",\"orientation\":\"auto\",\"steps\":[{\"label\":\"1. Understand the task\",\"description\":\"Classify what the current question requires and which information types can affect the answer.\"},{\"label\":\"2. Resolve authoritative state\",\"description\":\"Read current application or business state that should not be guessed from memory.\"},{\"label\":\"3. Retrieve supporting knowledge\",\"description\":\"Find the policy, documents or external evidence relevant to the specific task.\"},{\"label\":\"4. Apply eligibility and permissions\",\"description\":\"Exclude data the current user or runtime is not allowed to expose to the model.\"},{\"label\":\"5. Reduce and structure\",\"description\":\"Remove duplication, select useful excerpts and preserve critical metadata, conditions and exceptions.\"},{\"label\":\"6. Order the context\",\"description\":\"Place instructions, current state and decisive evidence where the model can use them consistently.\"},{\"label\":\"7. Run inference\",\"description\":\"The model receives the assembled context and produces the next answer or action proposal.\"}]},\"tunes\":{}},{\"id\":\"h-stops\",\"type\":\"header\",\"data\":{\"text\":\"Where the simple example stops\",\"level\":2},\"tunes\":{}},{\"id\":\"p-stops-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Real systems are more difficult because the information needed for one step may not be known before execution begins. An agent can discover new facts through tools, create intermediate files, receive changing external state or span a task longer than one context window.\"},\"tunes\":{}},{\"id\":\"p-stops-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context engineering therefore becomes dynamic. The context for step 12 should not simply be step 1 context plus eleven layers of accumulated output. It should reflect the current task state, the decisions that still matter and the evidence required for the next action.\"},\"tunes\":{}},{\"id\":\"h-anatomy\",\"type\":\"header\",\"data\":{\"text\":\"What can enter a model context?\",\"level\":2},\"tunes\":{}},{\"id\":\"anatomy-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Context component\",\"Purpose\",\"Typical risk\"],[\"System \u002F developer instructions\",\"Define role, constraints, policies and behavior\",\"Too vague, contradictory or overloaded with brittle logic\"],[\"Current user request\",\"Defines immediate task and intent\",\"Ambiguity or conflict with prior history\"],[\"Conversation history\",\"Preserves continuity across turns\",\"Stale assumptions, repetition and token growth\"],[\"Retrieved documents\",\"Provide external knowledge\u002Fevidence\",\"Irrelevance, stale versions, weak authority or duplication\"],[\"Current application state\",\"Supplies volatile business\u002Fsystem facts\",\"Using cached or remembered state instead of current authority\"],[\"Tool definitions\",\"Tell the model what capabilities exist and how to call them\",\"Too many overlapping tools or verbose schemas\"],[\"Tool results\",\"Bring observations from the environment into the loop\",\"Large noisy outputs, untrusted content or obsolete observations\"],[\"Memory\",\"Reintroduces selected information from previous interactions\",\"Staleness, incorrect generalization or over-personalization\"],[\"Examples\",\"Demonstrate desired behavior\",\"Too many edge cases can crowd out the current task\"],[\"Intermediate artifacts\",\"Carry plans, summaries, code, calculations or notes\",\"Old intermediate state may be mistaken for final truth\"],[\"Policies \u002F guardrails\",\"Define prohibited or constrained behavior\",\"Conflict with business logic or hidden enforcement gaps\"]]},\"tunes\":{}},{\"id\":\"h-prompt\",\"type\":\"header\",\"data\":{\"text\":\"Context engineering vs prompt engineering\",\"level\":2},\"tunes\":{}},{\"id\":\"prompt-comparison\",\"type\":\"comparison\",\"data\":{\"title\":\"Prompt engineering and context engineering solve different layers\",\"layout\":\"table\",\"columns\":[{\"id\":\"prompt\",\"label\":\"Prompt engineering\"},{\"id\":\"context\",\"label\":\"Context engineering\"}],\"rows\":[{\"id\":\"focus\",\"label\":\"Primary focus\",\"values\":[\"\",\"\"]},{\"id\":\"scope\",\"label\":\"Typical scope\",\"values\":[\"\",\"\"]},{\"id\":\"timing\",\"label\":\"When it changes\",\"values\":[\"\",\"\"]},{\"id\":\"failure\",\"label\":\"Typical failure\",\"values\":[\"\",\"\"]},{\"id\":\"relationship\",\"label\":\"Relationship\",\"values\":[\"\",\"\"]}]},\"tunes\":{}},{\"id\":\"p-prompt-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Anthropic explicitly describes context engineering as the natural progression of prompt engineering for systems in which the model must work with tools, external data, message history and long-running agent state. The practical distinction is useful because a perfectly written prompt cannot compensate for missing authoritative data or a context polluted by contradictory state.\"},\"tunes\":{}},{\"id\":\"h-retrieval\",\"type\":\"header\",\"data\":{\"text\":\"Context engineering vs retrieval\",\"level\":2},\"tunes\":{}},{\"id\":\"p-ret-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Retrieval selects candidate information from an external corpus or source. Context engineering decides what happens after and around that retrieval.\"},\"tunes\":{}},{\"id\":\"p-ret-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"The retriever may return 30 passages. A reranker may reduce them to 10. The context layer may select four passages, remove duplicates, attach source\u002Fversion metadata, combine them with current application state and place them after the system instructions.\"},\"tunes\":{}},{\"id\":\"p-ret-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"This is why a RAG system can retrieve the correct passage and still answer badly: the failure may occur during context assembly rather than retrieval.\"},\"tunes\":{}},{\"id\":\"retrieval-boundary\",\"type\":\"callout\",\"data\":{\"variant\":\"success\",\"title\":\"Retrieval finds candidates; context engineering constructs the model input\",\"body\":\"The correct retrieval result is only useful if it survives filtering, ordering, compression and token-budget decisions and actually reaches the model in a usable form.\"},\"tunes\":{}},{\"id\":\"h-memory\",\"type\":\"header\",\"data\":{\"text\":\"Context engineering vs memory\",\"level\":2},\"tunes\":{}},{\"id\":\"p-memory-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Memory is information preserved outside the immediate model invocation so it can be used again later. Context is the information actually loaded into the current invocation.\"},\"tunes\":{}},{\"id\":\"p-memory-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"A memory system may contain thousands of facts, notes or prior decisions. Context engineering selects which of those should be reintroduced for the current task. Loading all memory on every turn defeats the purpose of having an external memory layer.\"},\"tunes\":{}},{\"id\":\"p-memory-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"The distinction becomes crucial for volatile state. A remembered project status or user preference can be useful, but current authoritative state may need to be re-read before a consequential decision.\"},\"tunes\":{}},{\"id\":\"ref-memory\",\"type\":\"referralArticle\",\"data\":{\"url\":\"https:\u002F\u002Fstajic.de\u002Fblog\u002Fai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context\",\"title\":\"AI Agent Memory Is Not RAG: How to Separate Memory, Retrieval, State and Context\",\"excerpt\":\"A practical architecture separating what persists, what is authoritative now, what is retrieved and what the model actually receives.\",\"ctaLabel\":\"Read the memory architecture article\"},\"tunes\":{}},{\"id\":\"h-state\",\"type\":\"header\",\"data\":{\"text\":\"Context engineering vs application state\",\"level\":2},\"tunes\":{}},{\"id\":\"p-state-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Application state is the current condition of the outside system: account balance, ticket status, file version, workflow stage, deployment state or task progress.\"},\"tunes\":{}},{\"id\":\"p-state-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"State can be summarized into context, but the summary is not the state itself. For consequential operations, the runtime may need to re-read the authoritative system immediately before the action rather than trust an earlier model-visible snapshot.\"},\"tunes\":{}},{\"id\":\"state-rule\",\"type\":\"callout\",\"data\":{\"variant\":\"warning\",\"title\":\"Context is a snapshot\",\"body\":\"Once state is copied into a prompt, it can become stale. Context engineering must define when volatile state needs refreshing and which operations require a new authoritative read.\"},\"tunes\":{}},{\"id\":\"h-tools\",\"type\":\"header\",\"data\":{\"text\":\"Tool design is part of context engineering\",\"level\":2},\"tunes\":{}},{\"id\":\"p-tools-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Tools do more than give agents capabilities. Tool names, descriptions, schemas and results become model-visible information that shapes decisions.\"},\"tunes\":{}},{\"id\":\"p-tools-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Anthropic's current context-engineering guidance emphasizes token-efficient tools and warns against bloated tool sets with overlapping functionality. A tool catalog that is difficult for a human to distinguish is also difficult for a model to route reliably.\"},\"tunes\":{}},{\"id\":\"p-tools-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"Tool outputs also need context discipline. Returning an entire 20,000-line log when the agent requested one error condition consumes attention and can bury the decisive evidence.\"},\"tunes\":{}},{\"id\":\"h-jit\",\"type\":\"header\",\"data\":{\"text\":\"Just-in-time context vs preloaded context\",\"level\":2},\"tunes\":{}},{\"id\":\"jit-comparison\",\"type\":\"comparison\",\"data\":{\"title\":\"Two ways to supply information\",\"layout\":\"table\",\"columns\":[{\"id\":\"preload\",\"label\":\"Preloaded context\"},{\"id\":\"jit\",\"label\":\"Just-in-time context\"}],\"rows\":[{\"id\":\"method\",\"label\":\"Method\",\"values\":[\"\",\"\"]},{\"id\":\"strength\",\"label\":\"Strength\",\"values\":[\"\",\"\"]},{\"id\":\"risk\",\"label\":\"Risk\",\"values\":[\"\",\"\"]},{\"id\":\"best\",\"label\":\"Useful when\",\"values\":[\"\",\"\"]}]},\"tunes\":{}},{\"id\":\"p-jit-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Anthropic describes a hybrid pattern in which some stable context is preloaded while agents retrieve additional information at runtime. This is a useful architecture pattern because not every important fact deserves permanent residency in the context window.\"},\"tunes\":{}},{\"id\":\"h-budget\",\"type\":\"header\",\"data\":{\"text\":\"Context is a budget, not a storage system\",\"level\":2},\"tunes\":{}},{\"id\":\"p-budget-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"A context window defines capacity. It does not guarantee that every token will be used equally well. The model must distribute attention across instructions, history, evidence, tools and intermediate state.\"},\"tunes\":{}},{\"id\":\"p-budget-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"The practical objective is therefore not “fill the window.” It is to maximize the utility of the limited attention budget.\"},\"tunes\":{}},{\"id\":\"p-budget-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"Anthropic formulates a similar principle as finding the smallest high-signal set of tokens that maximizes the probability of the desired behavior. OpenAI's context-management guidance likewise warns that uncurated history, redundant tool results and noisy retrieval can overwhelm even large windows.\"},\"tunes\":{}},{\"id\":\"h-more\",\"type\":\"header\",\"data\":{\"text\":\"Why more context can be worse\",\"level\":2},\"tunes\":{}},{\"id\":\"p-more-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Additional context can introduce irrelevant information, stale state, duplicate evidence, contradictory instructions or positional competition. It can also cause compaction systems to discard details that later become important.\"},\"tunes\":{}},{\"id\":\"p-more-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"The classic Lost in the Middle study demonstrated that long-context models can use information differently depending on where relevant content appears, with performance often degrading when decisive information is placed in the middle of long inputs.\"},\"tunes\":{}},{\"id\":\"p-more-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"This does not mean long context is inherently bad. It means availability inside the window is not the same as reliable utilization.\"},\"tunes\":{}},{\"id\":\"h-order\",\"type\":\"header\",\"data\":{\"text\":\"Context ordering should be intentional\",\"level\":2},\"tunes\":{}},{\"id\":\"p-order-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context construction is also an ordering problem. Critical instructions, current state, decisive evidence and task-specific constraints should not be concatenated arbitrarily.\"},\"tunes\":{}},{\"id\":\"p-order-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"There is no universal perfect ordering for every model and task. The architecture should therefore test whether reordering evidence changes correctness and whether important information remains robust across realistic context variations.\"},\"tunes\":{}},{\"id\":\"p-order-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"A stable answer that changes dramatically when two equally valid passages swap positions indicates context sensitivity that should be measured rather than ignored.\"},\"tunes\":{}},{\"id\":\"h-conflict\",\"type\":\"header\",\"data\":{\"text\":\"Conflicting context needs explicit precedence\",\"level\":2},\"tunes\":{}},{\"id\":\"p-conflict-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"A model may receive an old policy and a new policy, a remembered preference and a current explicit instruction, or a cached status and a live API result. The system should not expect the model to infer precedence from prose style.\"},\"tunes\":{}},{\"id\":\"p-conflict-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context engineering should encode precedence through source selection, metadata, ordering or explicit instructions: current authoritative state overrides stale copies; explicit current user instruction overrides older inferred preference; approved policy supersedes obsolete drafts.\"},\"tunes\":{}},{\"id\":\"conflict-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Conflict\",\"Preferred context rule\"],[\"Current state vs remembered state\",\"Refresh and prefer the authoritative current source.\"],[\"Current policy vs superseded policy\",\"Include current version; keep old version only when historical comparison is required.\"],[\"Explicit user instruction vs old inferred preference\",\"Prefer the current explicit instruction.\"],[\"Primary source vs secondary summary\",\"Use primary source for claims that require authority; summary may support explanation.\"],[\"Tool observation vs model prior\",\"Prefer current observed state when the tool is authoritative for that fact.\"],[\"Two unresolved authoritative sources\",\"Expose the conflict rather than fabricating one consistent answer.\"]]},\"tunes\":{}},{\"id\":\"h-compaction\",\"type\":\"header\",\"data\":{\"text\":\"Compaction is context transformation, not lossless storage\",\"level\":2},\"tunes\":{}},{\"id\":\"p-comp-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Long-running systems eventually need to trim, summarize or compact history. Compaction creates a new representation of prior context so the agent can continue without replaying every token.\"},\"tunes\":{}},{\"id\":\"p-comp-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"OpenAI's context-management examples use trimming and compression for long-running sessions. Anthropic describes compaction as a primary technique for maintaining coherence when an interaction approaches the context limit.\"},\"tunes\":{}},{\"id\":\"p-comp-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"The difficult part is deciding what cannot be safely removed: unresolved tasks, identifiers, user constraints, security boundaries, architecture decisions, exceptions, source provenance and the conditions that make a previous conclusion valid.\"},\"tunes\":{}},{\"id\":\"compaction-rule\",\"type\":\"callout\",\"data\":{\"variant\":\"warning\",\"title\":\"A summary can preserve the conclusion and destroy the reason\",\"body\":\"If compaction keeps “use approach X” but discards why X was chosen, which version was tested or what condition would invalidate it, later responses can remain internally consistent while becoming externally wrong.\"},\"tunes\":{}},{\"id\":\"h-validity\",\"type\":\"header\",\"data\":{\"text\":\"Preserve validity boundaries\",\"level\":2},\"tunes\":{}},{\"id\":\"p-validity-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Important conclusions should carry the conditions under which they remain supported: version, date, scope, assumptions, source authority and unresolved disagreement.\"},\"tunes\":{}},{\"id\":\"p-validity-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context engineering is therefore connected to the Answer Validity Boundary. The context assembler should not strip away the metadata that determines whether evidence still applies.\"},\"tunes\":{}},{\"id\":\"ref-avb\",\"type\":\"referralArticle\",\"data\":{\"url\":\"https:\u002F\u002Fstajic.de\u002Fblog\u002Fthe-answer-validity-boundary-the-missing-layer-between-relevance-and-reliable-ai-answers\",\"title\":\"The Answer Validity Boundary: The Missing Layer Between Relevance and Reliable AI Answers\",\"excerpt\":\"A framework for preserving the scope, assumptions, versions and evidence conditions under which an AI claim remains supported.\",\"ctaLabel\":\"Read the Answer Validity Boundary\"},\"tunes\":{}},{\"id\":\"h-security\",\"type\":\"header\",\"data\":{\"text\":\"Context engineering is also a security boundary\",\"level\":2},\"tunes\":{}},{\"id\":\"p-sec-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Data that reaches the model has crossed an important system boundary. Context assembly must therefore respect authorization, tenant isolation, confidentiality and data-minimization rules.\"},\"tunes\":{}},{\"id\":\"p-sec-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"A retriever may technically find a passage the current user cannot access. The correct design is to prevent that passage from entering model context rather than rely on the model to ignore it.\"},\"tunes\":{}},{\"id\":\"p-sec-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"Tool outputs can also contain untrusted instructions or adversarial content. Context engineering should preserve the distinction between application instructions and external data so retrieved text cannot silently acquire instruction authority.\"},\"tunes\":{}},{\"id\":\"h-architecture\",\"type\":\"header\",\"data\":{\"text\":\"A practical context-engineering architecture\",\"level\":2},\"tunes\":{}},{\"id\":\"arch-note\",\"type\":\"callout\",\"data\":{\"variant\":\"note\",\"title\":\"Proposed architecture model\",\"body\":\"The following layers are a practical synthesis for production systems, not a formal industry standard. The purpose is to keep information ownership separate from the temporary model-facing context.\"},\"tunes\":{}},{\"id\":\"arch-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Layer\",\"Responsibility\"],[\"Authoritative systems\",\"Own current business\u002Fsystem state and official records.\"],[\"Knowledge sources\",\"Own documents, policies, specifications, research or external evidence.\"],[\"Memory store\",\"Preserves selected information across turns or sessions.\"],[\"Retrieval layer\",\"Locates task-relevant candidates from external sources.\"],[\"Tool\u002Fruntime layer\",\"Reads state, performs actions and returns observations.\"],[\"Context assembler\",\"Selects, filters, deduplicates, orders and formats model-visible information.\"],[\"Model\",\"Reasons and generates over the assembled context.\"],[\"Validation\u002Fevaluation\",\"Checks whether selected context and resulting output satisfy task-specific requirements.\"]]},\"tunes\":{}},{\"id\":\"p-arch-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"The context assembler is conceptually important even when no module has that exact name. In a small application it may be ordinary application code. In a large agent platform it may combine session management, retrieval, memory, tool middleware, compaction and policy enforcement.\"},\"tunes\":{}},{\"id\":\"h-policy\",\"type\":\"header\",\"data\":{\"text\":\"A practical context construction policy\",\"level\":2},\"tunes\":{}},{\"id\":\"policy-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Rule\",\"Why it matters\"],[\"Start from the current task\",\"Do not carry information merely because it existed earlier.\"],[\"Re-read volatile state\",\"Memory and old context can be stale.\"],[\"Retrieve just enough evidence\",\"Large candidate sets can dilute decisive information.\"],[\"Preserve source metadata\",\"Version, date and authority determine whether evidence still applies.\"],[\"Remove duplicate content\",\"Redundancy consumes tokens without adding information.\"],[\"Prefer structured summaries for large tool output\",\"Expose decisive fields instead of raw noise where fidelity permits.\"],[\"Keep rules with exceptions\",\"Separating a rule from its exception creates false certainty.\"],[\"Make precedence explicit\",\"Do not ask the model to infer which conflicting source wins.\"],[\"Keep durable state outside context\",\"Context is temporary working memory, not the database.\"],[\"Compact with retention tests\",\"Verify that identifiers, constraints, provenance and unresolved state survive.\"],[\"Measure order sensitivity\",\"Correctness should not depend accidentally on arbitrary document ordering.\"],[\"Evaluate context separately from model quality\",\"A stronger model cannot compensate reliably for missing or unauthorized evidence.\"]]},\"tunes\":{}},{\"id\":\"h-eval\",\"type\":\"header\",\"data\":{\"text\":\"How to evaluate context engineering\",\"level\":2},\"tunes\":{}},{\"id\":\"eval-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Property\",\"Question\",\"Example test\"],[\"Sufficiency\",\"Does the context contain everything required to solve the task?\",\"Remove one evidence item and observe whether the answer becomes unsupported.\"],[\"Relevance\",\"How much context is unnecessary for the task?\",\"Measure quality as irrelevant passages are added or removed.\"],[\"Authority\",\"Are decisive claims grounded in the correct source class?\",\"Inject a more fluent but non-authoritative conflicting source.\"],[\"Freshness\",\"Does current state override stale copies?\",\"Change authoritative state after a previous turn and rerun.\"],[\"Position robustness\",\"Does answer quality depend strongly on evidence position?\",\"Randomize candidate ordering across repeated trials.\"],[\"Conflict handling\",\"Does the model follow explicit precedence rules?\",\"Present old and new state together.\"],[\"Compaction retention\",\"Does summarization preserve constraints and validity boundaries?\",\"Compare pre\u002Fpost-compaction task performance.\"],[\"Token efficiency\",\"Does extra context improve quality enough to justify latency\u002Fcost?\",\"Run controlled context-size ablations.\"],[\"Security\",\"Can unauthorized or adversarial content enter model context?\",\"Test tenant, permission and prompt-injection boundaries.\"]]},\"tunes\":{}},{\"id\":\"h-rag-diagnostic\",\"type\":\"header\",\"data\":{\"text\":\"Context assembly is a distinct RAG failure layer\",\"level\":2},\"tunes\":{}},{\"id\":\"p-ragdiag-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"A RAG pipeline can succeed at retrieval and still fail downstream. The relevant source may appear at rank 2, yet the context assembler can drop it, truncate it, combine it with stale contradictory material or exceed the token budget.\"},\"tunes\":{}},{\"id\":\"p-ragdiag-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"This is why retrieval traces should be compared with the actual context sent to the model. Without that comparison, context failures are easily misdiagnosed as embedding or model failures.\"},\"tunes\":{}},{\"id\":\"ref-ragfail\",\"type\":\"referralArticle\",\"data\":{\"url\":\"https:\u002F\u002Fstajic.de\u002Fblog\u002Frag-failed-but-which-layer-actually-failed-a-diagnostic-method\",\"title\":\"RAG Failed — But Which Layer Actually Failed? A Diagnostic Method\",\"excerpt\":\"A layer-by-layer approach to separating source coverage, retrieval, ranking, context assembly, generation, evidence attribution and freshness failures.\",\"ctaLabel\":\"Read the RAG diagnostic method\"},\"tunes\":{}},{\"id\":\"h-implementation\",\"type\":\"header\",\"data\":{\"text\":\"Original implementation evidence\",\"level\":2},\"tunes\":{}},{\"id\":\"h-sot-engine\",\"type\":\"header\",\"data\":{\"text\":\"Source of Truth Research Engine: bounded research instead of unlimited context\",\"level\":3},\"tunes\":{}},{\"id\":\"p-sot-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"The Source of Truth Research Engine separates discovery, acquisition, extraction, verification, contradiction analysis and synthesis into bounded research stages instead of sending one huge research task and all accumulated material into a single model call.\"},\"tunes\":{}},{\"id\":\"p-sot-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Its evidence model stores Sources, Artifacts, Claims, Relations, Contradictions and provenance outside the model context. The model can receive the subset needed for the current research step while durable evidence remains in the external store.\"},\"tunes\":{}},{\"id\":\"p-sot-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"That is a concrete context-engineering pattern: durable research state lives outside the model window; the active model context is reconstructed for the current stage.\"},\"tunes\":{}},{\"id\":\"h-ai-client\",\"type\":\"header\",\"data\":{\"text\":\"Aaasaasa AI Client: runtime, permissions and context are separate concerns\",\"level\":3},\"tunes\":{}},{\"id\":\"p-client-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Aaasaasa AI Client separates provider\u002Fmodel selection, runtime location, workspace permissions, local resources and tool access. This prevents the model context from becoming the owner of authorization or application state.\"},\"tunes\":{}},{\"id\":\"p-client-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Direct Chat and agentic runtimes can have different tool capabilities. Workspace permission profiles are enforced by the runtime rather than merely described in natural-language context. This distinction is important: context can tell a model what it should do, while the runtime must still enforce what it is actually allowed to do.\"},\"tunes\":{}},{\"id\":\"p-client-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"The implementation evidence here is architectural separation, not a claim that every advanced context-management technique described in this article is already implemented.\"},\"tunes\":{}},{\"id\":\"impl-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Implementation pattern\",\"Context-engineering lesson\"],[\"External evidence store\",\"Durable knowledge does not need to remain in the model window.\"],[\"Bounded research stages\",\"Different steps can receive different context instead of accumulating one giant history.\"],[\"Claims + provenance outside context\",\"Evidence identity survives beyond temporary inference state.\"],[\"Runtime-enforced permissions\",\"Security authority does not depend on the model remembering an instruction.\"],[\"Separate local\u002Fprovider\u002Fmodel\u002Fruntime concepts\",\"Context is only one layer of the wider AI application architecture.\"]]},\"tunes\":{}},{\"id\":\"impl-boundary\",\"type\":\"callout\",\"data\":{\"variant\":\"note\",\"title\":\"Evidence boundary\",\"body\":\"These implementations support the architectural separation between durable state, retrieval, runtime controls and model-facing context. They are not presented as benchmark proof that one context strategy is universally optimal.\"},\"tunes\":{}},{\"id\":\"h-failures\",\"type\":\"header\",\"data\":{\"text\":\"Common context-engineering failure modes\",\"level\":2},\"tunes\":{}},{\"id\":\"failure-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Failure mode\",\"What goes wrong\"],[\"Replay the entire conversation forever\",\"Old assumptions, repetition and token growth overwhelm current intent.\"],[\"Put every retrieved result into the prompt\",\"Noise, duplication and conflicting versions dilute decisive evidence.\"],[\"Use memory as current state\",\"Stale information silently replaces authoritative live state.\"],[\"Return raw tool output\",\"Large logs or responses consume attention without adding decision value.\"],[\"Hide tool descriptions behind vague names\",\"The model cannot reliably decide which capability to use.\"],[\"Compact without retention tests\",\"Critical constraints, identifiers or exceptions disappear.\"],[\"Mix instructions and untrusted data\",\"External content can be interpreted as higher-authority instruction.\"],[\"Use one static context template for every task\",\"Different tasks receive irrelevant information and miss task-specific evidence.\"],[\"Ignore source version\u002Fdate\",\"Stale but relevant evidence can dominate current authoritative state.\"],[\"Treat a larger context window as a quality guarantee\",\"Capacity increases while attention and conflict problems remain.\"]]},\"tunes\":{}},{\"id\":\"h-misconceptions\",\"type\":\"header\",\"data\":{\"text\":\"Common misconceptions\",\"level\":2},\"tunes\":{}},{\"id\":\"misconceptions-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Misconception\",\"Correction\"],[\"“Context engineering is just prompt engineering with a new name.”\",\"Prompts are one component; context engineering also covers retrieval, memory, state, tool results, history and compaction.\"],[\"“Context means chat history.”\",\"History is only one possible context source.\"],[\"“More context is always better.”\",\"Additional information can reduce signal, introduce conflicts and increase cost.\"],[\"“If retrieval found it, the model saw it.”\",\"Retrieved candidates can be filtered, truncated or omitted before inference.\"],[\"“Long context removes the need for RAG.”\",\"Large windows increase capacity but do not solve freshness, authority, permissions or dynamic retrieval.\"],[\"“Memory should always be loaded.”\",\"Memory should be selected according to the current task.\"],[\"“A summary preserves everything important.”\",\"Compaction is lossy unless explicitly evaluated for retention.\"],[\"“Instructions can enforce permissions.”\",\"Authorization must be enforced by runtime\u002Fapplication controls, not only by context.\"],[\"“One context recipe works for every model.”\",\"Context sensitivity varies by model, task, corpus and runtime.\"],[\"“Context engineering is only for agents.”\",\"Agents amplify the need, but ordinary RAG and conversational applications also require context construction.\"]]},\"tunes\":{}},{\"id\":\"h-sequence\",\"type\":\"header\",\"data\":{\"text\":\"A practical context-engineering sequence\",\"level\":2},\"tunes\":{}},{\"id\":\"design-sequence\",\"type\":\"processFlow\",\"data\":{\"title\":\"Construct context from the current decision backward\",\"orientation\":\"auto\",\"steps\":[{\"label\":\"1. Define the next model decision\",\"description\":\"Specify what the model must answer, classify, plan or choose at this step.\"},{\"label\":\"2. Identify required facts and constraints\",\"description\":\"List the minimum state, rules, evidence and instructions that can materially change the result.\"},{\"label\":\"3. Resolve authority and permissions\",\"description\":\"Determine which sources are current, authoritative and accessible to the current principal.\"},{\"label\":\"4. Retrieve or read on demand\",\"description\":\"Acquire the necessary evidence and volatile state rather than relying on stale context.\"},{\"label\":\"5. Reduce noise\",\"description\":\"Deduplicate, summarize or select passages without discarding decisive exceptions or provenance.\"},{\"label\":\"6. Structure and order\",\"description\":\"Make instructions, current state, evidence and tool observations distinguishable.\"},{\"label\":\"7. Fit the token budget\",\"description\":\"Prefer high-signal context and move durable information outside the window.\"},{\"label\":\"8. Run the model\",\"description\":\"Execute inference over the assembled context.\"},{\"label\":\"9. Observe failures\",\"description\":\"Capture whether the problem came from missing, stale, noisy, conflicting or poorly ordered context.\"},{\"label\":\"10. Re-evaluate after model\u002Fruntime changes\",\"description\":\"A context strategy is only valid for the models, tools and workloads on which it was tested.\"}]},\"tunes\":{}},{\"id\":\"h-checklist\",\"type\":\"header\",\"data\":{\"text\":\"Context-engineering checklist\",\"level\":2},\"tunes\":{}},{\"id\":\"checklist-table\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Question\",\"Expected answer\"],[\"What exact decision will the model make next?\",\"A bounded task, not a vague long-term objective.\"],[\"Which information can materially change that decision?\",\"Explicit minimum evidence\u002Fstate set.\"],[\"Which data is authoritative now?\",\"Current source\u002Fversion and freshness rule.\"],[\"Which data is optional background?\",\"Separated from decisive evidence.\"],[\"What must not enter context?\",\"Unauthorized, unnecessary or overly sensitive data.\"],[\"Which memory items are relevant?\",\"Selected by task, not replayed automatically.\"],[\"Which tool outputs should be reduced?\",\"Large responses are transformed into decision-relevant form.\"],[\"Which constraints must survive compaction?\",\"Identifiers, exceptions, obligations, unresolved state and provenance.\"],[\"How is precedence represented?\",\"Current\u002Fauthoritative information can reliably override stale or weaker sources.\"],[\"How will you know context failed?\",\"Context-specific evals and traces exist.\"],[\"Can the answer be reproduced?\",\"Model input or reconstructable context trace is available where appropriate.\"],[\"Can a stronger or larger model change the strategy?\",\"Context policy is version-aware and reevaluated empirically.\"]]},\"tunes\":{}},{\"id\":\"h-edge\",\"type\":\"header\",\"data\":{\"text\":\"Edge cases and limitations\",\"level\":2},\"tunes\":{}},{\"id\":\"p-edge-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Some tasks are simple enough that context engineering reduces to a short system prompt and one user message. Adding retrieval, memory and compaction would only introduce unnecessary architecture.\"},\"tunes\":{}},{\"id\":\"p-edge-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Some tasks require high recall and may intentionally include more context before later synthesis. Research, discovery and legal review can prefer omission avoidance over minimal token count.\"},\"tunes\":{}},{\"id\":\"p-edge-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"Some information should never be summarized before use. Exact contracts, code, cryptographic material, numerical records and regulatory text may require verbatim or structured retrieval where compression could alter meaning.\"},\"tunes\":{}},{\"id\":\"p-edge-4\",\"type\":\"paragraph\",\"data\":{\"text\":\"Long-context behavior varies substantially between models. A strategy validated on one model, context length or tool harness should not automatically be transferred to another.\"},\"tunes\":{}},{\"id\":\"p-edge-5\",\"type\":\"paragraph\",\"data\":{\"text\":\"The model can still ignore or misinterpret excellent context. Context engineering improves the information environment; it does not guarantee reasoning correctness.\"},\"tunes\":{}},{\"id\":\"h-change\",\"type\":\"header\",\"data\":{\"text\":\"What would change this answer?\",\"level\":2},\"tunes\":{}},{\"id\":\"p-change-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Future models may become more robust to long context, positional effects and conflicting information. That could reduce the amount of manual curation required.\"},\"tunes\":{}},{\"id\":\"p-change-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"The architectural distinction would still remain useful because permissions, freshness, memory persistence, source authority and external application state exist outside the model regardless of context-window size.\"},\"tunes\":{}},{\"id\":\"p-change-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"The recommended balance between preloaded and just-in-time context also changes with latency requirements, tool reliability, corpus size, model cost and how dynamic the underlying information is.\"},\"tunes\":{}},{\"id\":\"h-related\",\"type\":\"header\",\"data\":{\"text\":\"Related canonical knowledge\",\"level\":2},\"tunes\":{}},{\"id\":\"p-related-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context engineering sits between retrieval and generation. RAG explains how external knowledge is retrieved; R01 separates embeddings, vector search and reranking; context engineering explains what eventually reaches the model.\"},\"tunes\":{}},{\"id\":\"ref-rag\",\"type\":\"referralArticle\",\"data\":{\"url\":\"https:\u002F\u002Fstajic.de\u002Fblog\u002Fwhat-is-rag-the-simplest-explanation-of-how-it-works\",\"title\":\"What Is RAG? The Simplest Explanation of How It Works\",\"excerpt\":\"The retrieval foundation for understanding how external knowledge can be supplied to a model before generation.\",\"ctaLabel\":\"Read the RAG foundation\"},\"tunes\":{}},{\"id\":\"p-related-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"Source-of-Truth architecture answers a different question: not which information is present in context, but which source is authorized to establish a claim.\"},\"tunes\":{}},{\"id\":\"p-related-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"The existing article Why More Context Can Make AI Answers Worse is the diagnostic companion to this canonical definition. It focuses on context pollution, position effects, top-k growth, compaction loss and answer degradation rather than redefining context engineering itself.\"},\"tunes\":{}},{\"id\":\"h-faq\",\"type\":\"header\",\"data\":{\"text\":\"Frequently asked questions\",\"level\":2},\"tunes\":{}},{\"id\":\"faq\",\"type\":\"faq\",\"data\":{\"title\":\"Context engineering FAQ\",\"items\":[{\"id\":\"faq1\",\"question\":\"What is context engineering?\",\"answer\":\"Context engineering is the design and runtime management of what information a language model receives at inference time, including instructions, history, retrieved evidence, memory, state, tools and tool results.\"},{\"id\":\"faq2\",\"question\":\"How is context engineering different from prompt engineering?\",\"answer\":\"Prompt engineering focuses on how instructions and examples are written. Context engineering includes prompts but also decides which external information, state, history, memory and tool observations are placed around them.\"},{\"id\":\"faq3\",\"question\":\"Is RAG the same as context engineering?\",\"answer\":\"No. RAG retrieves external information. Context engineering decides how retrieved information is filtered, combined with other state and actually delivered to the model.\"},{\"id\":\"faq4\",\"question\":\"Is memory the same as context?\",\"answer\":\"No. Memory persists information outside the current model call. Context is the subset of information loaded into the current inference.\"},{\"id\":\"faq5\",\"question\":\"Why can more context make an answer worse?\",\"answer\":\"Additional context can introduce noise, stale state, conflicting evidence, duplication and positional competition. Large context capacity does not guarantee equally reliable use of every token.\"},{\"id\":\"faq6\",\"question\":\"What is context compaction?\",\"answer\":\"Compaction summarizes or transforms accumulated history into a smaller representation so a long-running system can continue without replaying every prior token.\"},{\"id\":\"faq7\",\"question\":\"Should current application state be stored in context?\",\"answer\":\"It can be represented in context for reasoning, but consequential operations should often re-read the authoritative source because context snapshots can become stale.\"},{\"id\":\"faq8\",\"question\":\"Is context engineering only needed for AI agents?\",\"answer\":\"No. Agents make context management more dynamic, but RAG systems, assistants, copilots and multi-turn applications also need deliberate context construction.\"}]},\"tunes\":{}},{\"id\":\"h-glossary\",\"type\":\"header\",\"data\":{\"text\":\"Glossary\",\"level\":2},\"tunes\":{}},{\"id\":\"glossary\",\"type\":\"glossary\",\"data\":{\"title\":\"Key context-engineering terms\",\"entries\":[{\"term\":\"Context engineering\",\"definition\":\"The design and runtime management of the information supplied to a language model for a particular inference step.\",\"anchor\":\"context-engineering\"},{\"term\":\"Context window\",\"definition\":\"The model's finite token capacity for the input and, depending on the model interface, associated generated tokens or active sequence.\",\"anchor\":\"context-window\"},{\"term\":\"Prompt engineering\",\"definition\":\"The design of instructions, examples and prompt structure intended to elicit useful model behavior.\",\"anchor\":\"prompt-engineering\"},{\"term\":\"Context assembly\",\"definition\":\"The process of selecting, filtering, ordering and formatting model-visible information before inference.\",\"anchor\":\"context-assembly\"},{\"term\":\"Just-in-time retrieval\",\"definition\":\"Loading information dynamically when the current task requires it instead of preloading all potentially relevant data.\",\"anchor\":\"just-in-time-retrieval\"},{\"term\":\"Compaction\",\"definition\":\"Reducing accumulated context into a smaller representation while attempting to preserve information needed for future steps.\",\"anchor\":\"compaction\"},{\"term\":\"Context pollution\",\"definition\":\"Degradation caused by irrelevant, stale, contradictory or redundant information occupying the model's working context.\",\"anchor\":\"context-pollution\"},{\"term\":\"Application state\",\"definition\":\"The current authoritative condition of the external system, workflow or domain that exists independently of the model context.\",\"anchor\":\"application-state\"},{\"term\":\"Memory\",\"definition\":\"Information stored outside the immediate model invocation for possible use in later turns or sessions.\",\"anchor\":\"memory\"},{\"term\":\"Retrieved context\",\"definition\":\"External information selected by a retrieval system and made available, wholly or partly, to the model.\",\"anchor\":\"retrieved-context\"},{\"term\":\"Position robustness\",\"definition\":\"The degree to which model correctness remains stable when the location or order of relevant context changes.\",\"anchor\":\"position-robustness\"},{\"term\":\"Validity boundary\",\"definition\":\"The scope, time, assumptions, versions and evidence conditions within which a conclusion remains supported.\",\"anchor\":\"validity-boundary\"}]},\"tunes\":{}},{\"id\":\"h-conclusion\",\"type\":\"header\",\"data\":{\"text\":\"Conclusion\",\"level\":2},\"tunes\":{}},{\"id\":\"p-conclusion-1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Context engineering is the layer that decides what the model gets to see before it answers. That makes it broader than prompting and downstream of retrieval, while remaining distinct from durable memory and authoritative application state.\"},\"tunes\":{}},{\"id\":\"p-conclusion-2\",\"type\":\"paragraph\",\"data\":{\"text\":\"A strong context architecture does not treat the context window as a database. It keeps durable state and knowledge outside the model, loads what is required for the current decision, preserves authority and provenance, removes unnecessary noise and refreshes volatile information when needed.\"},\"tunes\":{}},{\"id\":\"p-conclusion-3\",\"type\":\"paragraph\",\"data\":{\"text\":\"The practical objective is therefore not maximum context. It is minimum sufficient, high-signal, correctly authorized and validity-preserving context for the next model decision.\"},\"tunes\":{}},{\"id\":\"h-sources\",\"type\":\"header\",\"data\":{\"text\":\"Primary sources and current guidance\",\"level\":2},\"tunes\":{}},{\"id\":\"p-sources-note\",\"type\":\"paragraph\",\"data\":{\"text\":\"The sources below support the current context-engineering terminology, long-context behavior and operational context-management patterns. Project sections are explicitly implementation evidence rather than universal claims.\"},\"tunes\":{}},{\"id\":\"src-anthropic\",\"type\":\"linkTool\",\"data\":{\"link\":\"https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Feffective-context-engineering-for-ai-agents\",\"meta\":{\"image\":{\"url\":\"\"},\"title\":\"Anthropic — Effective context engineering for AI agents\",\"description\":\"Official engineering guidance defining context engineering, just-in-time retrieval, compaction, structured memory and context curation for agents.\"}},\"tunes\":{}},{\"id\":\"src-openai-session\",\"type\":\"linkTool\",\"data\":{\"link\":\"https:\u002F\u002Fdevelopers.openai.com\u002Fcookbook\u002Fexamples\u002Fagents_sdk\u002Fsession_memory\",\"meta\":{\"image\":{\"url\":\"\"},\"title\":\"OpenAI — Context Engineering: Short-Term Memory Management with Sessions\",\"description\":\"Official cookbook guidance on context management, trimming and compression for long-running agent sessions.\"}},\"tunes\":{}},{\"id\":\"src-openai-agents\",\"type\":\"linkTool\",\"data\":{\"link\":\"https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Fagents\",\"meta\":{\"image\":{\"url\":\"\"},\"title\":\"OpenAI — Agents guide\",\"description\":\"Current OpenAI developer guidance on agent runtimes, context across steps and orchestration ownership.\"}},\"tunes\":{}},{\"id\":\"src-lost-middle\",\"type\":\"linkTool\",\"data\":{\"link\":\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.03172\",\"meta\":{\"image\":{\"url\":\"\"},\"title\":\"Lost in the Middle: How Language Models Use Long Contexts\",\"description\":\"Research showing that long-context model performance can depend strongly on the position of relevant information in the input.\"}},\"tunes\":{}}],\"version\":\"2.31.6\"}",{"time":1448,"blocks":1449,"version":2457},1791480654232,[1450,1454,1459,1464,1469,1473,1477,1481,1485,1489,1493,1497,1501,1505,1531,1535,1539,1543,1547,1599,1603,1628,1632,1636,1640,1644,1648,1653,1657,1661,1665,1669,1676,1680,1684,1688,1693,1697,1701,1705,1709,1713,1735,1739,1743,1747,1751,1755,1759,1763,1767,1771,1775,1779,1783,1787,1791,1795,1799,1824,1828,1832,1836,1840,1845,1849,1853,1857,1864,1868,1872,1876,1880,1884,1889,1920,1924,1928,1971,1975,2019,2023,2027,2031,2038,2042,2046,2050,2054,2058,2062,2066,2070,2074,2096,2101,2105,2142,2146,2183,2187,2222,2226,2268,2272,2276,2280,2284,2288,2292,2296,2300,2304,2308,2312,2316,2323,2327,2331,2335,2364,2368,2405,2409,2413,2417,2421,2425,2429,2436,2443,2450],{"id":215,"data":1451,"type":218,"tunes":1453},{"text":1452},"Context engineering is the design of what information a language model receives at inference time, in what form, in what order and for how long. It is broader than prompt engineering because the model context can include system instructions, user messages, retrieved documents, tool results, memory, current application state, examples, structured data and intermediate artifacts. The goal is not to maximize the number of tokens, but to construct the smallest useful context that preserves the information, constraints and evidence needed for the current task.",{},{"id":221,"data":1455,"type":226,"tunes":1458},{"body":1456,"title":1457,"variant":225},"Prompt engineering asks \u003Cstrong>how should we instruct the model?\u003C\u002Fstrong> Context engineering asks \u003Cstrong>what should the model know right now, and how should that information be assembled?\u003C\u002Fstrong>\u003Cbr>\u003Cbr>Retrieval, memory, state management, tool design, history trimming, compaction and ordering are therefore context-engineering mechanisms when they determine the tokens available to the model before it produces the next output.","Direct answer",{},{"id":229,"data":1460,"type":226,"tunes":1463},{"body":1461,"title":1462,"variant":233},"A system can know something without placing it in the current context. It can remember something outside the model window. It can retrieve a document but later exclude it from the final prompt. The model can only directly use the context that reaches the current inference.","Context is not the same as knowledge or memory",{},{"id":236,"data":1465,"type":226,"tunes":1468},{"body":1466,"title":1467,"variant":240},"Context engineering is now established practical terminology in major AI engineering guidance, but it is not a single formal standard with one mandatory architecture. Anthropic describes it as curating and maintaining the optimal set of tokens for inference; OpenAI's current agent guidance treats session context, trimming and compression as explicit engineering concerns for long-running systems.","Current-source note — 8 October 2026",{},{"id":243,"data":1470,"type":248,"tunes":1472},{"title":1471,"maxLevel":246,"minLevel":247},"Contents",{},{"id":251,"data":1474,"type":42,"tunes":1476},{"text":1475,"level":247},"What context engineering really means",{},{"id":256,"data":1478,"type":218,"tunes":1480},{"text":1479},"Every model call is made under a temporary working environment: the current instructions, messages, retrieved evidence, tool outputs and state that fit into the active context window. Context engineering is the discipline of constructing that environment deliberately.",{},{"id":261,"data":1482,"type":218,"tunes":1484},{"text":1483},"The key word is deliberately. A naive system simply concatenates everything it has: full history, all retrieved documents, every tool response and large system prompts. A context-engineered system decides which information is required for the current decision and which information should remain outside the window until needed.",{},{"id":266,"data":1486,"type":218,"tunes":1488},{"text":1487},"This makes context engineering partly an information-architecture problem, partly a runtime problem and partly an evaluation problem. The design must decide what can enter context, where it comes from, which version is current, how conflicts are resolved, how much detail is retained and how the result is tested.",{},{"id":271,"data":1490,"type":42,"tunes":1492},{"text":1491,"level":247},"The simplest example",{},{"id":276,"data":1494,"type":218,"tunes":1496},{"text":1495},"Imagine an internal support assistant. A user asks: “Can this customer cancel without a fee?”",{},{"id":281,"data":1498,"type":218,"tunes":1500},{"text":1499},"The model might need five things: the current cancellation policy, the customer's current contract type, the effective contract date, the relevant exception rules and the user's authorization scope.",{},{"id":286,"data":1502,"type":218,"tunes":1504},{"text":1503},"It does not necessarily need the entire customer database, the full policy archive, every previous conversation or every support ticket. Context engineering is the process that selects and assembles the five useful pieces while excluding unrelated information.",{},{"id":291,"data":1506,"type":317,"tunes":1530},{"steps":1507,"title":1529,"orientation":316},[1508,1511,1514,1517,1520,1523,1526],{"label":1509,"description":1510},"1. Understand the task","Classify what the current question requires and which information types can affect the answer.",{"label":1512,"description":1513},"2. Resolve authoritative state","Read current application or business state that should not be guessed from memory.",{"label":1515,"description":1516},"3. Retrieve supporting knowledge","Find the policy, documents or external evidence relevant to the specific task.",{"label":1518,"description":1519},"4. Apply eligibility and permissions","Exclude data the current user or runtime is not allowed to expose to the model.",{"label":1521,"description":1522},"5. Reduce and structure","Remove duplication, select useful excerpts and preserve critical metadata, conditions and exceptions.",{"label":1524,"description":1525},"6. Order the context","Place instructions, current state and decisive evidence where the model can use them consistently.",{"label":1527,"description":1528},"7. Run inference","The model receives the assembled context and produces the next answer or action proposal.","From application state to model context",{},{"id":320,"data":1532,"type":42,"tunes":1534},{"text":1533,"level":247},"Where the simple example stops",{},{"id":325,"data":1536,"type":218,"tunes":1538},{"text":1537},"Real systems are more difficult because the information needed for one step may not be known before execution begins. An agent can discover new facts through tools, create intermediate files, receive changing external state or span a task longer than one context window.",{},{"id":330,"data":1540,"type":218,"tunes":1542},{"text":1541},"Context engineering therefore becomes dynamic. The context for step 12 should not simply be step 1 context plus eleven layers of accumulated output. It should reflect the current task state, the decisions that still matter and the evidence required for the next action.",{},{"id":335,"data":1544,"type":42,"tunes":1546},{"text":1545,"level":247},"What can enter a model context?",{},{"id":340,"data":1548,"type":391,"tunes":1598},{"content":1549,"stretched":43,"withHeadings":14},[1550,1554,1558,1562,1566,1570,1574,1578,1582,1586,1590,1594],[1551,1552,1553],"Context component","Purpose","Typical risk",[1555,1556,1557],"System \u002F developer instructions","Define role, constraints, policies and behavior","Too vague, contradictory or overloaded with brittle logic",[1559,1560,1561],"Current user request","Defines immediate task and intent","Ambiguity or conflict with prior history",[1563,1564,1565],"Conversation history","Preserves continuity across turns","Stale assumptions, repetition and token growth",[1567,1568,1569],"Retrieved documents","Provide external knowledge\u002Fevidence","Irrelevance, stale versions, weak authority or duplication",[1571,1572,1573],"Current application state","Supplies volatile business\u002Fsystem facts","Using cached or remembered state instead of current authority",[1575,1576,1577],"Tool definitions","Tell the model what capabilities exist and how to call them","Too many overlapping tools or verbose schemas",[1579,1580,1581],"Tool results","Bring observations from the environment into the loop","Large noisy outputs, untrusted content or obsolete observations",[1583,1584,1585],"Memory","Reintroduces selected information from previous interactions","Staleness, incorrect generalization or over-personalization",[1587,1588,1589],"Examples","Demonstrate desired behavior","Too many edge cases can crowd out the current task",[1591,1592,1593],"Intermediate artifacts","Carry plans, summaries, code, calculations or notes","Old intermediate state may be mistaken for final truth",[1595,1596,1597],"Policies \u002F guardrails","Define prohibited or constrained behavior","Conflict with business logic or hidden enforcement gaps",{},{"id":394,"data":1600,"type":42,"tunes":1602},{"text":1601,"level":247},"Context engineering vs prompt engineering",{},{"id":399,"data":1604,"type":431,"tunes":1627},{"rows":1605,"title":1621,"layout":391,"columns":1622},[1606,1609,1612,1615,1618],{"id":403,"label":1607,"values":1608},"Primary focus",[406,406],{"id":408,"label":1610,"values":1611},"Typical scope",[406,406],{"id":412,"label":1613,"values":1614},"When it changes",[406,406],{"id":416,"label":1616,"values":1617},"Typical failure",[406,406],{"id":420,"label":1619,"values":1620},"Relationship",[406,406],"Prompt engineering and context engineering solve different layers",[1623,1625],{"id":426,"label":1624},"Prompt engineering",{"id":429,"label":1626},"Context engineering",{},{"id":434,"data":1629,"type":218,"tunes":1631},{"text":1630},"Anthropic explicitly describes context engineering as the natural progression of prompt engineering for systems in which the model must work with tools, external data, message history and long-running agent state. The practical distinction is useful because a perfectly written prompt cannot compensate for missing authoritative data or a context polluted by contradictory state.",{},{"id":439,"data":1633,"type":42,"tunes":1635},{"text":1634,"level":247},"Context engineering vs retrieval",{},{"id":444,"data":1637,"type":218,"tunes":1639},{"text":1638},"Retrieval selects candidate information from an external corpus or source. Context engineering decides what happens after and around that retrieval.",{},{"id":449,"data":1641,"type":218,"tunes":1643},{"text":1642},"The retriever may return 30 passages. A reranker may reduce them to 10. The context layer may select four passages, remove duplicates, attach source\u002Fversion metadata, combine them with current application state and place them after the system instructions.",{},{"id":454,"data":1645,"type":218,"tunes":1647},{"text":1646},"This is why a RAG system can retrieve the correct passage and still answer badly: the failure may occur during context assembly rather than retrieval.",{},{"id":459,"data":1649,"type":226,"tunes":1652},{"body":1650,"title":1651,"variant":463},"The correct retrieval result is only useful if it survives filtering, ordering, compression and token-budget decisions and actually reaches the model in a usable form.","Retrieval finds candidates; context engineering constructs the model input",{},{"id":466,"data":1654,"type":42,"tunes":1656},{"text":1655,"level":247},"Context engineering vs memory",{},{"id":471,"data":1658,"type":218,"tunes":1660},{"text":1659},"Memory is information preserved outside the immediate model invocation so it can be used again later. Context is the information actually loaded into the current invocation.",{},{"id":476,"data":1662,"type":218,"tunes":1664},{"text":1663},"A memory system may contain thousands of facts, notes or prior decisions. Context engineering selects which of those should be reintroduced for the current task. Loading all memory on every turn defeats the purpose of having an external memory layer.",{},{"id":481,"data":1666,"type":218,"tunes":1668},{"text":1667},"The distinction becomes crucial for volatile state. A remembered project status or user preference can be useful, but current authoritative state may need to be re-read before a consequential decision.",{},{"id":486,"data":1670,"type":492,"tunes":1675},{"url":1671,"title":1672,"excerpt":1673,"ctaLabel":1674},"https:\u002F\u002Fstajic.de\u002Fblog\u002Fai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context","AI Agent Memory Is Not RAG: How to Separate Memory, Retrieval, State and Context","A practical architecture separating what persists, what is authoritative now, what is retrieved and what the model actually receives.","Read the memory architecture article",{},{"id":495,"data":1677,"type":42,"tunes":1679},{"text":1678,"level":247},"Context engineering vs application state",{},{"id":500,"data":1681,"type":218,"tunes":1683},{"text":1682},"Application state is the current condition of the outside system: account balance, ticket status, file version, workflow stage, deployment state or task progress.",{},{"id":505,"data":1685,"type":218,"tunes":1687},{"text":1686},"State can be summarized into context, but the summary is not the state itself. For consequential operations, the runtime may need to re-read the authoritative system immediately before the action rather than trust an earlier model-visible snapshot.",{},{"id":510,"data":1689,"type":226,"tunes":1692},{"body":1690,"title":1691,"variant":233},"Once state is copied into a prompt, it can become stale. Context engineering must define when volatile state needs refreshing and which operations require a new authoritative read.","Context is a snapshot",{},{"id":516,"data":1694,"type":42,"tunes":1696},{"text":1695,"level":247},"Tool design is part of context engineering",{},{"id":521,"data":1698,"type":218,"tunes":1700},{"text":1699},"Tools do more than give agents capabilities. Tool names, descriptions, schemas and results become model-visible information that shapes decisions.",{},{"id":526,"data":1702,"type":218,"tunes":1704},{"text":1703},"Anthropic's current context-engineering guidance emphasizes token-efficient tools and warns against bloated tool sets with overlapping functionality. A tool catalog that is difficult for a human to distinguish is also difficult for a model to route reliably.",{},{"id":531,"data":1706,"type":218,"tunes":1708},{"text":1707},"Tool outputs also need context discipline. Returning an entire 20,000-line log when the agent requested one error condition consumes attention and can bury the decisive evidence.",{},{"id":536,"data":1710,"type":42,"tunes":1712},{"text":1711,"level":247},"Just-in-time context vs preloaded context",{},{"id":541,"data":1714,"type":431,"tunes":1734},{"rows":1715,"title":1728,"layout":391,"columns":1729},[1716,1719,1722,1725],{"id":545,"label":1717,"values":1718},"Method",[406,406],{"id":549,"label":1720,"values":1721},"Strength",[406,406],{"id":553,"label":1723,"values":1724},"Risk",[406,406],{"id":557,"label":1726,"values":1727},"Useful when",[406,406],"Two ways to supply information",[1730,1732],{"id":563,"label":1731},"Preloaded context",{"id":566,"label":1733},"Just-in-time context",{},{"id":570,"data":1736,"type":218,"tunes":1738},{"text":1737},"Anthropic describes a hybrid pattern in which some stable context is preloaded while agents retrieve additional information at runtime. This is a useful architecture pattern because not every important fact deserves permanent residency in the context window.",{},{"id":575,"data":1740,"type":42,"tunes":1742},{"text":1741,"level":247},"Context is a budget, not a storage system",{},{"id":580,"data":1744,"type":218,"tunes":1746},{"text":1745},"A context window defines capacity. It does not guarantee that every token will be used equally well. The model must distribute attention across instructions, history, evidence, tools and intermediate state.",{},{"id":585,"data":1748,"type":218,"tunes":1750},{"text":1749},"The practical objective is therefore not “fill the window.” It is to maximize the utility of the limited attention budget.",{},{"id":590,"data":1752,"type":218,"tunes":1754},{"text":1753},"Anthropic formulates a similar principle as finding the smallest high-signal set of tokens that maximizes the probability of the desired behavior. OpenAI's context-management guidance likewise warns that uncurated history, redundant tool results and noisy retrieval can overwhelm even large windows.",{},{"id":595,"data":1756,"type":42,"tunes":1758},{"text":1757,"level":247},"Why more context can be worse",{},{"id":600,"data":1760,"type":218,"tunes":1762},{"text":1761},"Additional context can introduce irrelevant information, stale state, duplicate evidence, contradictory instructions or positional competition. It can also cause compaction systems to discard details that later become important.",{},{"id":605,"data":1764,"type":218,"tunes":1766},{"text":1765},"The classic Lost in the Middle study demonstrated that long-context models can use information differently depending on where relevant content appears, with performance often degrading when decisive information is placed in the middle of long inputs.",{},{"id":610,"data":1768,"type":218,"tunes":1770},{"text":1769},"This does not mean long context is inherently bad. It means availability inside the window is not the same as reliable utilization.",{},{"id":615,"data":1772,"type":42,"tunes":1774},{"text":1773,"level":247},"Context ordering should be intentional",{},{"id":620,"data":1776,"type":218,"tunes":1778},{"text":1777},"Context construction is also an ordering problem. Critical instructions, current state, decisive evidence and task-specific constraints should not be concatenated arbitrarily.",{},{"id":625,"data":1780,"type":218,"tunes":1782},{"text":1781},"There is no universal perfect ordering for every model and task. The architecture should therefore test whether reordering evidence changes correctness and whether important information remains robust across realistic context variations.",{},{"id":630,"data":1784,"type":218,"tunes":1786},{"text":1785},"A stable answer that changes dramatically when two equally valid passages swap positions indicates context sensitivity that should be measured rather than ignored.",{},{"id":635,"data":1788,"type":42,"tunes":1790},{"text":1789,"level":247},"Conflicting context needs explicit precedence",{},{"id":640,"data":1792,"type":218,"tunes":1794},{"text":1793},"A model may receive an old policy and a new policy, a remembered preference and a current explicit instruction, or a cached status and a live API result. The system should not expect the model to infer precedence from prose style.",{},{"id":645,"data":1796,"type":218,"tunes":1798},{"text":1797},"Context engineering should encode precedence through source selection, metadata, ordering or explicit instructions: current authoritative state overrides stale copies; explicit current user instruction overrides older inferred preference; approved policy supersedes obsolete drafts.",{},{"id":650,"data":1800,"type":391,"tunes":1823},{"content":1801,"stretched":43,"withHeadings":14},[1802,1805,1808,1811,1814,1817,1820],[1803,1804],"Conflict","Preferred context rule",[1806,1807],"Current state vs remembered state","Refresh and prefer the authoritative current source.",[1809,1810],"Current policy vs superseded policy","Include current version; keep old version only when historical comparison is required.",[1812,1813],"Explicit user instruction vs old inferred preference","Prefer the current explicit instruction.",[1815,1816],"Primary source vs secondary summary","Use primary source for claims that require authority; summary may support explanation.",[1818,1819],"Tool observation vs model prior","Prefer current observed state when the tool is authoritative for that fact.",[1821,1822],"Two unresolved authoritative sources","Expose the conflict rather than fabricating one consistent answer.",{},{"id":676,"data":1825,"type":42,"tunes":1827},{"text":1826,"level":247},"Compaction is context transformation, not lossless storage",{},{"id":681,"data":1829,"type":218,"tunes":1831},{"text":1830},"Long-running systems eventually need to trim, summarize or compact history. Compaction creates a new representation of prior context so the agent can continue without replaying every token.",{},{"id":686,"data":1833,"type":218,"tunes":1835},{"text":1834},"OpenAI's context-management examples use trimming and compression for long-running sessions. Anthropic describes compaction as a primary technique for maintaining coherence when an interaction approaches the context limit.",{},{"id":691,"data":1837,"type":218,"tunes":1839},{"text":1838},"The difficult part is deciding what cannot be safely removed: unresolved tasks, identifiers, user constraints, security boundaries, architecture decisions, exceptions, source provenance and the conditions that make a previous conclusion valid.",{},{"id":696,"data":1841,"type":226,"tunes":1844},{"body":1842,"title":1843,"variant":233},"If compaction keeps “use approach X” but discards why X was chosen, which version was tested or what condition would invalidate it, later responses can remain internally consistent while becoming externally wrong.","A summary can preserve the conclusion and destroy the reason",{},{"id":702,"data":1846,"type":42,"tunes":1848},{"text":1847,"level":247},"Preserve validity boundaries",{},{"id":707,"data":1850,"type":218,"tunes":1852},{"text":1851},"Important conclusions should carry the conditions under which they remain supported: version, date, scope, assumptions, source authority and unresolved disagreement.",{},{"id":712,"data":1854,"type":218,"tunes":1856},{"text":1855},"Context engineering is therefore connected to the Answer Validity Boundary. The context assembler should not strip away the metadata that determines whether evidence still applies.",{},{"id":717,"data":1858,"type":492,"tunes":1863},{"url":1859,"title":1860,"excerpt":1861,"ctaLabel":1862},"https:\u002F\u002Fstajic.de\u002Fblog\u002Fthe-answer-validity-boundary-the-missing-layer-between-relevance-and-reliable-ai-answers","The Answer Validity Boundary: The Missing Layer Between Relevance and Reliable AI Answers","A framework for preserving the scope, assumptions, versions and evidence conditions under which an AI claim remains supported.","Read the Answer Validity Boundary",{},{"id":725,"data":1865,"type":42,"tunes":1867},{"text":1866,"level":247},"Context engineering is also a security boundary",{},{"id":730,"data":1869,"type":218,"tunes":1871},{"text":1870},"Data that reaches the model has crossed an important system boundary. Context assembly must therefore respect authorization, tenant isolation, confidentiality and data-minimization rules.",{},{"id":735,"data":1873,"type":218,"tunes":1875},{"text":1874},"A retriever may technically find a passage the current user cannot access. The correct design is to prevent that passage from entering model context rather than rely on the model to ignore it.",{},{"id":740,"data":1877,"type":218,"tunes":1879},{"text":1878},"Tool outputs can also contain untrusted instructions or adversarial content. Context engineering should preserve the distinction between application instructions and external data so retrieved text cannot silently acquire instruction authority.",{},{"id":745,"data":1881,"type":42,"tunes":1883},{"text":1882,"level":247},"A practical context-engineering architecture",{},{"id":750,"data":1885,"type":226,"tunes":1888},{"body":1886,"title":1887,"variant":240},"The following layers are a practical synthesis for production systems, not a formal industry standard. The purpose is to keep information ownership separate from the temporary model-facing context.","Proposed architecture model",{},{"id":756,"data":1890,"type":391,"tunes":1919},{"content":1891,"stretched":43,"withHeadings":14},[1892,1895,1898,1901,1904,1907,1910,1913,1916],[1893,1894],"Layer","Responsibility",[1896,1897],"Authoritative systems","Own current business\u002Fsystem state and official records.",[1899,1900],"Knowledge sources","Own documents, policies, specifications, research or external evidence.",[1902,1903],"Memory store","Preserves selected information across turns or sessions.",[1905,1906],"Retrieval layer","Locates task-relevant candidates from external sources.",[1908,1909],"Tool\u002Fruntime layer","Reads state, performs actions and returns observations.",[1911,1912],"Context assembler","Selects, filters, deduplicates, orders and formats model-visible information.",[1914,1915],"Model","Reasons and generates over the assembled context.",[1917,1918],"Validation\u002Fevaluation","Checks whether selected context and resulting output satisfy task-specific requirements.",{},{"id":788,"data":1921,"type":218,"tunes":1923},{"text":1922},"The context assembler is conceptually important even when no module has that exact name. In a small application it may be ordinary application code. In a large agent platform it may combine session management, retrieval, memory, tool middleware, compaction and policy enforcement.",{},{"id":793,"data":1925,"type":42,"tunes":1927},{"text":1926,"level":247},"A practical context construction policy",{},{"id":798,"data":1929,"type":391,"tunes":1970},{"content":1930,"stretched":43,"withHeadings":14},[1931,1934,1937,1940,1943,1946,1949,1952,1955,1958,1961,1964,1967],[1932,1933],"Rule","Why it matters",[1935,1936],"Start from the current task","Do not carry information merely because it existed earlier.",[1938,1939],"Re-read volatile state","Memory and old context can be stale.",[1941,1942],"Retrieve just enough evidence","Large candidate sets can dilute decisive information.",[1944,1945],"Preserve source metadata","Version, date and authority determine whether evidence still applies.",[1947,1948],"Remove duplicate content","Redundancy consumes tokens without adding information.",[1950,1951],"Prefer structured summaries for large tool output","Expose decisive fields instead of raw noise where fidelity permits.",[1953,1954],"Keep rules with exceptions","Separating a rule from its exception creates false certainty.",[1956,1957],"Make precedence explicit","Do not ask the model to infer which conflicting source wins.",[1959,1960],"Keep durable state outside context","Context is temporary working memory, not the database.",[1962,1963],"Compact with retention tests","Verify that identifiers, constraints, provenance and unresolved state survive.",[1965,1966],"Measure order sensitivity","Correctness should not depend accidentally on arbitrary document ordering.",[1968,1969],"Evaluate context separately from model quality","A stronger model cannot compensate reliably for missing or unauthorized evidence.",{},{"id":842,"data":1972,"type":42,"tunes":1974},{"text":1973,"level":247},"How to evaluate context engineering",{},{"id":847,"data":1976,"type":391,"tunes":2018},{"content":1977,"stretched":43,"withHeadings":14},[1978,1982,1986,1990,1994,1998,2002,2006,2010,2014],[1979,1980,1981],"Property","Question","Example test",[1983,1984,1985],"Sufficiency","Does the context contain everything required to solve the task?","Remove one evidence item and observe whether the answer becomes unsupported.",[1987,1988,1989],"Relevance","How much context is unnecessary for the task?","Measure quality as irrelevant passages are added or removed.",[1991,1992,1993],"Authority","Are decisive claims grounded in the correct source class?","Inject a more fluent but non-authoritative conflicting source.",[1995,1996,1997],"Freshness","Does current state override stale copies?","Change authoritative state after a previous turn and rerun.",[1999,2000,2001],"Position robustness","Does answer quality depend strongly on evidence position?","Randomize candidate ordering across repeated trials.",[2003,2004,2005],"Conflict handling","Does the model follow explicit precedence rules?","Present old and new state together.",[2007,2008,2009],"Compaction retention","Does summarization preserve constraints and validity boundaries?","Compare pre\u002Fpost-compaction task performance.",[2011,2012,2013],"Token efficiency","Does extra context improve quality enough to justify latency\u002Fcost?","Run controlled context-size ablations.",[2015,2016,2017],"Security","Can unauthorized or adversarial content enter model context?","Test tenant, permission and prompt-injection boundaries.",{},{"id":892,"data":2020,"type":42,"tunes":2022},{"text":2021,"level":247},"Context assembly is a distinct RAG failure layer",{},{"id":897,"data":2024,"type":218,"tunes":2026},{"text":2025},"A RAG pipeline can succeed at retrieval and still fail downstream. The relevant source may appear at rank 2, yet the context assembler can drop it, truncate it, combine it with stale contradictory material or exceed the token budget.",{},{"id":902,"data":2028,"type":218,"tunes":2030},{"text":2029},"This is why retrieval traces should be compared with the actual context sent to the model. Without that comparison, context failures are easily misdiagnosed as embedding or model failures.",{},{"id":907,"data":2032,"type":492,"tunes":2037},{"url":2033,"title":2034,"excerpt":2035,"ctaLabel":2036},"https:\u002F\u002Fstajic.de\u002Fblog\u002Frag-failed-but-which-layer-actually-failed-a-diagnostic-method","RAG Failed — But Which Layer Actually Failed? A Diagnostic Method","A layer-by-layer approach to separating source coverage, retrieval, ranking, context assembly, generation, evidence attribution and freshness failures.","Read the RAG diagnostic method",{},{"id":915,"data":2039,"type":42,"tunes":2041},{"text":2040,"level":247},"Original implementation evidence",{},{"id":920,"data":2043,"type":42,"tunes":2045},{"text":2044,"level":246},"Source of Truth Research Engine: bounded research instead of unlimited context",{},{"id":925,"data":2047,"type":218,"tunes":2049},{"text":2048},"The Source of Truth Research Engine separates discovery, acquisition, extraction, verification, contradiction analysis and synthesis into bounded research stages instead of sending one huge research task and all accumulated material into a single model call.",{},{"id":930,"data":2051,"type":218,"tunes":2053},{"text":2052},"Its evidence model stores Sources, Artifacts, Claims, Relations, Contradictions and provenance outside the model context. The model can receive the subset needed for the current research step while durable evidence remains in the external store.",{},{"id":935,"data":2055,"type":218,"tunes":2057},{"text":2056},"That is a concrete context-engineering pattern: durable research state lives outside the model window; the active model context is reconstructed for the current stage.",{},{"id":940,"data":2059,"type":42,"tunes":2061},{"text":2060,"level":246},"Aaasaasa AI Client: runtime, permissions and context are separate concerns",{},{"id":945,"data":2063,"type":218,"tunes":2065},{"text":2064},"Aaasaasa AI Client separates provider\u002Fmodel selection, runtime location, workspace permissions, local resources and tool access. This prevents the model context from becoming the owner of authorization or application state.",{},{"id":950,"data":2067,"type":218,"tunes":2069},{"text":2068},"Direct Chat and agentic runtimes can have different tool capabilities. Workspace permission profiles are enforced by the runtime rather than merely described in natural-language context. This distinction is important: context can tell a model what it should do, while the runtime must still enforce what it is actually allowed to do.",{},{"id":955,"data":2071,"type":218,"tunes":2073},{"text":2072},"The implementation evidence here is architectural separation, not a claim that every advanced context-management technique described in this article is already implemented.",{},{"id":960,"data":2075,"type":391,"tunes":2095},{"content":2076,"stretched":43,"withHeadings":14},[2077,2080,2083,2086,2089,2092],[2078,2079],"Implementation pattern","Context-engineering lesson",[2081,2082],"External evidence store","Durable knowledge does not need to remain in the model window.",[2084,2085],"Bounded research stages","Different steps can receive different context instead of accumulating one giant history.",[2087,2088],"Claims + provenance outside context","Evidence identity survives beyond temporary inference state.",[2090,2091],"Runtime-enforced permissions","Security authority does not depend on the model remembering an instruction.",[2093,2094],"Separate local\u002Fprovider\u002Fmodel\u002Fruntime concepts","Context is only one layer of the wider AI application architecture.",{},{"id":983,"data":2097,"type":226,"tunes":2100},{"body":2098,"title":2099,"variant":240},"These implementations support the architectural separation between durable state, retrieval, runtime controls and model-facing context. They are not presented as benchmark proof that one context strategy is universally optimal.","Evidence boundary",{},{"id":989,"data":2102,"type":42,"tunes":2104},{"text":2103,"level":247},"Common context-engineering failure modes",{},{"id":994,"data":2106,"type":391,"tunes":2141},{"content":2107,"stretched":43,"withHeadings":14},[2108,2111,2114,2117,2120,2123,2126,2129,2132,2135,2138],[2109,2110],"Failure mode","What goes wrong",[2112,2113],"Replay the entire conversation forever","Old assumptions, repetition and token growth overwhelm current intent.",[2115,2116],"Put every retrieved result into the prompt","Noise, duplication and conflicting versions dilute decisive evidence.",[2118,2119],"Use memory as current state","Stale information silently replaces authoritative live state.",[2121,2122],"Return raw tool output","Large logs or responses consume attention without adding decision value.",[2124,2125],"Hide tool descriptions behind vague names","The model cannot reliably decide which capability to use.",[2127,2128],"Compact without retention tests","Critical constraints, identifiers or exceptions disappear.",[2130,2131],"Mix instructions and untrusted data","External content can be interpreted as higher-authority instruction.",[2133,2134],"Use one static context template for every task","Different tasks receive irrelevant information and miss task-specific evidence.",[2136,2137],"Ignore source version\u002Fdate","Stale but relevant evidence can dominate current authoritative state.",[2139,2140],"Treat a larger context window as a quality guarantee","Capacity increases while attention and conflict problems remain.",{},{"id":1032,"data":2143,"type":42,"tunes":2145},{"text":2144,"level":247},"Common misconceptions",{},{"id":1037,"data":2147,"type":391,"tunes":2182},{"content":2148,"stretched":43,"withHeadings":14},[2149,2152,2155,2158,2161,2164,2167,2170,2173,2176,2179],[2150,2151],"Misconception","Correction",[2153,2154],"“Context engineering is just prompt engineering with a new name.”","Prompts are one component; context engineering also covers retrieval, memory, state, tool results, history and compaction.",[2156,2157],"“Context means chat history.”","History is only one possible context source.",[2159,2160],"“More context is always better.”","Additional information can reduce signal, introduce conflicts and increase cost.",[2162,2163],"“If retrieval found it, the model saw it.”","Retrieved candidates can be filtered, truncated or omitted before inference.",[2165,2166],"“Long context removes the need for RAG.”","Large windows increase capacity but do not solve freshness, authority, permissions or dynamic retrieval.",[2168,2169],"“Memory should always be loaded.”","Memory should be selected according to the current task.",[2171,2172],"“A summary preserves everything important.”","Compaction is lossy unless explicitly evaluated for retention.",[2174,2175],"“Instructions can enforce permissions.”","Authorization must be enforced by runtime\u002Fapplication controls, not only by context.",[2177,2178],"“One context recipe works for every model.”","Context sensitivity varies by model, task, corpus and runtime.",[2180,2181],"“Context engineering is only for agents.”","Agents amplify the need, but ordinary RAG and conversational applications also require context construction.",{},{"id":1075,"data":2184,"type":42,"tunes":2186},{"text":2185,"level":247},"A practical context-engineering sequence",{},{"id":1080,"data":2188,"type":317,"tunes":2221},{"steps":2189,"title":2220,"orientation":316},[2190,2193,2196,2199,2202,2205,2208,2211,2214,2217],{"label":2191,"description":2192},"1. Define the next model decision","Specify what the model must answer, classify, plan or choose at this step.",{"label":2194,"description":2195},"2. Identify required facts and constraints","List the minimum state, rules, evidence and instructions that can materially change the result.",{"label":2197,"description":2198},"3. Resolve authority and permissions","Determine which sources are current, authoritative and accessible to the current principal.",{"label":2200,"description":2201},"4. Retrieve or read on demand","Acquire the necessary evidence and volatile state rather than relying on stale context.",{"label":2203,"description":2204},"5. Reduce noise","Deduplicate, summarize or select passages without discarding decisive exceptions or provenance.",{"label":2206,"description":2207},"6. Structure and order","Make instructions, current state, evidence and tool observations distinguishable.",{"label":2209,"description":2210},"7. Fit the token budget","Prefer high-signal context and move durable information outside the window.",{"label":2212,"description":2213},"8. Run the model","Execute inference over the assembled context.",{"label":2215,"description":2216},"9. Observe failures","Capture whether the problem came from missing, stale, noisy, conflicting or poorly ordered context.",{"label":2218,"description":2219},"10. Re-evaluate after model\u002Fruntime changes","A context strategy is only valid for the models, tools and workloads on which it was tested.","Construct context from the current decision backward",{},{"id":1116,"data":2223,"type":42,"tunes":2225},{"text":2224,"level":247},"Context-engineering checklist",{},{"id":1121,"data":2227,"type":391,"tunes":2267},{"content":2228,"stretched":43,"withHeadings":14},[2229,2231,2234,2237,2240,2243,2246,2249,2252,2255,2258,2261,2264],[1980,2230],"Expected answer",[2232,2233],"What exact decision will the model make next?","A bounded task, not a vague long-term objective.",[2235,2236],"Which information can materially change that decision?","Explicit minimum evidence\u002Fstate set.",[2238,2239],"Which data is authoritative now?","Current source\u002Fversion and freshness rule.",[2241,2242],"Which data is optional background?","Separated from decisive evidence.",[2244,2245],"What must not enter context?","Unauthorized, unnecessary or overly sensitive data.",[2247,2248],"Which memory items are relevant?","Selected by task, not replayed automatically.",[2250,2251],"Which tool outputs should be reduced?","Large responses are transformed into decision-relevant form.",[2253,2254],"Which constraints must survive compaction?","Identifiers, exceptions, obligations, unresolved state and provenance.",[2256,2257],"How is precedence represented?","Current\u002Fauthoritative information can reliably override stale or weaker sources.",[2259,2260],"How will you know context failed?","Context-specific evals and traces exist.",[2262,2263],"Can the answer be reproduced?","Model input or reconstructable context trace is available where appropriate.",[2265,2266],"Can a stronger or larger model change the strategy?","Context policy is version-aware and reevaluated empirically.",{},{"id":1164,"data":2269,"type":42,"tunes":2271},{"text":2270,"level":247},"Edge cases and limitations",{},{"id":1169,"data":2273,"type":218,"tunes":2275},{"text":2274},"Some tasks are simple enough that context engineering reduces to a short system prompt and one user message. Adding retrieval, memory and compaction would only introduce unnecessary architecture.",{},{"id":1174,"data":2277,"type":218,"tunes":2279},{"text":2278},"Some tasks require high recall and may intentionally include more context before later synthesis. Research, discovery and legal review can prefer omission avoidance over minimal token count.",{},{"id":1179,"data":2281,"type":218,"tunes":2283},{"text":2282},"Some information should never be summarized before use. Exact contracts, code, cryptographic material, numerical records and regulatory text may require verbatim or structured retrieval where compression could alter meaning.",{},{"id":1184,"data":2285,"type":218,"tunes":2287},{"text":2286},"Long-context behavior varies substantially between models. A strategy validated on one model, context length or tool harness should not automatically be transferred to another.",{},{"id":1189,"data":2289,"type":218,"tunes":2291},{"text":2290},"The model can still ignore or misinterpret excellent context. Context engineering improves the information environment; it does not guarantee reasoning correctness.",{},{"id":1194,"data":2293,"type":42,"tunes":2295},{"text":2294,"level":247},"What would change this answer?",{},{"id":1199,"data":2297,"type":218,"tunes":2299},{"text":2298},"Future models may become more robust to long context, positional effects and conflicting information. That could reduce the amount of manual curation required.",{},{"id":1204,"data":2301,"type":218,"tunes":2303},{"text":2302},"The architectural distinction would still remain useful because permissions, freshness, memory persistence, source authority and external application state exist outside the model regardless of context-window size.",{},{"id":1209,"data":2305,"type":218,"tunes":2307},{"text":2306},"The recommended balance between preloaded and just-in-time context also changes with latency requirements, tool reliability, corpus size, model cost and how dynamic the underlying information is.",{},{"id":1214,"data":2309,"type":42,"tunes":2311},{"text":2310,"level":247},"Related canonical knowledge",{},{"id":1219,"data":2313,"type":218,"tunes":2315},{"text":2314},"Context engineering sits between retrieval and generation. RAG explains how external knowledge is retrieved; R01 separates embeddings, vector search and reranking; context engineering explains what eventually reaches the model.",{},{"id":1224,"data":2317,"type":492,"tunes":2322},{"url":2318,"title":2319,"excerpt":2320,"ctaLabel":2321},"https:\u002F\u002Fstajic.de\u002Fblog\u002Fwhat-is-rag-the-simplest-explanation-of-how-it-works","What Is RAG? The Simplest Explanation of How It Works","The retrieval foundation for understanding how external knowledge can be supplied to a model before generation.","Read the RAG foundation",{},{"id":1232,"data":2324,"type":218,"tunes":2326},{"text":2325},"Source-of-Truth architecture answers a different question: not which information is present in context, but which source is authorized to establish a claim.",{},{"id":1237,"data":2328,"type":218,"tunes":2330},{"text":2329},"The existing article Why More Context Can Make AI Answers Worse is the diagnostic companion to this canonical definition. It focuses on context pollution, position effects, top-k growth, compaction loss and answer degradation rather than redefining context engineering itself.",{},{"id":1242,"data":2332,"type":42,"tunes":2334},{"text":2333,"level":247},"Frequently asked questions",{},{"id":1247,"data":2336,"type":1247,"tunes":2363},{"items":2337,"title":2362},[2338,2341,2344,2347,2350,2353,2356,2359],{"id":1251,"answer":2339,"question":2340},"Context engineering is the design and runtime management of what information a language model receives at inference time, including instructions, history, retrieved evidence, memory, state, tools and tool results.","What is context engineering?",{"id":1255,"answer":2342,"question":2343},"Prompt engineering focuses on how instructions and examples are written. Context engineering includes prompts but also decides which external information, state, history, memory and tool observations are placed around them.","How is context engineering different from prompt engineering?",{"id":1259,"answer":2345,"question":2346},"No. RAG retrieves external information. Context engineering decides how retrieved information is filtered, combined with other state and actually delivered to the model.","Is RAG the same as context engineering?",{"id":1263,"answer":2348,"question":2349},"No. Memory persists information outside the current model call. Context is the subset of information loaded into the current inference.","Is memory the same as context?",{"id":1267,"answer":2351,"question":2352},"Additional context can introduce noise, stale state, conflicting evidence, duplication and positional competition. Large context capacity does not guarantee equally reliable use of every token.","Why can more context make an answer worse?",{"id":1271,"answer":2354,"question":2355},"Compaction summarizes or transforms accumulated history into a smaller representation so a long-running system can continue without replaying every prior token.","What is context compaction?",{"id":1275,"answer":2357,"question":2358},"It can be represented in context for reasoning, but consequential operations should often re-read the authoritative source because context snapshots can become stale.","Should current application state be stored in context?",{"id":1279,"answer":2360,"question":2361},"No. Agents make context management more dynamic, but RAG systems, assistants, copilots and multi-turn applications also need deliberate context construction.","Is context engineering only needed for AI agents?","Context engineering FAQ",{},{"id":1285,"data":2365,"type":42,"tunes":2367},{"text":2366,"level":247},"Glossary",{},{"id":1290,"data":2369,"type":1290,"tunes":2404},{"title":2370,"entries":2371},"Key context-engineering terms",[2372,2374,2377,2379,2382,2385,2388,2391,2394,2396,2399,2401],{"term":1626,"anchor":1295,"definition":2373},"The design and runtime management of the information supplied to a language model for a particular inference step.",{"term":2375,"anchor":1299,"definition":2376},"Context window","The model's finite token capacity for the input and, depending on the model interface, associated generated tokens or active sequence.",{"term":1624,"anchor":1302,"definition":2378},"The design of instructions, examples and prompt structure intended to elicit useful model behavior.",{"term":2380,"anchor":1306,"definition":2381},"Context assembly","The process of selecting, filtering, ordering and formatting model-visible information before inference.",{"term":2383,"anchor":1310,"definition":2384},"Just-in-time retrieval","Loading information dynamically when the current task requires it instead of preloading all potentially relevant data.",{"term":2386,"anchor":1314,"definition":2387},"Compaction","Reducing accumulated context into a smaller representation while attempting to preserve information needed for future steps.",{"term":2389,"anchor":1318,"definition":2390},"Context pollution","Degradation caused by irrelevant, stale, contradictory or redundant information occupying the model's working context.",{"term":2392,"anchor":1322,"definition":2393},"Application state","The current authoritative condition of the external system, workflow or domain that exists independently of the model context.",{"term":1583,"anchor":1325,"definition":2395},"Information stored outside the immediate model invocation for possible use in later turns or sessions.",{"term":2397,"anchor":1329,"definition":2398},"Retrieved context","External information selected by a retrieval system and made available, wholly or partly, to the model.",{"term":1999,"anchor":1333,"definition":2400},"The degree to which model correctness remains stable when the location or order of relevant context changes.",{"term":2402,"anchor":1337,"definition":2403},"Validity boundary","The scope, time, assumptions, versions and evidence conditions within which a conclusion remains supported.",{},{"id":1341,"data":2406,"type":42,"tunes":2408},{"text":2407,"level":247},"Conclusion",{},{"id":1346,"data":2410,"type":218,"tunes":2412},{"text":2411},"Context engineering is the layer that decides what the model gets to see before it answers. That makes it broader than prompting and downstream of retrieval, while remaining distinct from durable memory and authoritative application state.",{},{"id":1351,"data":2414,"type":218,"tunes":2416},{"text":2415},"A strong context architecture does not treat the context window as a database. It keeps durable state and knowledge outside the model, loads what is required for the current decision, preserves authority and provenance, removes unnecessary noise and refreshes volatile information when needed.",{},{"id":1356,"data":2418,"type":218,"tunes":2420},{"text":2419},"The practical objective is therefore not maximum context. It is minimum sufficient, high-signal, correctly authorized and validity-preserving context for the next model decision.",{},{"id":1361,"data":2422,"type":42,"tunes":2424},{"text":2423,"level":247},"Primary sources and current guidance",{},{"id":1366,"data":2426,"type":218,"tunes":2428},{"text":2427},"The sources below support the current context-engineering terminology, long-context behavior and operational context-management patterns. Project sections are explicitly implementation evidence rather than universal claims.",{},{"id":1371,"data":2430,"type":1378,"tunes":2435},{"link":1373,"meta":2431},{"image":2432,"title":2433,"description":2434},{"url":406},"Anthropic — Effective context engineering for AI agents","Official engineering guidance defining context engineering, just-in-time retrieval, compaction, structured memory and context curation for agents.",{},{"id":1381,"data":2437,"type":1378,"tunes":2442},{"link":1383,"meta":2438},{"image":2439,"title":2440,"description":2441},{"url":406},"OpenAI — Context Engineering: Short-Term Memory Management with Sessions","Official cookbook guidance on context management, trimming and compression for long-running agent sessions.",{},{"id":1390,"data":2444,"type":1378,"tunes":2449},{"link":1392,"meta":2445},{"image":2446,"title":2447,"description":2448},{"url":406},"OpenAI — Agents guide","Current OpenAI developer guidance on agent runtimes, context across steps and orchestration ownership.",{},{"id":1399,"data":2451,"type":1378,"tunes":2456},{"link":1401,"meta":2452},{"image":2453,"title":2454,"description":2455},{"url":406},"Lost in the Middle: How Language Models Use Long Contexts","Research showing that long-context model performance can depend strongly on the position of relevant information in the input.",{},"2.31.6","Context engineering designs what information an AI model receives before inference, including prompts, retrieval, memory, application state, tool results and conversation history.",{"lang":7,"title":208,"content":210,"contentJson":2460,"excerpt":1408},{"time":212,"blocks":2461,"version":1407},[2462,2465,2468,2471,2474,2477,2480,2483,2486,2489,2492,2495,2498,2501,2512,2515,2518,2521,2524,2540,2543,2560,2563,2566,2569,2572,2575,2578,2581,2584,2587,2590,2593,2596,2599,2602,2605,2608,2611,2614,2617,2620,2635,2638,2641,2644,2647,2650,2653,2656,2659,2662,2665,2668,2671,2674,2677,2680,2683,2694,2697,2700,2703,2706,2709,2712,2715,2718,2721,2724,2727,2730,2733,2736,2739,2752,2755,2758,2775,2778,2792,2795,2798,2801,2804,2807,2810,2813,2816,2819,2822,2825,2828,2831,2841,2844,2847,2862,2865,2880,2883,2897,2900,2917,2920,2923,2926,2929,2932,2935,2938,2941,2944,2947,2950,2953,2956,2959,2962,2965,2977,2980,2996,2999,3002,3005,3008,3011,3014,3019,3024,3029],{"id":215,"data":2463,"type":218,"tunes":2464},{"text":217},{},{"id":221,"data":2466,"type":226,"tunes":2467},{"body":223,"title":224,"variant":225},{},{"id":229,"data":2469,"type":226,"tunes":2470},{"body":231,"title":232,"variant":233},{},{"id":236,"data":2472,"type":226,"tunes":2473},{"body":238,"title":239,"variant":240},{},{"id":243,"data":2475,"type":248,"tunes":2476},{"title":245,"maxLevel":246,"minLevel":247},{},{"id":251,"data":2478,"type":42,"tunes":2479},{"text":253,"level":247},{},{"id":256,"data":2481,"type":218,"tunes":2482},{"text":258},{},{"id":261,"data":2484,"type":218,"tunes":2485},{"text":263},{},{"id":266,"data":2487,"type":218,"tunes":2488},{"text":268},{},{"id":271,"data":2490,"type":42,"tunes":2491},{"text":273,"level":247},{},{"id":276,"data":2493,"type":218,"tunes":2494},{"text":278},{},{"id":281,"data":2496,"type":218,"tunes":2497},{"text":283},{},{"id":286,"data":2499,"type":218,"tunes":2500},{"text":288},{},{"id":291,"data":2502,"type":317,"tunes":2511},{"steps":2503,"title":315,"orientation":316},[2504,2505,2506,2507,2508,2509,2510],{"label":295,"description":296},{"label":298,"description":299},{"label":301,"description":302},{"label":304,"description":305},{"label":307,"description":308},{"label":310,"description":311},{"label":313,"description":314},{},{"id":320,"data":2513,"type":42,"tunes":2514},{"text":322,"level":247},{},{"id":325,"data":2516,"type":218,"tunes":2517},{"text":327},{},{"id":330,"data":2519,"type":218,"tunes":2520},{"text":332},{},{"id":335,"data":2522,"type":42,"tunes":2523},{"text":337,"level":247},{},{"id":340,"data":2525,"type":391,"tunes":2539},{"content":2526,"stretched":43,"withHeadings":14},[2527,2528,2529,2530,2531,2532,2533,2534,2535,2536,2537,2538],[344,345,346],[348,349,350],[352,353,354],[356,357,358],[360,361,362],[364,365,366],[368,369,370],[372,373,374],[376,377,378],[380,381,382],[384,385,386],[388,389,390],{},{"id":394,"data":2541,"type":42,"tunes":2542},{"text":396,"level":247},{},{"id":399,"data":2544,"type":431,"tunes":2559},{"rows":2545,"title":423,"layout":391,"columns":2556},[2546,2548,2550,2552,2554],{"id":403,"label":404,"values":2547},[406,406],{"id":408,"label":409,"values":2549},[406,406],{"id":412,"label":413,"values":2551},[406,406],{"id":416,"label":417,"values":2553},[406,406],{"id":420,"label":421,"values":2555},[406,406],[2557,2558],{"id":426,"label":427},{"id":429,"label":430},{},{"id":434,"data":2561,"type":218,"tunes":2562},{"text":436},{},{"id":439,"data":2564,"type":42,"tunes":2565},{"text":441,"level":247},{},{"id":444,"data":2567,"type":218,"tunes":2568},{"text":446},{},{"id":449,"data":2570,"type":218,"tunes":2571},{"text":451},{},{"id":454,"data":2573,"type":218,"tunes":2574},{"text":456},{},{"id":459,"data":2576,"type":226,"tunes":2577},{"body":461,"title":462,"variant":463},{},{"id":466,"data":2579,"type":42,"tunes":2580},{"text":468,"level":247},{},{"id":471,"data":2582,"type":218,"tunes":2583},{"text":473},{},{"id":476,"data":2585,"type":218,"tunes":2586},{"text":478},{},{"id":481,"data":2588,"type":218,"tunes":2589},{"text":483},{},{"id":486,"data":2591,"type":492,"tunes":2592},{"url":488,"title":489,"excerpt":490,"ctaLabel":491},{},{"id":495,"data":2594,"type":42,"tunes":2595},{"text":497,"level":247},{},{"id":500,"data":2597,"type":218,"tunes":2598},{"text":502},{},{"id":505,"data":2600,"type":218,"tunes":2601},{"text":507},{},{"id":510,"data":2603,"type":226,"tunes":2604},{"body":512,"title":513,"variant":233},{},{"id":516,"data":2606,"type":42,"tunes":2607},{"text":518,"level":247},{},{"id":521,"data":2609,"type":218,"tunes":2610},{"text":523},{},{"id":526,"data":2612,"type":218,"tunes":2613},{"text":528},{},{"id":531,"data":2615,"type":218,"tunes":2616},{"text":533},{},{"id":536,"data":2618,"type":42,"tunes":2619},{"text":538,"level":247},{},{"id":541,"data":2621,"type":431,"tunes":2634},{"rows":2622,"title":560,"layout":391,"columns":2631},[2623,2625,2627,2629],{"id":545,"label":546,"values":2624},[406,406],{"id":549,"label":550,"values":2626},[406,406],{"id":553,"label":554,"values":2628},[406,406],{"id":557,"label":558,"values":2630},[406,406],[2632,2633],{"id":563,"label":564},{"id":566,"label":567},{},{"id":570,"data":2636,"type":218,"tunes":2637},{"text":572},{},{"id":575,"data":2639,"type":42,"tunes":2640},{"text":577,"level":247},{},{"id":580,"data":2642,"type":218,"tunes":2643},{"text":582},{},{"id":585,"data":2645,"type":218,"tunes":2646},{"text":587},{},{"id":590,"data":2648,"type":218,"tunes":2649},{"text":592},{},{"id":595,"data":2651,"type":42,"tunes":2652},{"text":597,"level":247},{},{"id":600,"data":2654,"type":218,"tunes":2655},{"text":602},{},{"id":605,"data":2657,"type":218,"tunes":2658},{"text":607},{},{"id":610,"data":2660,"type":218,"tunes":2661},{"text":612},{},{"id":615,"data":2663,"type":42,"tunes":2664},{"text":617,"level":247},{},{"id":620,"data":2666,"type":218,"tunes":2667},{"text":622},{},{"id":625,"data":2669,"type":218,"tunes":2670},{"text":627},{},{"id":630,"data":2672,"type":218,"tunes":2673},{"text":632},{},{"id":635,"data":2675,"type":42,"tunes":2676},{"text":637,"level":247},{},{"id":640,"data":2678,"type":218,"tunes":2679},{"text":642},{},{"id":645,"data":2681,"type":218,"tunes":2682},{"text":647},{},{"id":650,"data":2684,"type":391,"tunes":2693},{"content":2685,"stretched":43,"withHeadings":14},[2686,2687,2688,2689,2690,2691,2692],[654,655],[657,658],[660,661],[663,664],[666,667],[669,670],[672,673],{},{"id":676,"data":2695,"type":42,"tunes":2696},{"text":678,"level":247},{},{"id":681,"data":2698,"type":218,"tunes":2699},{"text":683},{},{"id":686,"data":2701,"type":218,"tunes":2702},{"text":688},{},{"id":691,"data":2704,"type":218,"tunes":2705},{"text":693},{},{"id":696,"data":2707,"type":226,"tunes":2708},{"body":698,"title":699,"variant":233},{},{"id":702,"data":2710,"type":42,"tunes":2711},{"text":704,"level":247},{},{"id":707,"data":2713,"type":218,"tunes":2714},{"text":709},{},{"id":712,"data":2716,"type":218,"tunes":2717},{"text":714},{},{"id":717,"data":2719,"type":492,"tunes":2720},{"url":719,"title":720,"excerpt":721,"ctaLabel":722},{},{"id":725,"data":2722,"type":42,"tunes":2723},{"text":727,"level":247},{},{"id":730,"data":2725,"type":218,"tunes":2726},{"text":732},{},{"id":735,"data":2728,"type":218,"tunes":2729},{"text":737},{},{"id":740,"data":2731,"type":218,"tunes":2732},{"text":742},{},{"id":745,"data":2734,"type":42,"tunes":2735},{"text":747,"level":247},{},{"id":750,"data":2737,"type":226,"tunes":2738},{"body":752,"title":753,"variant":240},{},{"id":756,"data":2740,"type":391,"tunes":2751},{"content":2741,"stretched":43,"withHeadings":14},[2742,2743,2744,2745,2746,2747,2748,2749,2750],[760,761],[763,764],[766,767],[769,770],[772,773],[775,776],[778,779],[781,782],[784,785],{},{"id":788,"data":2753,"type":218,"tunes":2754},{"text":790},{},{"id":793,"data":2756,"type":42,"tunes":2757},{"text":795,"level":247},{},{"id":798,"data":2759,"type":391,"tunes":2774},{"content":2760,"stretched":43,"withHeadings":14},[2761,2762,2763,2764,2765,2766,2767,2768,2769,2770,2771,2772,2773],[802,803],[805,806],[808,809],[811,812],[814,815],[817,818],[820,821],[823,824],[826,827],[829,830],[832,833],[835,836],[838,839],{},{"id":842,"data":2776,"type":42,"tunes":2777},{"text":844,"level":247},{},{"id":847,"data":2779,"type":391,"tunes":2791},{"content":2780,"stretched":43,"withHeadings":14},[2781,2782,2783,2784,2785,2786,2787,2788,2789,2790],[851,852,853],[855,856,857],[859,860,861],[863,864,865],[867,868,869],[871,872,873],[875,876,877],[879,880,881],[883,884,885],[887,888,889],{},{"id":892,"data":2793,"type":42,"tunes":2794},{"text":894,"level":247},{},{"id":897,"data":2796,"type":218,"tunes":2797},{"text":899},{},{"id":902,"data":2799,"type":218,"tunes":2800},{"text":904},{},{"id":907,"data":2802,"type":492,"tunes":2803},{"url":909,"title":910,"excerpt":911,"ctaLabel":912},{},{"id":915,"data":2805,"type":42,"tunes":2806},{"text":917,"level":247},{},{"id":920,"data":2808,"type":42,"tunes":2809},{"text":922,"level":246},{},{"id":925,"data":2811,"type":218,"tunes":2812},{"text":927},{},{"id":930,"data":2814,"type":218,"tunes":2815},{"text":932},{},{"id":935,"data":2817,"type":218,"tunes":2818},{"text":937},{},{"id":940,"data":2820,"type":42,"tunes":2821},{"text":942,"level":246},{},{"id":945,"data":2823,"type":218,"tunes":2824},{"text":947},{},{"id":950,"data":2826,"type":218,"tunes":2827},{"text":952},{},{"id":955,"data":2829,"type":218,"tunes":2830},{"text":957},{},{"id":960,"data":2832,"type":391,"tunes":2840},{"content":2833,"stretched":43,"withHeadings":14},[2834,2835,2836,2837,2838,2839],[964,965],[967,968],[970,971],[973,974],[976,977],[979,980],{},{"id":983,"data":2842,"type":226,"tunes":2843},{"body":985,"title":986,"variant":240},{},{"id":989,"data":2845,"type":42,"tunes":2846},{"text":991,"level":247},{},{"id":994,"data":2848,"type":391,"tunes":2861},{"content":2849,"stretched":43,"withHeadings":14},[2850,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860],[998,999],[1001,1002],[1004,1005],[1007,1008],[1010,1011],[1013,1014],[1016,1017],[1019,1020],[1022,1023],[1025,1026],[1028,1029],{},{"id":1032,"data":2863,"type":42,"tunes":2864},{"text":1034,"level":247},{},{"id":1037,"data":2866,"type":391,"tunes":2879},{"content":2867,"stretched":43,"withHeadings":14},[2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878],[1041,1042],[1044,1045],[1047,1048],[1050,1051],[1053,1054],[1056,1057],[1059,1060],[1062,1063],[1065,1066],[1068,1069],[1071,1072],{},{"id":1075,"data":2881,"type":42,"tunes":2882},{"text":1077,"level":247},{},{"id":1080,"data":2884,"type":317,"tunes":2896},{"steps":2885,"title":1113,"orientation":316},[2886,2887,2888,2889,2890,2891,2892,2893,2894,2895],{"label":1084,"description":1085},{"label":1087,"description":1088},{"label":1090,"description":1091},{"label":1093,"description":1094},{"label":1096,"description":1097},{"label":1099,"description":1100},{"label":1102,"description":1103},{"label":1105,"description":1106},{"label":1108,"description":1109},{"label":1111,"description":1112},{},{"id":1116,"data":2898,"type":42,"tunes":2899},{"text":1118,"level":247},{},{"id":1121,"data":2901,"type":391,"tunes":2916},{"content":2902,"stretched":43,"withHeadings":14},[2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915],[852,1125],[1127,1128],[1130,1131],[1133,1134],[1136,1137],[1139,1140],[1142,1143],[1145,1146],[1148,1149],[1151,1152],[1154,1155],[1157,1158],[1160,1161],{},{"id":1164,"data":2918,"type":42,"tunes":2919},{"text":1166,"level":247},{},{"id":1169,"data":2921,"type":218,"tunes":2922},{"text":1171},{},{"id":1174,"data":2924,"type":218,"tunes":2925},{"text":1176},{},{"id":1179,"data":2927,"type":218,"tunes":2928},{"text":1181},{},{"id":1184,"data":2930,"type":218,"tunes":2931},{"text":1186},{},{"id":1189,"data":2933,"type":218,"tunes":2934},{"text":1191},{},{"id":1194,"data":2936,"type":42,"tunes":2937},{"text":1196,"level":247},{},{"id":1199,"data":2939,"type":218,"tunes":2940},{"text":1201},{},{"id":1204,"data":2942,"type":218,"tunes":2943},{"text":1206},{},{"id":1209,"data":2945,"type":218,"tunes":2946},{"text":1211},{},{"id":1214,"data":2948,"type":42,"tunes":2949},{"text":1216,"level":247},{},{"id":1219,"data":2951,"type":218,"tunes":2952},{"text":1221},{},{"id":1224,"data":2954,"type":492,"tunes":2955},{"url":1226,"title":1227,"excerpt":1228,"ctaLabel":1229},{},{"id":1232,"data":2957,"type":218,"tunes":2958},{"text":1234},{},{"id":1237,"data":2960,"type":218,"tunes":2961},{"text":1239},{},{"id":1242,"data":2963,"type":42,"tunes":2964},{"text":1244,"level":247},{},{"id":1247,"data":2966,"type":1247,"tunes":2976},{"items":2967,"title":1282},[2968,2969,2970,2971,2972,2973,2974,2975],{"id":1251,"answer":1252,"question":1253},{"id":1255,"answer":1256,"question":1257},{"id":1259,"answer":1260,"question":1261},{"id":1263,"answer":1264,"question":1265},{"id":1267,"answer":1268,"question":1269},{"id":1271,"answer":1272,"question":1273},{"id":1275,"answer":1276,"question":1277},{"id":1279,"answer":1280,"question":1281},{},{"id":1285,"data":2978,"type":42,"tunes":2979},{"text":1287,"level":247},{},{"id":1290,"data":2981,"type":1290,"tunes":2995},{"title":1292,"entries":2982},[2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,2993,2994],{"term":430,"anchor":1295,"definition":1296},{"term":1298,"anchor":1299,"definition":1300},{"term":427,"anchor":1302,"definition":1303},{"term":1305,"anchor":1306,"definition":1307},{"term":1309,"anchor":1310,"definition":1311},{"term":1313,"anchor":1314,"definition":1315},{"term":1317,"anchor":1318,"definition":1319},{"term":1321,"anchor":1322,"definition":1323},{"term":376,"anchor":1325,"definition":1326},{"term":1328,"anchor":1329,"definition":1330},{"term":1332,"anchor":1333,"definition":1334},{"term":1336,"anchor":1337,"definition":1338},{},{"id":1341,"data":2997,"type":42,"tunes":2998},{"text":1343,"level":247},{},{"id":1346,"data":3000,"type":218,"tunes":3001},{"text":1348},{},{"id":1351,"data":3003,"type":218,"tunes":3004},{"text":1353},{},{"id":1356,"data":3006,"type":218,"tunes":3007},{"text":1358},{},{"id":1361,"data":3009,"type":42,"tunes":3010},{"text":1363,"level":247},{},{"id":1366,"data":3012,"type":218,"tunes":3013},{"text":1368},{},{"id":1371,"data":3015,"type":1378,"tunes":3018},{"link":1373,"meta":3016},{"image":3017,"title":1376,"description":1377},{"url":406},{},{"id":1381,"data":3020,"type":1378,"tunes":3023},{"link":1383,"meta":3021},{"image":3022,"title":1386,"description":1387},{"url":406},{},{"id":1390,"data":3025,"type":1378,"tunes":3028},{"link":1392,"meta":3026},{"image":3027,"title":1395,"description":1396},{"url":406},{},{"id":1399,"data":3030,"type":1378,"tunes":3033},{"link":1401,"meta":3031},{"image":3032,"title":1404,"description":1405},{"url":406},{},"Post erfolgreich abgerufen",{"items":3036,"source":3118,"manualIds":3119,"manualMatchedIds":3120},[3037,3044,3051,3056,3063,3070,3077,3084,3091,3098,3105,3112],{"id":3038,"slug":3039,"title":3040,"excerpt":3041,"featuredImage":3042,"publishedAt":3043},"364","tipps-fuer-die-verbesserung-der-seo-suchmaschinenoptimierung","Освоение рабочего процесса SEO: Основные стратегии оптимизации для органического роста","Структурированный рабочий процесс SEO крайне важен для устойчивого органического роста. Изучите десять основополагающих стратегий, от исследования ключевых слов и технической оптимизации до качества контента и анализа производительности.","\u002Fuploads\u002F2026\u002F03\u002Ftipps-fuer-die-verbesserung-der-seo-suchmaschinenoptimierung-1774866098131-hwkzrg.webp","2024-01-26T06:35:00.000Z",{"id":3045,"slug":3046,"title":3047,"excerpt":3048,"featuredImage":3049,"publishedAt":3050},"472","why-more-context-can-make-ai-answers-worse","Почему больше контекста может ухудшить ответы ИИ","Большее контекстное окно не гарантирует более качественного ответа. В этой статье объясняется, как размывание сигнала, противоречивые данные, устаревшее состояние, чувствительность к позиции и сжатие с потерями могут снизить надежность ИИ — и предлагается практический стресс-тест контекста.","\u002Fuploads\u002F2026\u002F09\u002Fwhy-more-context-can-make-ai-answers-worse-1790351615793-2ntv2v.webp","2026-09-25T11:51:00.000Z",{"id":3052,"slug":3053,"title":3053,"excerpt":10,"featuredImage":3054,"publishedAt":3055},"369","git-with-automatic-upload-and-synchronization-to-a-production-server","\u002Fuploads\u002F2024\u002F05\u002Fstep-by-step-guide-illustration-showing-the-process-of-setting-up-Git-with-auto-upload-and-synchronization-to-a-production-server-large.webp","2024-05-28T22:48:00.000Z",{"id":3057,"slug":3058,"title":3059,"excerpt":3060,"featuredImage":3061,"publishedAt":3062},"445","qwen-3-6-in-production-release-runbook-ai-rollback-and-llmops-versioning","Qwen 3.6 в продакшене: ранбук релиза, откат ИИ и версионирование LLMOps","Qwen 3.6 — это не просто очередное обновление модели. Это одновременно событие релиза, сценарий отката и проблема версионирования. В этой статье объясняется, как следует работать с Qwen 3.6 в продакшене, используя дисциплину LLMOps, прослеживаемость промптов и моделей, контролируемое развертывание и готовность к откату на основе фактических данных.","\u002Fuploads\u002F2026\u002F02\u002Fnew-qwen-3-5-plus-1771515512741-dcbi9p.webp","2026-05-04T02:49:00.000Z",{"id":3064,"slug":3065,"title":3066,"excerpt":3067,"featuredImage":3068,"publishedAt":3069},"490","rbac-vs-tenant-isolation-two-different-security-boundaries","RBAC против изоляции арендаторов: две разные границы безопасности","RBAC определяет, что пользователь может делать; изоляция тенантов определяет, к ресурсам какого тенанта это действие может получить доступ. Узнайте, почему безопасность многотенантного SaaS требует обеих границ.","\u002Fuploads\u002F2026\u002F10\u002Frbac-vs-tenant-isolation-two-different-security-boundaries-1791485111528-qqtzby.webp","2026-10-08T14:43:00.000Z",{"id":3071,"slug":3072,"title":3073,"excerpt":3074,"featuredImage":3075,"publishedAt":3076},"466","the-gpu-is-not-the-product-future-proof-private-ai-architecture","GPU — не продукт: перспективная архитектура приватного ИИ","Инфраструктура приватного ИИ не должна проектироваться вокруг одного GPU или одной модели. Более устойчивый подход объединяет быстрые GPU для инференса, ИИ-системы с большим объемом памяти, узлы физического ИИ и опциональные передовые облачные модели за уровнем маршрутизации, учитывающим возможности.","\u002Fuploads\u002F2026\u002F09\u002Fthe-gpu-is-not-the-product-future-proof-private-ai-architecture-1790140878812-8hsl39.webp","2026-09-23T01:19:00.000Z",{"id":3078,"slug":3079,"title":3080,"excerpt":3081,"featuredImage":3082,"publishedAt":3083},"363","front-und-backend-entwicklung","Фронтенд- и бэкенд-разработка","Фронтенд- и бэкенд-разработка является неотъемлемой частью веб-разработки и включает в себя создание веб-приложений и веб-сайтов. Фронтенд-разработка сосредоточена на пользовательском интерфейсе, в то время как бэкенд-разработка отвечает за программирование и управление серверной частью.","\u002Fuploads\u002F2026\u002F03\u002Ffront-und-backend-entwicklung-1774872219531-wyu4i1.webp","2023-04-12T11:11:00.000Z",{"id":3085,"slug":3086,"title":3087,"excerpt":3088,"featuredImage":3089,"publishedAt":3090},"468","ai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context","Память ИИ-агента — это не RAG: как разграничить память, извлечение, состояние и контекст","Память агента, RAG, состояние и контекст часто используются так, будто они взаимозаменяемы. Это не так. Эта практическая архитектурная модель разделяет четыре уровня, показывает, где место каждого из них, и объясняет, что ломается, когда системы объединяют их в одно целое.","\u002Fuploads\u002F2026\u002F09\u002Fai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context-1790350560308-np0xy6.webp","2026-09-25T11:34:00.000Z",{"id":3092,"slug":3093,"title":3094,"excerpt":3095,"featuredImage":3096,"publishedAt":3097},"487","vector-databases-embeddings-and-reranking-three-different-parts-of-retrieval","Векторные базы данных, эмбеддинги и переранжирование: три разные части поиска","Эмбеддинги представляют смысл, векторные базы данных извлекают кандидатов, а реранкеры уточняют результаты. Узнайте, чем отличаются эти три слоя поиска и как они работают вместе в RAG.","\u002Fuploads\u002F2026\u002F10\u002Fvector-databases-embeddings-and-reranking-three-different-parts-of-retrieval-1791480129884-9dtasz.webp","2026-10-08T11:21:00.000Z",{"id":3099,"slug":3100,"title":3101,"excerpt":3102,"featuredImage":3103,"publishedAt":3104},"493","mlops-vs-llmops-what-changes-when-the-model-is-an-llm","MLOps против LLMOps: что меняется, когда модель — это LLM","MLOps управляет системами машинного обучения; LLMOps распространяет эти практики на промпты, контекст, извлечение, провайдеров, инструменты, оценки и поведение во время выполнения вокруг больших языковых моделей.","\u002Fuploads\u002F2026\u002F10\u002Fmlops-vs-llmops-what-changes-when-the-model-is-an-llm-1791487319869-2v7hxo.webp","2026-10-08T15:20:00.000Z",{"id":3106,"slug":3107,"title":3108,"excerpt":3109,"featuredImage":3110,"publishedAt":3111},"467","the-answer-validity-boundary-the-missing-layer-between-relevance-and-reliable-ai-answers","Граница достоверности ответа: недостающий слой между релевантностью и надёжными ответами ИИ","Источник может быть релевантным, авторитетным и при этом неверным для задаваемого вопроса. Недостающий слой — применимость: условия, при которых ответ остаётся в силе, и изменения, вынуждающие пересмотреть его. В этой статье вводится понятие «Граница действительности ответа» как паттерн проектирования источников для людей, ИИ-поиска и RAG-систем.","\u002Fuploads\u002F2026\u002F09\u002Fthe-answer-validity-boundary-the-missing-layer-between-relevance-and-reliable-ai-answers-1790272901306-1g5jly.webp","2026-09-24T11:59:00.000Z",{"id":3113,"slug":3114,"title":3115,"excerpt":3116,"featuredImage":3061,"publishedAt":3117},"384","new-qwen-3-5-plus","Новый Qwen 3.5-Plus: Open-source ИИ — теперь всё серьезно","Откройте для себя революционные функции и преимущества Qwen 3.5-Plus от Alibaba — меняющего правила игры ИИ с открытым исходным кодом для разработчиков.","2026-02-19T10:23:00.000Z","fallback",[],[]]