{"templateName":"base-page-template54","cssClassNames":"page basicpage summit-page","canonicalLink":"https://www.snowflake.com/en/artificial-intelligence/ai-engineering/context-engineering/","robotsTags":[],"allowedRenditionsWidth":["320","480","640","768","960","1200","1440","1920"],"description":"Context engineering gives AI models the right instructions, data, memory and tools at inference. Learn key techniques, common failures and best practices.","language":"en","title":"Context Engineering for AI Systems | Snowflake","analyticsPageType":"homepage","analyticsCategory":"general","analyticsSubCategory":"","excludeFromAnalytics":false,":mappedPath":"/en/artificial-intelligence/ai-engineering/context-engineering/",":type":"snowflake-site/components/structure/page",":items":{"root":{"columnCount":12,"columnClassNames":{"markup_editor_928258845":"aem-GridColumn aem-GridColumn--default--12","experiencefragment-banner":"aem-GridColumn aem-GridColumn--default--12","experiencefragment-header":"aem-GridColumn aem-GridColumn--default--12","responsivegrid":"aem-GridColumn aem-GridColumn--default--12","markup_editor_597730182":"aem-GridColumn aem-GridColumn--default--12","experiencefragment-footer":"aem-GridColumn aem-GridColumn--default--12","experiencefragment":"aem-GridColumn aem-GridColumn--default--12","modal_container":"aem-GridColumn aem-GridColumn--default--12","markup_editor":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":items":{"experiencefragment-banner":{"id":"experiencefragment-32bc367ffb","localizedFragmentVariationPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/pushdown-banner/master/jcr:content","configured":true,":type":"snowflake-site/components/experiencefragment","xfModelPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/pushdown-banner/master.xfmodel.json"},"experiencefragment-header":{"id":"experiencefragment-af5e81d622","localizedFragmentVariationPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/mega-nav-header/master/jcr:content","configured":true,":type":"snowflake-site/components/experiencefragment","xfModelPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/mega-nav-header/master.xfmodel.json","languageNavPath":"/content/snowflake-site/global/en/artificial-intelligence/ai-engineering/context-engineering.languagenav.json"},"responsivegrid":{"columnCount":12,"columnClassNames":{"flexible_column_cont_939100716":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_1158003461":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_663228916":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_912630531":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_1398138236":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_1786318617":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_1467213961":"aem-GridColumn aem-GridColumn--default--12","flexible_column_cont_1377146023":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":items":{"flexible_column_cont":{"id":"flexible-column-container-9c138cea98","propertiesId":"hub-hero-breadcrumbs","type":"1-column","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"small","bottomPadding":"none","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"propertiesCSSClasses":"page-section","backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"container-46c4d77321",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"breadcrumb":{"id":"breadcrumb-06126a4165","items":[{"id":"breadcrumb-06126a4165-item-4b75ed29e6","link":{"valid":true,"url":"/en/artificial-intelligence/"},"active":false,"current":false,"title":"Artificial Intelligence",":type":"snowflake-site/components/structure/page","appliedCssClassNames":"summit-page"},{"id":"breadcrumb-06126a4165-item-d5e33a6013","link":{"valid":true,"url":"/en/artificial-intelligence/ai-engineering/"},"active":false,"current":false,"title":"AI Engineering",":type":"snowflake-site/components/structure/page","appliedCssClassNames":"summit-page"},{"id":"breadcrumb-06126a4165-item-33f479cad7","link":{"valid":true,"url":"/en/artificial-intelligence/ai-engineering/context-engineering/"},"active":true,"current":true,"title":"Context Engineering",":type":"snowflake-site/components/structure/page","appliedCssClassNames":"summit-page"}],":type":"snowflake-site/components/breadcrumb"}},":itemsOrder":["breadcrumb"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-gray-10-bg"},"flexible_column_cont_939100716":{"id":"flexible-column-container-50143b804d","propertiesId":"hub-hero","type":"2-column-even","alignColumns":"center","containerMaxWidth":"extra-large","topPadding":"extra-small","bottomPadding":"extra-small","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"propertiesCSSClasses":"page-section","backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"container-4240c15920",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"title_v2":{"id":"title-v2-48ca19173a","additionalClasses":"hub-hero__headline","type":"heading1","lines":["Context Engineering: Managing Instructions, Data, Memory and State for Better AI Systems"],":type":"snowflake-site/components/title-v2","appliedCssClassNames":"left-alignment"},"text":{"id":"text-d70eca126c","additionalClasses":"hub-hero__subheadline","text":"\u003Cp\u003EA capable AI model is only as reliable as the context it receives. Context engineering helps AI engineering teams give models the right instructions, data, tools and memory to produce reliable results.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-regular text-color-text-05"},"container":{"additionalClasses":"hub-hero__authors","layout":"RESPONSIVE_GRID","columnCount":12,"columnClassNames":{"content_chip_copy":"aem-GridColumn aem-GridColumn--default--12","content_chip":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","id":"container-7f38019c63",":type":"snowflake-site/components/container",":items":{"content_chip":{"id":"content-chip-9df86c39ee","cta":{"id":"cta","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"/en/blog/authors/Laurie-Macpherson/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_INTERNAL","text":"Read bio"},"image":{"id":"image","height":"800","isLcpImage":true,"src":"https://www.snowflake.com/adobe/dynamicmedia/deliver/dm-aid--a7e9fdff-6f08-4edc-9cd1-e213bb234aaa/laurie-macpherson.jpg?quality=85&preferwebp=true","alt":"Laurie MacPherson","lazyEnabled":true,"width":"800",":type":"snowflake-site/components/image"},"headline":{"id":"title","type":"heading5","lines":["Laurie MacPherson","Technical Writer, Snowflake"],":type":"snowflake-site/components/title-v2"},":type":"snowflake-site/components/content-chip"},"content_chip_copy":{"id":"content-chip-d34d51b0d1","cta":{"id":"cta","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"/en/blog/authors/david-gaule/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_INTERNAL","text":"Read bio"},"image":{"id":"image","height":"512","isLcpImage":false,"src":"https://www.snowflake.com/adobe/dynamicmedia/deliver/dm-aid--fd9454ea-3b59-4d19-95be-534774cbd226/david.jpg?quality=85&preferwebp=true","alt":"David Gaule","lazyEnabled":true,"width":"512",":type":"snowflake-site/components/image"},"headline":{"id":"title","type":"heading5","lines":["David Gaule","Technical Editor, Snowflake"],":type":"snowflake-site/components/title-v2"},":type":"snowflake-site/components/content-chip"}},":itemsOrder":["content_chip","content_chip_copy"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-small"}},":itemsOrder":["title_v2","text","container"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-extra-small"},"flexible_column_content_container_2":{"additionalClasses":"hub-hero__video-column","layout":"SIMPLE","id":"container-3782968201",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"youtube":{"id":"embed-de7235b258","youtubeVideoId":"gA-R_MgZQAk","layout":"responsive","youtubeAspectRatio":"56.25","youtubeAutoPlay":false,"youtubeLoop":false,"youtubeMute":false,"youtubePlaysInline":false,"youtubeRel":false,"embeddableResourceType":"core/wcm/components/embed/v1/embed/embeddable/youtube","type":"EMBEDDABLE",":type":"snowflake-site/components/youtube"}},":itemsOrder":["youtube"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-gray-10-bg"},"flexible_column_cont_1398138236":{"id":"flexible-column-container-a3266950d6","propertiesId":"hub-hero-related-topics","type":"1-column","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"extra-small","bottomPadding":"medium","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"propertiesCSSClasses":"page-section","backgroundImageOption":"none","flexible_column_content_container_1":{"additionalClasses":"related-topics-outer-container border-top","layout":"SIMPLE","id":"container-cdfd499d30",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"text_894059747":{"id":"text-c89e3a9529","additionalClasses":"seo-hub-hero__related-topic-label","text":"\u003Cp\u003EAI Engineering Topics:\u003C/p\u003E\r\n","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-regular text-color-text-05"},"text":{"id":"text-2a4277bba3","additionalClasses":"related-topics ","text":"\u003Cul\u003E\r\n\u003Cli\u003E\u003Ca href=\"https://www.snowflake.com/en/artificial-intelligence/ai-engineering/ai-cost-optimization/\"\u003EAI Cost Optimization\u003C/a\u003E\u003C/li\u003E\r\n\u003Cli\u003E\u003Ca href=\"https://www.snowflake.com/en/artificial-intelligence/ai-engineering/harness-engineering/\"\u003EHarness Engineering\u003C/a\u003E\u003C/li\u003E\r\n\u003C/ul\u003E\r\n","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-small"}},":itemsOrder":["text_894059747","text"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-gray-10-bg"},"flexible_column_cont_663228916":{"id":"flexible-column-container-7b429cede2","propertiesId":"hub-body","type":"2-column-60-40","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"medium","bottomPadding":"medium","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"propertiesCSSClasses":"page-section","backgroundImageOption":"none","flexible_column_content_container_1":{"additionalClasses":"longform-content","layout":"SIMPLE","id":"hub-body-content",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"callout__0":{"id":"text-5644337d41","additionalClasses":"callout callout--general","text":"\u003Cp\u003E\u003Cstrong\u003ECONTEXT ENGINEERING DEFINED\u003C/strong\u003E\u003C/p\u003E\n\u003Cp\u003EContext engineering is the design of systems that assemble, manage and update the task-specific information, state and interfaces supplied to an AI model at inference time.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-regular text-color-text-05"},"text__0":{"id":"text-259b659d60","text":"\u003Cp\u003EAs context windows have expanded, AI applications have gained the capacity to process entire documents, lengthy conversations and large collections of retrieved material in a single call. That capacity creates an appealing assumption: If a model could benefit from more information, we can simply give it more.\u003C/p\u003E\n\u003Cp\u003ELonger context can raise inference cost and latency, however — especially when it’s sent again with each model call. It can also make the model’s job harder: Relevant information may be buried in factually accurate but irrelevant context, while stale or conflicting information introduces new opportunities for error. And for each call, the application may need to resolve identity and permissions, rank or compress the results, expose the appropriate tools, carry forward decisions and then validate the output and preserve the state required for the next call.\u003C/p\u003E\n\u003Cp\u003EContext engineering is how applications make those decisions. It determines how instructions, data, memory, tools and prior state are selected, organized and maintained for a model or \u003Ca href=\"https://www.snowflake.com/en/artificial-intelligence/agents/\"\u003Eagent\u003C/a\u003E. Done well, it gives the model a focused, trustworthy view of the data task at hand. Done poorly, it can undermine even a capable model. The failure appears in the output, though its source lies in the system that assembled the input.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_what-is-context-engineering":{"id":"title-v2-07a7583a55","additionalClasses":"anchor-title anchor-title--what-is-context-engineering","type":"heading2","lines":["What is context engineering?"],":type":"snowflake-site/components/title-v2"},"text_what-is-context-engineering_0":{"id":"text-66bf28ad9a","text":"\u003Cp\u003EContext engineering, a core practice in \u003Ca href=\"https://www.snowflake.com/en/artificial-intelligence/ai-engineering/\"\u003EAI engineering\u003C/a\u003E, is the discipline of designing dynamic systems that provide a \u003Ca href=\"https://www.snowflake.com/en/fundamentals/large-language-model/\"\u003Elarge language model\u003C/a\u003E (LLM) with the right information and tools, in the right format, at the right time. The goal is to help the model reliably complete a task by assembling the context it needs for each call or step.\u003C/p\u003E\n\u003Cp\u003EThat context usually contains several layers:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003ESystem instructions that define the model’s role, rules and operating constraints\u003C/li\u003E\n\u003Cli\u003EUser input describing the current request\u003C/li\u003E\n\u003Cli\u003ERetrieved knowledge from documents, databases or other sources\u003C/li\u003E\n\u003Cli\u003ETool definitions that describe the functions the model may call\u003C/li\u003E\n\u003Cli\u003EShort-term memory from the current conversation or workflow\u003C/li\u003E\n\u003Cli\u003ELong-term memory stored across sessions\u003C/li\u003E\n\u003Cli\u003EStructured-output schemas for downstream systems\u003C/li\u003E\n\u003Cli\u003EPrior state, including identifiers, completed actions and unresolved decisions\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003ETogether, these components form the context stack. The exact composition will change from one request to the next.\u003C/p\u003E\n\u003Cp\u003ELeo Rodriguez, Principal Product Marketing Manager, AI/ML at Snowflake, points out that enterprise context has to encode the business meaning behind the data: “In the pre-AI world, a data scientist often had the context in their head: which tables to use, which definitions mattered and which data source of truth to trust. In the AI world, you have to make that context explicit through semantic models, business definitions and governed data relationships.”\u003C/p\u003E\n\u003Cp\u003EConsider an internal support agent being asked why a customer’s invoice increased. The user’s question alone doesn’t contain the information needed for the agent to answer. Before invoking the model, the application may need to resolve the customer and account, retrieve the invoice, identify the applicable contract, locate the current pricing policy and preserve any findings from earlier turns. If the agent is permitted to issue a credit, the model may also need a tool definition that describes the adjustment API and the fields it requires.\u003C/p\u003E\n\u003Cp\u003EThe context builder assembles those inputs into a temporary working set. It may query several systems, filter records by user permissions, rank retrieved passages, remove duplicate material and allocate a token budget among instructions, source data, tool schemas and history. Once the model responds, the application validates the result and records any state required for the next call.\u003C/p\u003E\n\u003Cp\u003EThis work shapes model behavior without changing model weights. Fine-tuning modifies a model through additional training, helping it learn patterns that should apply across many requests. Context engineering, however, operates at inference time — the model remains unchanged while the surrounding application supplies information specific to the current user, task and point in the workflow.\u003C/p\u003E\n\u003Cp\u003EIn agent systems, context engineering is a component of \u003Ca href=\"https://www.snowflake.com/en/artificial-intelligence/ai-engineering/harness-engineering/\"\u003Eharness engineering\u003C/a\u003E. Context engineering focuses on what the model receives at each step, including instructions, retrieved data, memory, tool definitions and prior state. Harness engineering covers the broader runtime that assembles that context and also manages execution, tool calls, permissions, feedback, error handling and progression across steps. Context engineering also applies outside agent harnesses, however, including single-call and RAG applications that still need to construct an effective model input.\u003C/p\u003E\n\u003Cp\u003EThe scope of context engineering will depend on the application. In a simple retrieval-augmented generation application, context engineering may center on selecting and formatting relevant documents. In a multistep agent, the system must also track state, coordinate tools, isolate work across sub-agents and decide what information to carry forward after each action.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"card_v2_what-is-context-engineering_0":{"id":"card-v2-bab9bd1215","additionalClasses":"seo-customer","configurationStatus":{"configured":true,"message":""},"image":{"id":"image","height":"351","isLcpImage":false,"src":"https://www.snowflake.com/adobe/dynamicmedia/deliver/dm-aid--516d7b8e-c447-4b86-9b25-7c6864e1f9ea/thomson-reuters.png?quality=85&preferwebp=true","alt":"Thomson Reuters","lazyEnabled":true,"width":"624",":type":"snowflake-site/components/image"},"type":"content-card","title":{"id":"title","type":"heading4","lines":["Thomson Reuters"],":type":"snowflake-site/components/title-v2"},"button":{"id":"button","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"https://www.snowflake.com/en/customers/all-customers/video/thomson-reuters/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_EXTERNAL","text":"Watch the customer story"},"text":{"id":"text","text":"\u003Cp\u003EThomson Reuters is showing what context engineering looks like in practice: grounding AI agents in trusted enterprise data so they can deliver faster, more accurate insights. Learn how the company uses Snowflake Cortex Analyst, Cortex APIs, and Snowflake’s role-based access controls to build a secure AI data analyst agent for customer support — and why it now plans to expand the approach across the business.\u003C/p\u003E\r\n","richText":true,":type":"snowflake-site/components/text"},"layoutStyle":"horizontal",":type":"snowflake-site/components/card-v2"},"title_why-ai-applications-fail-at-the-context-layer":{"id":"title-v2-379ca8d466","additionalClasses":"anchor-title anchor-title--why-ai-applications-fail-at-the-context-layer","type":"heading2","lines":["Why AI applications fail at the context layer"],":type":"snowflake-site/components/title-v2"},"text_why-ai-applications-fail-at-the-context-layer_0":{"id":"text-075065879b","text":"\u003Cp\u003EModel failures receive much of the attention when an AI application produces the wrong result. In practice, the model may have performed reasonably given what it received. The failure, in these cases, was in the system that prepared the model call rather than in the model’s underlying capability.\u003C/p\u003E\n\u003Cp\u003ECommon examples include:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003E\u003Cstrong\u003EIncorrect retrieval:\u003C/strong\u003E The application finds text that is semantically similar to the query but belongs to the wrong customer, product version or jurisdiction.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EMissing state:\u003C/strong\u003E An agent completes one step, then loses the record ID, approval status or constraint needed for the next.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EStale information:\u003C/strong\u003E Cached results, stored memories or indexed documents no longer reflect the source system.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EPermission leakage:\u003C/strong\u003E Retrieval happens across the full corpus, with access filtering applied only after sensitive content has already entered the model context.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EContext-window pressure:\u003C/strong\u003E Instructions, tool schemas, documents and conversation history compete for limited space, leading the application to truncate or compress useful information.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EInstruction conflicts:\u003C/strong\u003E System rules, user requests, retrieved text and tool descriptions give the model inconsistent directions.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003ESchema mismatch:\u003C/strong\u003E The model receives an outdated tool definition or generates fields that the downstream API no longer accepts.\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003ESwitching to a larger model may hide some of these defects during testing, but it doesn’t repair the underlying pipeline. If the application supplies the wrong account record, a more capable model may simply produce a more convincing incorrect answer.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_context-engineering-vs-prompt-engineering":{"id":"title-v2-92378e03d9","additionalClasses":"anchor-title anchor-title--context-engineering-vs-prompt-engineering","type":"heading2","lines":["Context engineering vs. prompt engineering"],":type":"snowflake-site/components/title-v2"},"text_context-engineering-vs-prompt-engineering_0":{"id":"text-3aaa383b97","text":"\u003Cp\u003EPrompt engineering focuses on designing the instructions presented to the model at inference time: how the task is phrased, which constraints are included and what kind of response is requested.\u003C/p\u003E\n\u003Cp\u003EContext engineering covers the larger system that builds the model’s working environment around that instruction.\u003C/p\u003E\n\u003Cp\u003EA prompt might say: “Review this support case, determine the likely cause and recommend the next action.” The request is clear, but it leaves several questions unresolved. Which customer records are relevant? What product version is the customer running? Which support policy applies? What actions have already been attempted? Which tools may the agent call, and under whose permissions?\u003C/p\u003E\n\u003Cp\u003EA production application can’t answer those questions through static wording alone. It has to assemble dynamic context at runtime.\u003C/p\u003E\n\u003Cp\u003EThe distinction is especially visible in agent workflows. A prompt might describe the overall objective, while the context changes after every step. Once an agent retrieves a record, calls a tool or receives an approval, the system must update its state and construct a new model request. The next call may contain a different subset of documents, a new tool result and revised instructions based on what has already happened.\u003C/p\u003E\n\u003Cp\u003EPrompt engineering remains part of that work. Clear instructions still influence output quality, tool selection and adherence to constraints. Within a context pipeline, however, instruction design sits alongside retrieval, memory, state management, authorization and output validation.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_how-a-context-pipeline-works":{"id":"title-v2-762cb00b74","additionalClasses":"anchor-title anchor-title--how-a-context-pipeline-works","type":"heading2","lines":["How a context pipeline works"],":type":"snowflake-site/components/title-v2"},"text_how-a-context-pipeline-works_0":{"id":"text-aaafb0cd54","text":"\u003Cp\u003EFor each model call, the application constructs a temporary working set from information distributed across several systems. That process typically begins before the final prompt is rendered.\u003C/p\u003E\n\u003Ch3\u003EResolve identity, permissions and state\u003C/h3\u003E\n\u003Cp\u003EThe context builder first establishes who’s making the request and where the request sits within the larger workflow.\u003C/p\u003E\n\u003Cp\u003EIdentity determines which data sources, records and tools the application is allowed to expose. Workflow state supplies the information needed to continue from an earlier step: session identifiers, selected entities, completed actions, pending approvals or intermediate results.\u003C/p\u003E\n\u003Cp\u003EIn a multitenant application, these values should shape retrieval at query time. Fetching unrestricted records and removing unauthorized results later creates an unnecessary exposure path. Filters based on tenant, role, region or document-level permissions belong as close to the underlying data access as possible.\u003C/p\u003E\n\u003Cp\u003EThe same principle applies to tools. A model doesn’t need the definition of every function available to the broader application. The system should expose only the tools permitted for the current user and task.\u003C/p\u003E\n\u003Ch3\u003ESelect candidate context\u003C/h3\u003E\n\u003Cp\u003EOnce identity and state are resolved, the application determines which sources are likely to contain useful information.\u003C/p\u003E\n\u003Cp\u003EA request may trigger several forms of retrieval:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003ESemantic or keyword search across documents\u003C/li\u003E\n\u003Cli\u003ESQL queries over structured business data\u003C/li\u003E\n\u003Cli\u003ELookups in a conversation or workflow store\u003C/li\u003E\n\u003Cli\u003ERetrieval from long-term memory\u003C/li\u003E\n\u003Cli\u003ESelection of relevant tools or APIs\u003C/li\u003E\n\u003Cli\u003ELoading of system or task-specific instructions\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EEach source returns a different type of payload. For example, a database query may return rows and typed fields, while a tool registry returns schemas rather than business facts.\u003C/p\u003E\n\u003Cp\u003EThe application then needs a common selection strategy. Semantic relevance is one signal, though rarely the only one. Recency, source authority, permissions, entity identifiers and token cost may all affect which candidates survive.\u003C/p\u003E\n\u003Cp\u003EA policy published yesterday, for example, will typically outrank a more semantically similar version from last year. And a customer record with the exact account ID should take precedence over a text match containing a similar company name. For regulated or high-consequence workflows, information from an approved internal source will outrank a web result even when both appear relevant.\u003C/p\u003E\n\u003Cp\u003E\u003Ca href=\"https://www.snowflake.com/en/fundamentals/rag/\"\u003ERetrieval-augmented generation\u003C/a\u003E (RAG) is one of the primary techniques used during this stage.\u003C/p\u003E\n\u003Ch3\u003ERank, filter and budget the results\u003C/h3\u003E\n\u003Cp\u003ERetrieval usually produces more material than the model should receive. Before context assembly, the application needs to narrow the candidate set.\u003C/p\u003E\n\u003Cp\u003EMetadata filtering removes records that don’t match the current tenant, time period, product version or other task-specific criteria. Reranking then evaluates the remaining results in relation to the actual request. Some systems use a dedicated reranker model, while others combine retrieval scores with deterministic rules.\u003C/p\u003E\n\u003Cp\u003EToken budgeting adds another constraint. System instructions, output schemas and tool definitions occupy part of the available context window, so conversation state and retrieved data must fit within what remains, with additional capacity reserved for the model’s response.\u003C/p\u003E\n\u003Cp\u003EA context budget might allocate space across several categories:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003EStable system and security instructions\u003C/li\u003E\n\u003Cli\u003EThe current user request\u003C/li\u003E\n\u003Cli\u003EWorkflow state and identifiers\u003C/li\u003E\n\u003Cli\u003ERetrieved structured data\u003C/li\u003E\n\u003Cli\u003ERetrieved unstructured passages\u003C/li\u003E\n\u003Cli\u003ETool definitions\u003C/li\u003E\n\u003Cli\u003ERecent conversation turns\u003C/li\u003E\n\u003Cli\u003EThe expected output\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EThese allocations don’t have to be fixed. An analytical request may need more space for query results, while a tool-driven workflow may devote more of the window to function schemas and state. The important decision is explicit prioritization. Without it, whichever component grows fastest is likely to crowd out information the model needs more.\u003C/p\u003E\n\u003Ch3\u003ECompress context where necessary\u003C/h3\u003E\n\u003Cp\u003ELong documents and accumulated history often exceed the available budget. Compression reduces their size while attempting to preserve the details needed for the current step.\u003C/p\u003E\n\u003Cp\u003ESeveral approaches are common:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003ERemove duplicate passages.\u003C/li\u003E\n\u003Cli\u003EExtract specific fields or sentences.\u003C/li\u003E\n\u003Cli\u003ESummarize older conversation turns.\u003C/li\u003E\n\u003Cli\u003EReplace completed tool traces with their final results.\u003C/li\u003E\n\u003Cli\u003EConvert prose into a compact structured representation.\u003C/li\u003E\n\u003Cli\u003ERetain recent turns in full while summarizing earlier ones.\u003C/li\u003E\n\u003Cli\u003ESplit large documents and retrieve only the most relevant chunks.\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EDeterministic reductions are usually the safest place to begin. For example, if a retrieved contract contains 40 pages but the task concerns renewal dates, extracting the relevant dates and clauses avoids spending tokens on unrelated sections. Likewise, an agent that’s called the same lookup tool several times may only need the current result rather than the full sequence of calls.\u003C/p\u003E\n\u003Cp\u003ESummarization requires more care. A concise summary might omit an exception or qualifier that later affects the answer. For that reason, many systems preserve a link or identifier for the original source even when the model receives a compressed representation.\u003C/p\u003E\n\u003Cp\u003ECompression also affects cost. In applications dominated by input tokens, shorter context reduces the amount of prompt data processed during every call. \u003Ca href=\"https://www.snowflake.com/en/artificial-intelligence/ai-engineering/ai-cost-optimization/\"\u003EAI cost optimization\u003C/a\u003E strategies often include compression.\u003C/p\u003E\n\u003Ch3\u003EAssemble and order the context\u003C/h3\u003E\n\u003Cp\u003EAfter selection and compression, the system renders the final model input. The order of that material influences how the model interprets it. Stable operating rules should remain clearly distinct from retrieved content, and the current task, relevant identifiers and immediate constraints should be easy to find. Supporting material should retain enough metadata for the model — and the user — to identify its source.\u003C/p\u003E\n\u003Cp\u003EA typical context layout might include:\u003C/p\u003E\n\u003Col\u003E\n\u003Cli\u003ESystem-level role, security and behavioral instructions\u003C/li\u003E\n\u003Cli\u003ETask-specific instructions\u003C/li\u003E\n\u003Cli\u003ECurrent workflow state and entity identifiers\u003C/li\u003E\n\u003Cli\u003ERetrieved structured facts\u003C/li\u003E\n\u003Cli\u003ERetrieved documents or passages\u003C/li\u003E\n\u003Cli\u003EAvailable tool definitions\u003C/li\u003E\n\u003Cli\u003ERecent conversation history\u003C/li\u003E\n\u003Cli\u003EThe required output schema\u003C/li\u003E\n\u003C/ol\u003E\n\u003Cp\u003EThe exact sequence depends on the model and workload. Testing is still necessary, particularly with long contexts. Models may give uneven attention to information placed in different parts of the window, and a critical constraint can lose influence when surrounded by large retrieval results.\u003C/p\u003E\n\u003Cp\u003EUntrusted content also needs clear boundaries. Text retrieved from a document shouldn’t occupy the same instructional layer as system rules. Delimiters, typed message roles and explicit source labels help the model distinguish evidence from commands embedded within that evidence.\u003C/p\u003E\n\u003Ch3\u003EValidate the result before acting\u003C/h3\u003E\n\u003Cp\u003EA model response is an intermediate artifact until the surrounding application verifies that it’s safe and usable.\u003C/p\u003E\n\u003Cp\u003EFor tool calls, validation may include:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003EChecking arguments against the current schema\u003C/li\u003E\n\u003Cli\u003EConfirming that required fields are present\u003C/li\u003E\n\u003Cli\u003EVerifying identifiers against the active tenant or session\u003C/li\u003E\n\u003Cli\u003ERejecting unsupported actions\u003C/li\u003E\n\u003Cli\u003EApplying rate, amount or scope limits\u003C/li\u003E\n\u003Cli\u003ERequiring human approval for sensitive operations\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EStructured outputs provide a predictable interface for this process. By constraining the response to a defined schema, the application can detect malformed fields before they reach another service. Schema validation doesn’t establish factual correctness. A model may return a valid JSON object containing the wrong customer ID or an unsupported conclusion. Where accuracy carries operational consequences, the application may need additional checks against source data, business rules or an evaluation model.\u003C/p\u003E\n\u003Ch3\u003EPersist only the state needed later\u003C/h3\u003E\n\u003Cp\u003EAfter the call completes, the system decides what to retain. Saving the full transcript is straightforward, but retrieving the right fragment several calls later is much harder.\u003C/p\u003E\n\u003Cp\u003EUseful persisted state may include:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003EThe active record or entity ID\u003C/li\u003E\n\u003Cli\u003EDecisions already made\u003C/li\u003E\n\u003Cli\u003ETools already called\u003C/li\u003E\n\u003Cli\u003EConfirmed facts and their sources\u003C/li\u003E\n\u003Cli\u003EUnresolved questions\u003C/li\u003E\n\u003Cli\u003EApproval status\u003C/li\u003E\n\u003Cli\u003EThe current workflow stage\u003C/li\u003E\n\u003Cli\u003EA concise summary of earlier interaction\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EThe application should also record provenance: where a fact came from, when it was retrieved and whether it remains current. Without provenance, long-term memory may return a plausible statement that the system cannot verify against its source.\u003C/p\u003E\n\u003Cp\u003ERetention policies deserve equal attention. Stored context may contain customer data, confidential documents or information that later changes. For this reason, memory systems need mechanisms for access control, correction, expiration and deletion.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_core-context-engineering-techniques":{"id":"title-v2-764f70190a","additionalClasses":"anchor-title anchor-title--core-context-engineering-techniques","type":"heading2","lines":["Core context engineering techniques"],":type":"snowflake-site/components/title-v2"},"text_core-context-engineering-techniques_0":{"id":"text-1e953c1df0","text":"\u003Cp\u003EThe execution path above can also be understood through four recurring operations: write, select, compress and isolate.\u003C/p\u003E\n\u003Ch3\u003EWrite context\u003C/h3\u003E\n\u003Cp\u003EWriting context means persisting information outside the model’s immediate context window. Agents frequently write plans, notes, intermediate results or completed actions to an external store. On a later step, the application retrieves the relevant state and places it back into context.\u003C/p\u003E\n\u003Cp\u003EThis pattern supplies continuity across calls. The model itself doesn’t retain a durable memory of earlier requests. What appears to be memory is usually the result of the application storing information and reintroducing it when needed.\u003C/p\u003E\n\u003Cp\u003EThe format of that stored context influences later retrieval. A structured state object containing customer_id, case_status and approved_action is easier to query and validate than an unstructured paragraph describing the same facts. Narrative summaries remain useful for complex interactions, though important identifiers and status fields often need separate storage.\u003C/p\u003E\n\u003Ch3\u003ESelect context\u003C/h3\u003E\n\u003Cp\u003ESelection determines which information enters the model’s working set. The process may involve RAG, metadata filters, database queries, memory retrieval and tool selection. High-quality selection accounts for more than similarity. The application also needs to evaluate whether a result is authorized, current, authoritative and appropriate for the current workflow stage.\u003C/p\u003E\n\u003Cp\u003EIn some systems, retrieval happens in several passes. The first pass identifies candidate sources. A second query retrieves records from the selected source, followed by reranking or deterministic filtering. This approach avoids searching every available corpus for every request.\u003C/p\u003E\n\u003Ch3\u003ECompress context\u003C/h3\u003E\n\u003Cp\u003ECompression reduces the size of selected information so that it fits within the context window and remains focused, but it does risk information loss. For this reason, compression should be evaluated against realistic edge cases, especially when precise language, exceptions or numerical values affect the outcome.\u003C/p\u003E\n\u003Ch3\u003EIsolate context\u003C/h3\u003E\n\u003Cp\u003EIsolation keeps one task’s information from interfering with another. For example, a multi-agent system may give a research agent access to source documents while an execution agent receives only approved findings and a restricted set of tools. A SQL agent may need semantic definitions and database metadata, while a writing agent needs the query result and source citations rather than the full schema.\u003C/p\u003E\n\u003Cp\u003ESeparate contexts reduce noise and help enforce least-privilege access. They also limit the spread of untrusted content. A sub-agent processing external documents doesn’t need credentials or tool definitions associated with an operational system.\u003C/p\u003E\n\u003Cp\u003EIsolation introduces coordination work, however. The system needs a defined format for passing results between agents, along with rules for which state is shared and which remains local.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_memory-in-context-engineering":{"id":"title-v2-5546b78511","additionalClasses":"anchor-title anchor-title--memory-in-context-engineering","type":"heading2","lines":["Memory in context engineering"],":type":"snowflake-site/components/title-v2"},"text_memory-in-context-engineering_0":{"id":"text-fd0c78b093","text":"\u003Cp\u003EMemory is often discussed as a single capability, but production systems usually rely on several forms of storage with different purposes.\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003E\u003Cstrong\u003EShort-term memory\u003C/strong\u003E preserves information within the active conversation or workflow. It may consist of recent turns, a running summary and structured state.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003ELong-term memory\u003C/strong\u003E persists information across sessions. Examples include user preferences, prior decisions, reusable facts or records of past interactions.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EEpisodic memory\u003C/strong\u003E stores what happened during a particular run or event.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003ESemantic memory\u003C/strong\u003E stores generalized facts or knowledge extracted from previous interactions.\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003ERegardless of the category, memory requires retrieval. A model can’t use information merely because the application stored it somewhere. The system must identify the relevant memory, verify that it’s still appropriate and include it in the current context.\u003C/p\u003E\n\u003Cp\u003EPoor memory retrieval creates predictable failures. An agent may apply an old preference to a new situation, surface information from the wrong user or rely on a decision that has since been reversed. Recency, identity, task type and source confidence should therefore influence memory selection.\u003C/p\u003E\n\u003Cp\u003ESome information should never enter long-term memory. Sensitive data, temporary credentials and unsupported model conclusions require explicit handling rather than automatic persistence.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_context-engineering-for-agents":{"id":"title-v2-21c5eb4344","additionalClasses":"anchor-title anchor-title--context-engineering-for-agents","type":"heading2","lines":["Context engineering for agents"],":type":"snowflake-site/components/title-v2"},"text_context-engineering-for-agents_0":{"id":"text-8e8ea8fd28","text":"\u003Cp\u003ESuppose an agent receives a request to investigate declining product usage and prepare recommendations. The first call might contain the user’s request, account permissions and a list of available data tools. After selecting a data source, the next call includes schema context and the selected account. Following a query, the agent receives results and decides whether additional analysis is needed. A final call may receive only the confirmed findings, supporting evidence and a structured report schema.\u003C/p\u003E\n\u003Cp\u003EAt each stage, the relevant context changes. Agent state tracks that progression. It may record the current objective, completed steps, selected tools, intermediate outputs and remaining work. Without explicit state, the agent has to reconstruct its progress from conversation text, an approach that grows unreliable as the run lengthens.\u003C/p\u003E\n\u003Cp\u003ETool orchestration adds further constraints. The context builder needs to expose appropriate tool definitions, keep schemas current and prevent the model from calling functions outside its authorization. After each tool invocation, the system must decide how much of the result to preserve and whether the result should alter the plan.\u003C/p\u003E\n\u003Cp\u003ELoops and retries also affect context. If an agent repeatedly receives an error without a limit or revised instruction, the same context may produce the same failed action. Production systems often track retry counts, error categories and prior attempts separately so that the next call reflects what has already been tried.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_observability-and-evaluation":{"id":"title-v2-f7deb254ed","additionalClasses":"anchor-title anchor-title--observability-and-evaluation","type":"heading2","lines":["Observability and evaluation"],":type":"snowflake-site/components/title-v2"},"text_observability-and-evaluation_0":{"id":"text-54aa0aa693","text":"\u003Cp\u003EContext pipelines are difficult to improve when teams can see only the final prompt and response.\u003C/p\u003E\n\u003Cp\u003EUseful telemetry traces how the working set was constructed:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003EWhich sources were queried\u003C/li\u003E\n\u003Cli\u003EWhich records and passages were retrieved\u003C/li\u003E\n\u003Cli\u003EWhich filters were applied\u003C/li\u003E\n\u003Cli\u003EHow results were ranked\u003C/li\u003E\n\u003Cli\u003EWhich content was removed or summarized\u003C/li\u003E\n\u003Cli\u003EHow tokens were allocated\u003C/li\u003E\n\u003Cli\u003EWhich tools were exposed\u003C/li\u003E\n\u003Cli\u003EWhich state was loaded and persisted\u003C/li\u003E\n\u003Cli\u003EWhich sources supported the final answer\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EThis trace helps engineers distinguish model behavior from upstream defects. When an answer cites the wrong policy, the team can inspect whether retrieval selected the wrong version, the reranker favored it or the prompt assembly omitted source dates.\u003C/p\u003E\n\u003Cp\u003EEvaluation should test the context pipeline as a whole. A model may answer accurately when given a clean, hand-selected document while failing under realistic retrieval conditions.\u003C/p\u003E\n\u003Cp\u003ERepresentative tests should include:\u003C/p\u003E\n\u003Cul\u003E\n\u003Cli\u003ESimilar records belonging to different customers\u003C/li\u003E\n\u003Cli\u003EConflicting documents\u003C/li\u003E\n\u003Cli\u003EStale and current versions of the same policy\u003C/li\u003E\n\u003Cli\u003ELong conversations with earlier constraints\u003C/li\u003E\n\u003Cli\u003EUsers with different permissions\u003C/li\u003E\n\u003Cli\u003EMissing or malformed tool results\u003C/li\u003E\n\u003Cli\u003EContexts that approach the token limit\u003C/li\u003E\n\u003Cli\u003EAttempts to inject instructions through retrieved content\u003C/li\u003E\n\u003Cli\u003EState resumed after an interrupted workflow\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EMetrics may cover retrieval recall and precision, source correctness, answer quality, instruction adherence, tool-call validity, state retention, latency and cost. For agent workflows, completion rate and recovery from failed steps are often more informative than performance on isolated calls.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"callout_observability-and-evaluation_0":{"id":"text-1d2425771a","additionalClasses":"callout callout--tip","text":"\u003Cp\u003E\u003Cstrong\u003EQUICK TIP\u003C/strong\u003E\u003C/p\u003E\n\u003Cp\u003EMore context isn’t always better. First check whether the context is relevant, current, authorized and connected to the user’s task.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-regular text-color-text-05"},"title_context-engineering-on-snowflake":{"id":"title-v2-5ed602f5da","additionalClasses":"anchor-title anchor-title--context-engineering-on-snowflake","type":"heading2","lines":["Context engineering on Snowflake"],":type":"snowflake-site/components/title-v2"},"text_context-engineering-on-snowflake_0":{"id":"text-836a005345","text":"\u003Cp\u003EEnterprise AI applications need to know more than whether information is relevant. They also need to know whether the information is current, what its fields and metrics mean and whether the application is permitted to expose it. Those requirements make context engineering partly a governance issue.\u003C/p\u003E\n\u003Cp\u003ESnowflake can supply structured and unstructured context close to the governed data from which it originates. \u003Ca href=\"https://www.snowflake.com/en/product/features/cortex/\"\u003ECortex Search\u003C/a\u003E can retrieve relevant passages from documents and other text data, supporting the selection stage of a retrieval-augmented generation or agent workflow. Results can include source fields and be filtered through configured attribute columns such as tenant, date or product, helping the application assemble a focused and attributable working set.\u003C/p\u003E\n\u003Cp\u003EFor questions over structured data, semantic views define business concepts, metrics and relationships that raw table schemas don’t capture. Cortex Analyst is able to use this semantic context to interpret natural-language questions and generate SQL based on organization-defined business logic. An agent asking for revenue, for example, can use the organization’s defined calculation instead of inferring what the term means from a column name.\u003C/p\u003E\n\u003Cp\u003ECortex Knowledge Extensions add licensed or proprietary third-party content to the available context through shared Cortex Search services. Applications can retrieve this external knowledge without scraping websites or building a separate ingestion pipeline in the consumer’s environment.\u003C/p\u003E\n\u003Cp\u003E\u003Ca href=\"https://www.snowflake.com/en/developers/guides/getting-started-with-cortex-agents/\"\u003ECortex Agents\u003C/a\u003E is designed to manage more of the runtime process. An agent can reason over a request and use configured Cortex Search services, Cortex Analyst resources and custom tools to retrieve information and complete a workflow. Teams specify the available resources, tool descriptions and orchestration instructions, and the managed agent layer can then select among them and carry relevant results through the run.\u003C/p\u003E\n\u003Cp\u003EBy assembling context within Snowflake, teams can avoid exporting enterprise data to a separate retrieval environment solely to support AI applications. Snowflake access controls govern who can use each service, while engineers remain responsible for configuring service privileges, retrieval filters, token budgets, state management, validation and evaluation.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"title_putting-context-engineering-into-practice":{"id":"title-v2-a1702c1f3e","additionalClasses":"anchor-title anchor-title--putting-context-engineering-into-practice","type":"heading2","lines":["Putting context engineering into practice"],":type":"snowflake-site/components/title-v2"},"text_putting-context-engineering-into-practice_0":{"id":"text-2ff682890f","text":"\u003Cp\u003EContext engineering starts from a practical constraint: A model can act only on the information and tools available in the current call. Larger context windows increase that capacity, but they can’t determine which sources are trustworthy, which definitions apply or what state the task requires.\u003C/p\u003E\n\u003Cp\u003ESome platforms can automate parts of that work, including retrieval, tool selection and context assembly at runtime. But teams still need to define the data, instructions, semantic context, permissions and tools an application can use, then evaluate whether the resulting working set supports the task reliably.\u003C/p\u003E\n\u003Cp\u003EContext engineering gives teams a way to make those decisions explicit. Rather than treating model input as a static prompt or an incidental byproduct of the application, they can design, trace and improve the system that supplies context as the work progresses.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"},"callout_putting-context-engineering-into-practice_0":{"id":"text-412bd93068","additionalClasses":"callout callout--general","text":"\u003Cp\u003E\u003Cstrong\u003EKEY TAKEAWAY\u003C/strong\u003E\u003C/p\u003E\n\u003Cp\u003EContext engineering isn’t just about giving a model more information. It’s about giving the model the right information, in the right structure, with the right controls, for the task at hand.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-regular text-color-text-05"}},":itemsOrder":["callout__0","text__0","title_what-is-context-engineering","text_what-is-context-engineering_0","card_v2_what-is-context-engineering_0","title_why-ai-applications-fail-at-the-context-layer","text_why-ai-applications-fail-at-the-context-layer_0","title_context-engineering-vs-prompt-engineering","text_context-engineering-vs-prompt-engineering_0","title_how-a-context-pipeline-works","text_how-a-context-pipeline-works_0","title_core-context-engineering-techniques","text_core-context-engineering-techniques_0","title_memory-in-context-engineering","text_memory-in-context-engineering_0","title_context-engineering-for-agents","text_context-engineering-for-agents_0","title_observability-and-evaluation","text_observability-and-evaluation_0","callout_observability-and-evaluation_0","title_context-engineering-on-snowflake","text_context-engineering-on-snowflake_0","title_putting-context-engineering-into-practice","text_putting-context-engineering-into-practice_0","callout_putting-context-engineering-into-practice_0"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-medium"},"flexible_column_content_container_2":{"additionalClasses":"hub-sidebar","layout":"SIMPLE","id":"hub-body-aside",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"container":{"additionalClasses":"sticky-sidebar","layout":"RESPONSIVE_GRID","columnCount":12,"columnClassNames":{"text_943981956_copy_":"aem-GridColumn aem-GridColumn--default--12","text_copy":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","id":"container-5577eb0a29",":type":"snowflake-site/components/container",":items":{"text_943981956_copy_":{"id":"text-056f3454a5","additionalClasses":"eyebrow-text","text":"\u003Cp\u003EIn This Guide\u003C/p\u003E\r\n","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-regular"},"text_copy":{"id":"text-ef209a76a1","additionalClasses":"page-toc","text":"\u003Cul\u003E\u003Cli data-anchor=\"what-is-context-engineering\"\u003EWhat is context engineering?\u003C/li\u003E\u003Cli data-anchor=\"why-ai-applications-fail-at-the-context-layer\"\u003EWhy AI applications fail at the context layer\u003C/li\u003E\u003Cli data-anchor=\"context-engineering-vs-prompt-engineering\"\u003EContext engineering vs. prompt engineering\u003C/li\u003E\u003Cli data-anchor=\"how-a-context-pipeline-works\"\u003EHow a context pipeline works\u003C/li\u003E\u003Cli data-anchor=\"core-context-engineering-techniques\"\u003ECore context engineering techniques\u003C/li\u003E\u003Cli data-anchor=\"memory-in-context-engineering\"\u003EMemory in context engineering\u003C/li\u003E\u003Cli data-anchor=\"context-engineering-for-agents\"\u003EContext engineering for agents\u003C/li\u003E\u003Cli data-anchor=\"observability-and-evaluation\"\u003EObservability and evaluation\u003C/li\u003E\u003Cli data-anchor=\"context-engineering-on-snowflake\"\u003EContext engineering on Snowflake\u003C/li\u003E\u003Cli data-anchor=\"putting-context-engineering-into-practice\"\u003EPutting context engineering into practice\u003C/li\u003E\u003C/ul\u003E","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-size-small text-color-text-05"}},":itemsOrder":["text_943981956_copy_","text_copy"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-medium"}},":itemsOrder":["container"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-small"},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false},"flexible_column_cont_1786318617":{"id":"flexible-column-container-dd8188b062","propertiesId":"hub-faq","type":"2-column-40-60","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"large","bottomPadding":"large","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"hub-faq-intro",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"title_v2_copy":{"id":"title-v2-ef0c5e4304","additionalClasses":"hub-faq__headline","type":"heading2","lines":["Frequently Asked Questions"],":type":"snowflake-site/components/title-v2","appliedCssClassNames":"left-alignment"},"text_copy":{"id":"text-229cb9ea77","additionalClasses":"hub-faq__subheadline","text":"\u003Cp\u003EYour common questions about context engineering, answered by Snowflake experts.\u003C/p\u003E\r\n","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"}},":itemsOrder":["title_v2_copy","text_copy"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-extra-small"},"flexible_column_content_container_2":{"layout":"SIMPLE","id":"hub-faq-accordions",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"simple_snowflake_acc":{"id":"simple-snowflake-accordion-57c689c16f","additionalClasses":"seo-hub__faqs","showDivider":false,"accordionItemsList":[{"title":"Is context engineering the same as RAG?","richText":"\u003Cp\u003ERAG is one technique within context engineering. It retrieves relevant information and adds it to a model request. Context engineering covers the complete working environment, including system instructions, memory, tool definitions, state, context ordering, structured outputs and the logic used to write, select, compress and isolate information.\u003C/p\u003E"},{"title":"Does a larger context window eliminate the need for context engineering?","richText":"\u003Cp\u003EA larger context window allows the application to send more information in one call. It doesn’t determine which information is relevant, current, authorized or authoritative. Sending more material may also raise cost and make decisive details harder to identify. Selection, ordering and validation remain necessary regardless of window size.\u003C/p\u003E"},{"title":"How is context engineering different from fine-tuning?","richText":"\u003Cp\u003EFine-tuning changes a model’s weights through additional training. Context engineering changes the information and tools provided at inference time. Fine-tuning may help a model follow a recurring style or perform a specialized task. Context engineering supplies current, request-specific information such as customer records, policies, workflow state and user permissions.\u003C/p\u003E"},{"title":"What is a context window?","richText":"\u003Cp\u003EA context window is the amount of input and output a model can process in a single call, usually measured in tokens. System instructions, user input, retrieved documents, tool definitions, conversation history and the generated response all consume part of that capacity. A larger window increases capacity, though applications still need to decide which information deserves space and how it should be arranged.\u003C/p\u003E"},{"title":"What should engineers monitor in a context pipeline?","richText":"\u003Cp\u003EUseful signals include retrieval quality, source age, filter application, input-token volume, context truncation, tool-schema errors, memory selection, output validation failures and state loss across calls. At the workflow level, teams should also monitor completion rates, retries, latency, cost and the sources used to support the final result.\u003C/p\u003E"}],":type":"snowflake-site/components/simple-snowflake-accordion"}},":itemsOrder":["simple_snowflake_acc"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-gray-10-bg"},"flexible_column_cont_1467213961":{"id":"flexible-column-container-fc727f6cf3","propertiesId":"hub-explore-resources-header","type":"1-column","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"large","bottomPadding":"none","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"container-d354defae5",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"title_v2":{"id":"title-v2-da0753c840","additionalClasses":"hub-explore-resources-header__headline","type":"heading2","lines":["Explore AI Resources"],":type":"snowflake-site/components/title-v2","appliedCssClassNames":"left-alignment"}},":itemsOrder":["title_v2"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-gray-10-bg"},"flexible_column_cont_912630531":{"id":"flexible-column-container-0bffa9c9dc","propertiesId":"hub-explore-resources-grid","type":"1-column","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"small","bottomPadding":"large","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"hub-explore-resources-grid-inner",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"resource_chip_0":{"id":"content-chip-7846859d35","tagText":"WEBINAR","tagColor":"#EEBDD3","cta":{"id":"cta","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"https://www.snowflake.com/en/webinars/virtual-hands-on-lab/build-an-llmpowered-app-in-10-min-with-snowflake-cortex-ai-2026-05-27/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_EXTERNAL","text":"Read more"},"headline":{"id":"title","type":"heading5","lines":["Build an LLM-Powered App in 10 min with Snowflake Cortex AI"],":type":"snowflake-site/components/title-v2"},":type":"snowflake-site/components/content-chip","appliedCssClassNames":"snowflake-content-chip-white-bg"},"resource_chip_1":{"id":"content-chip-424e0aa8e5","tagText":"GUIDE","tagColor":"#AAE5EA","cta":{"id":"cta","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"https://www.snowflake.com/en/developers/guides/build-evaluate-rag-langchain-snowflake/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_EXTERNAL","text":"Read more"},"headline":{"id":"title","type":"heading5","lines":["Build and Evaluate RAG with LangChain and Snowflake"],":type":"snowflake-site/components/title-v2"},":type":"snowflake-site/components/content-chip","appliedCssClassNames":"snowflake-content-chip-white-bg"},"resource_chip_2":{"id":"content-chip-6d9f84a25b","tagText":"BLOG","tagColor":"#29B5E8","cta":{"id":"cta","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"https://www.snowflake.com/en/blog/easy-button-context-rich-ai-agents/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_EXTERNAL","text":"Read more"},"headline":{"id":"title","type":"heading5","lines":["The Easy Button for Context-Rich AI Agents"],":type":"snowflake-site/components/title-v2"},":type":"snowflake-site/components/content-chip","appliedCssClassNames":"snowflake-content-chip-white-bg"},"resource_chip_3":{"id":"content-chip-54c7428f2b","tagText":"EBOOK","tagColor":"#71D3DC","cta":{"id":"cta","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"https://www.snowflake.com/en/resources/ebook/building-trusted-ai--data-platform-essentials/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_EXTERNAL","text":"Read more"},"headline":{"id":"title","type":"heading5","lines":["Building Trusted AI: Data Platform Essentials"],":type":"snowflake-site/components/title-v2"},":type":"snowflake-site/components/content-chip","appliedCssClassNames":"snowflake-content-chip-white-bg"}},":itemsOrder":["resource_chip_0","resource_chip_1","resource_chip_2","resource_chip_3"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-gray-10-bg"},"flexible_column_cont_1158003461":{"id":"flexible-column-container-316c88a9ab","propertiesId":"hub-explore-topics-header","type":"1-column","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"large","bottomPadding":"none","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"container-4eb511b2c5",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"title_v2_copy_copy":{"id":"title-v2-46518f9079","additionalClasses":"hub-explore-topics-header__headline","type":"heading2","lines":["Explore AI Topics"],":type":"snowflake-site/components/title-v2","appliedCssClassNames":"left-alignment"},"text_copy_copy":{"id":"text-d7392f5312","additionalClasses":"hub-explore-topics-header__subheadline","text":"\u003Cp\u003EDeep dives into every aspect of artificial intelligence\u003C/p\u003E\r\n","richText":true,":type":"snowflake-site/components/text","appliedCssClassNames":"text-color-text-05"}},":itemsOrder":["title_v2_copy_copy","text_copy_copy"],"appliedCssClassNames":"snowflake-responsive-container-inner-padding-extra-small"},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-white-bg"},"flexible_column_cont_1377146023":{"id":"flexible-column-container-2d831bbafb","propertiesId":"hub-explore-topics-grid","type":"3-column-even","alignColumns":"top","containerMaxWidth":"extra-large","topPadding":"small","bottomPadding":"large","spaceBetween":"small","reverseOnMobile":false,"carouselOnMobile":false,"backgroundImageOption":"none","flexible_column_content_container_1":{"layout":"SIMPLE","id":"container-0674a3df9f",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"topic_card_0":{"id":"card-v2-bc703ece1f","configurationStatus":{"configured":true,"message":""},"type":"content-card","title":{"id":"title","type":"heading4","lines":["AI Engineering"],":type":"snowflake-site/components/title-v2"},"button":{"id":"button","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"/en/artificial-intelligence/ai-engineering/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_INTERNAL","text":"Learn more"},"text":{"id":"text","text":"\u003Cp\u003EThe discipline of building and operating production AI systems.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text"},"layoutStyle":"vertical",":type":"snowflake-site/components/card-v2"}},":itemsOrder":["topic_card_0"]},"flexible_column_content_container_2":{"layout":"SIMPLE","id":"container-ce79042f5f",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"topic_card_1":{"id":"card-v2-8844b9756b","configurationStatus":{"configured":true,"message":""},"type":"content-card","title":{"id":"title","type":"heading4","lines":["Harness Engineering"],":type":"snowflake-site/components/title-v2"},"button":{"id":"button","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"/en/artificial-intelligence/ai-engineering/harness-engineering/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_INTERNAL","text":"Learn more"},"text":{"id":"text","text":"\u003Cp\u003EBuilding the scaffolding — tools, memory and control flow — that lets AI agents operate reliably in production.\u003C/p\u003E\r\n","richText":true,":type":"snowflake-site/components/text"},"layoutStyle":"vertical",":type":"snowflake-site/components/card-v2"}},":itemsOrder":["topic_card_1"]},"flexible_column_content_container_3":{"layout":"SIMPLE","id":"container-c823eefb3b",":type":"snowflake-site/components/flexible-column-container/flexible-column-content-container",":items":{"topic_card_2":{"id":"card-v2-40f070dfbd","configurationStatus":{"configured":true,"message":""},"type":"content-card","title":{"id":"title","type":"heading4","lines":["AI Cost Optimization"],":type":"snowflake-site/components/title-v2"},"button":{"id":"button","showOutboundIcon":false,"buttonLink":{"valid":true,"url":"/en/artificial-intelligence/ai-engineering/ai-cost-optimization/"},"linkTargetContentType":"GENERIC",":type":"snowflake-site/components/button","linkType":"SNOWFLAKE_INTERNAL","text":"Learn more"},"text":{"id":"text","text":"\u003Cp\u003EControlling the compute and token spend of production AI systems without sacrificing output quality.\u003C/p\u003E","richText":true,":type":"snowflake-site/components/text"},"layoutStyle":"vertical",":type":"snowflake-site/components/card-v2"}},":itemsOrder":["topic_card_2"]},":type":"snowflake-site/components/flexible-column-container","isBlogPage":false,"isActiveTOC":false,"appliedCssClassNames":"snowflake-flexible-column-container-white-bg"}},":itemsOrder":["flexible_column_cont","flexible_column_cont_939100716","flexible_column_cont_1398138236","flexible_column_cont_663228916","flexible_column_cont_1786318617","flexible_column_cont_1467213961","flexible_column_cont_912630531","flexible_column_cont_1158003461","flexible_column_cont_1377146023"],":type":"wcm/foundation/components/responsivegrid"},"modal_container":{"layout":"SIMPLE","id":"container-5c33e041aa",":type":"snowflake-site/components/modal/modal-container",":items":{},":itemsOrder":[]},"markup_editor_928258845":{"id":"markup-editor-14d9bf7325","title":" ","cssContent":".snowflake-flexible-column-container-gray-10-bg\u003E.snowflake-flexible-column-container{background-color:var(--ui-background-05) !important}.text-size-regular:has(.seo-hub-hero__related-topic-label){display:flex;align-items:center}.hub-hero__headline span{text-transform:none !important}.hub-hero__subheadline p{max-width:70ch;margin-top:8px}.hub-hero__authors \u003E .container \u003E .cmp-container \u003E .aem-container{display:flex;flex-direction:row}.hub-hero__authors \u003E .container \u003E .cmp-container \u003E .aem-container \u003E div{width:auto !important;margin:24px 48px 0 0 !important}.hub-hero__authors .heading-5-v2{gap:var(--spacing-00)}.hub-hero__authors .snowflake-content-chip-button{display:none !important}.hub-hero__authors .snowflake-person-chip-content .body-2,.hub-hero__authors .snowflake-content-chip-content .snowflake-title-v2-line{font-size:16px !important;line-height:20px !important;font-family:\"Lato\",sans-serif !important;color:#000 !important;font-weight:600 !important}.hub-hero__authors .snowflake-person-chip-content .body-3,.hub-hero__authors .snowflake-content-chip-content .snowflake-title-v2-line:not(:first-child){font-weight:400 !important;color:var(--text-05) !important;font-size:16px !important}.hub-hero__authors .snowflake-image-container img{aspect-ratio:1 !important;border-radius:100%;overflow:hidden}.hub-hero__authors .snowflake-person-chip-avatar{width:56px;height:56px}.hub-hero__authors .snowflake-content-chip{align-items:center;display:inline-flex}.hub-hero__authors .snowflake-content-chip-image{max-width:56px;line-height:0;margin-right:var(--spacing-03)}.hub-hero__authors .snowflake-person-chip-inner-horizontal{gap:var(--spacing-03)}@media screen and (min-width:1367px){.hub-hero__headline .heading-1-v2{font-size:48px;line-height:44px}}#hub-explore-resources-grid-inner\u003E.container\u003E.cmp-container\u003E.aem-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:24px}#hub-explore-resources-grid-inner\u003E.container\u003E.cmp-container\u003E.aem-container::before,#hub-explore-resources-grid-inner\u003E.container\u003E.cmp-container\u003E.aem-container::after{display:none}#hub-explore-resources-grid-inner\u003E.container\u003E.cmp-container\u003E.aem-container\u003Ediv{width:calc(25% - 18px)}.text-color-text-05 .snowflake-text h2,.text-color-text-05.cq-Editable-dom h2,.text-color-text-05 .snowflake-text h3,.text-color-text-05.cq-Editable-dom h3,.text-color-text-05 .snowflake-text h4,.text-color-text-05.cq-Editable-dom h4,.text-color-text-05 .snowflake-text h5,.text-color-text-05.cq-Editable-dom h5,.text-color-text-05 .snowflake-text h6,.text-color-text-05.cq-Editable-dom h6{color:#000 !important}",":type":"snowflake-site/components/markup-editor","isGSAPEnabled":false},"markup_editor_597730182":{"id":"markup-editor-9766271349","title":" ","cssContent":".sf-copy-markdown [data-copy-md]{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;font-family:'Texta',sans-serif;text-transform:uppercase;font-weight:800 !important;font-size:14px;font-weight:500;color:#11567f;background:#f0faff;border:1px solid #b8e6f9;border-radius:24px;cursor:pointer;transition:background .2s ease,border-color .2s ease,color .2s ease}.sf-copy-markdown [data-copy-md]:hover{background:#ddf3fc;border-color:#29b5e8}.sf-copy-markdown [data-copy-md][data-copied=\"1\"]{color:#0f7b3e;background:#ecfdf5;border-color:#6ee7a0;pointer-events:none}.sf-copy-markdown [data-copy-md] svg{flex-shrink:0}.longform-conten .snowflake-content-chip-white-bg .snowflake-content-chip{box-shadow:0 0 24px 4px rgba(0,0,0,.02),0 4px 8px 0 rgba(0,0,0,.04);flex-direction:row-reverse;align-items:center}.longform-conten .snowflake-content-chip-button{display:none}.longform-conten .snowflake-content-chip-image__inner{aspect-ratio:5 / 3;display:flex;justify-content:center;align-items:center;background-color:var(--ui-01);border-radius:4px}.longform-conten .snowflake-content-chip-image{margin-right:0;margin-left:48px}.longform-conten .snowflake-content-chip-image img{width:50%;border-radius:0 !important;object-fit:contain}.longform-content .black-blue-text-color .snowflake-title-v2-line:not(:first-child){font-size:14px !important;font-weight:400 !important;color:rgba(0,0,0,.6) !important;margin-top:8px !important}.page-toc ul li:first-child{padding-top:0 !important}.page-toc ul li:last-child{padding-bottom:0 !important}.seo-hub__top-bar \u003E .container \u003E .cmp-container \u003E .aem-container \u003E div:first-child{flex-grow:1}.sf-copy-markdown{margin-top:40px !important}.page-toc ul{margin-top:16px !important}.seo-hub__top-bar \u003E .container \u003E .cmp-container \u003E .aem-container{display:flex;justify-content:space-between}.sf-copy-markdown{}.callout.snowflake-text p:not(:first-child){margin-top:var(--spacing-01)}.callout \u003E span \u003E p:first-child \u003E strong,.callout \u003E span \u003E p:first-child \u003E b{text-transform:uppercase;font-family:'Texta',sans-serif;font-size:16px !important;color:var(--ui-01) !important}.seo-hub-hero__subheadline p{max-width:50ch}.tag-group ul{list-style-type:none;padding:0;margin:0;display:flex;flex-direction:row;row-gap:12px;column-gap:8px;align-items:center;flex-wrap:wrap}.tag-group ul li:first-child{flex-shrink:0}.tag-group ul li a{display:inline-block;padding:2px 12px;border-radius:48px;background-color:#ededed;color:#666;font-size:14px !important}@media screen and (min-width:1367px){.seo-hub-hero__headline span.snowflake-title-v2-line{font-size:56px !important}}.callout.snowflake-text p:not(:first-child){margin-top:var(--spacing-01)}.callout \u003E span \u003E p:first-child \u003E b{text-transform:uppercase;font-family:'Texta',sans-serif;font-size:16px !important;color:var(--ui-01) !important}.seo-hub-hero__subheadline p{max-width:80ch}#hero:has(.snowflake-youtube-lite) .seo-hub-hero__subheadline p{max-width:50ch}.tag-group ul{list-style-type:none;padding:0;margin:0;display:flex;flex-direction:row;row-gap:12px;column-gap:8px;align-items:center;flex-wrap:wrap}.tag-group ul li:first-child{width:100%;flex-shrink:0}.tag-group ul li a{display:inline-block;padding:2px 12px;border-radius:48px;background-color:#ededed;color:#666;font-size:14px !important}@media screen and (min-width:1367px){.seo-hub-hero__headline span.snowflake-title-v2-line{font-size:56px !important}}",":type":"snowflake-site/components/markup-editor","isGSAPEnabled":false},"markup_editor":{"id":"markup-editor-40a7fadde8","title":" ","cssContent":"div.snowflake-breadcrumb a.snowflake-breadcrumb-item,.snowflake-breadcrumb div.snowflake-breadcrumb-item{text-transform:none;font-weight:500}.snowflake-breadcrumb svg{display:none !important}.snowflake-breadcrumb a:has(svg)::after{content:'/';margin:0 12px;color:#666}.hub-sidebar{padding:0 40px}.sticky-sidebar{max-width:340px;margin-left:auto}.page-toc ul{list-style-type:none;padding:0}.page-toc li{padding:8px 16px;border-left:4px solid var(--ui-01);cursor:pointer;transition:300ms ease all}.page-toc li:hover{color:var(--ui-01);border-color:#7fd3f1;transition:300ms ease all}.callout,.customer-card{background-color:#eef9fd;border-left:4px solid var(--ui-01);padding:24px 24px 24px 32px;border-radius:4px}.logo-container{max-width:180px}.longform-content li{margin-top:1rem !important}div.longform-content p{max-width:80ch}.bolder .snowflake-title-v2-line{font-weight:900 !important}.border-top\u003Ediv{border-top:1px solid #ccc;padding-top:48px}.related-topics ul{list-style-type:none;padding:0;margin:0;display:flex;gap:8px;flex-wrap:wrap}.related-topics li{display:inline-block;border:1px solid #ccc;padding:4px 12px;border-radius:24px}div.longform-content .snowflake-text h2,div.longform-content .snowflake-text .heading-2-v2,div.longform-content .snowflake-text h3,div.longform-content .snowflake-text .heading-3-v2,div.longform-content .snowflake-title-v2 .heading-3-v2,div.longform-content .snowflake-text h4,div.longform-content .snowflake-text .heading-4-v2,div.longform-content .snowflake-title-v2 .heading-4-v2,div.longform-content .snowflake-text h5,div.longform-content .snowflake-text .heading-5-v2,div.longform-content .snowflake-title-v2 .heading-5-v2,div.longform-content .snowflake-text h6,div.longform-content .snowflake-title-v2 .heading-6-v2,div.longform-content .snowflake-text .heading-6-v2{text-transform:none !important}div.longform-content .snowflake-text h2,div.longform-content .snowflake-text .heading-2-v2,div.longform-content .snowflake-text h3,div.longform-content .snowflake-text .heading-3-v2,div.longform-content .snowflake-text h4,div.longform-content .snowflake-text .heading-4-v2,div.longform-content .snowflake-text h5,div.longform-content .snowflake-text .heading-5-v2,div.longform-content .snowflake-text h6,div.longform-content .snowflake-text .heading-6-v2{margin-top:1.5rem !important;line-height:1.1 !important}div.longform-content .snowflake-text h3,div.longform-content .snowflake-text .heading-3-v2,div.longform-content .snowflake-title-v2 .heading-3-v2,div.longform-content .snowflake-text h4,div.longform-content .snowflake-text .heading-4-v2,div.longform-content .snowflake-title-v2 .heading-4-v2,div.longform-content .snowflake-text h5,div.longform-content .snowflake-text .heading-5-v2,div.longform-content .snowflake-title-v2 .heading-5-v2,div.longform-content .snowflake-text h6,div.longform-content .snowflake-text .heading-6-v2,div.longform-content .snowflake-title-v2 .heading-6-v2{font-family:Lato,sans-serif !important;font-weight:800 !important}div.longform-content .snowflake-text h2,div.longform-content .snowflake-text .heading-2-v2,div.longform-content .snowflake-title-v2 .heading-2-v2{text-transform:none !important;font-size:28px !important}div.longform-content .snowflake-text h3,div.longform-content .snowflake-text .heading-3-v2,div.longform-content .snowflake-title-v2 .heading-3-v2{font-size:22px !important}div.longform-content .snowflake-text h4,div.longform-content .snowflake-text .heading-4-v2,div.longform-content .snowflake-title-v2 .heading-4-v2{font-size:18px !important}div.longform-content .snowflake-text h5,div.longform-content .snowflake-text .heading-5-v2,div.longform-content .snowflake-title-v2 .heading-5-v2{font-size:16px !important}div.longform-content .snowflake-text h6,div.longform-content .snowflake-text .heading-6-v2,div.longform-content .snowflake-title-v2 .heading-6-v2{font-size:14px !important}@media screen and (min-width:992px){div.longform-content .snowflake-text h2,div.longform-content .snowflake-text .heading-2-v2,div.longform-content .snowflake-title-v2 .heading-2-v2{font-size:38px !important}div.longform-content .snowflake-text h3,div.longform-content .snowflake-text .heading-3-v2,div.longform-content .snowflake-title-v2 .heading-3-v2{font-size:26px !important}div.longform-content .snowflake-text h4,div.longform-content .snowflake-text .heading-4-v2,div.longform-content .snowflake-title-v2 .heading-4-v2{font-size:22px !important}div.longform-content .snowflake-text h5,div.longform-content .snowflake-text .heading-5-v2,div.longform-content .snowflake-title-v2 .heading-5-v2{font-size:18px !important}div.longform-content .snowflake-text h6,div.longform-content .snowflake-text .heading-6-v2,div.longform-content .snowflake-title-v2 .heading-6-v2{font-size:16px !important}}.sticky-sidebar .page-toc li.is-active{font-weight:600;color:var(--snow-blue,#29b5e8)}.sticky-sidebar .page-toc li[data-anchor]{cursor:pointer}.longform-content table{margin-top:24px;margin-bottom:24px;width:100%;background-color:var(--ui-background-01);border-collapse:collapse;border:2px solid var(--ui-background-09);font-family:'Lato',sans-serif;color:var(--ui-background-09)}.longform-content table thead{background-color:var(--ui-01)}.longform-content th,.longform-content td{min-width:120px;border:2px solid var(--ui-background-09);padding:var(--spacing-01)}.longform-content ol{margin-top:0 !important}.longform-content ol li{margin-bottom:1rem !important}.longform-content ul li{margin:0;padding:0 0 0 32px;position:relative}.longform-content ul{list-style-type:none}.longform-content ul li::before{content:\"\";display:block;border-radius:100%;background:#29b5e8;width:18px;height:18px;position:absolute;top:4px;left:0;border:5px solid #e5f2f7;box-sizing:border-box}.seo-customer.snowflake-card-v2-advanced-horizontal .snowflake-card-v2-advanced-image-container{max-width:200px}.seo-customer.snowflake-card-v2-advanced-horizontal .snowflake-card-v2-advanced-image-container img{object-fit:contain}.related-topics-outer-container \u003E .container \u003E .cmp-container \u003E .aem-container{display:flex;flex-direction:row}.related-topics-outer-container \u003E .container \u003E .cmp-container \u003E .aem-container \u003E div{width:auto !important;margin:0 !important}.related-topics-outer-container \u003E .container \u003E .cmp-container \u003E .aem-container \u003E div:first-child{margin-right:16px !important;flex-shrink:0}","jsContent":"(function(){var OFFSET=100;if(window.gsap&&window.ScrollTrigger){gsap.registerPlugin(ScrollTrigger);var sidebar=document.querySelector('.sticky-sidebar');var body=document.querySelector('.longform-content');if(sidebar&&body){ScrollTrigger.create({trigger:sidebar,start:'top 100px',endTrigger:body,end:'bottom bottom',pin:sidebar,pinSpacing:false});}}document.addEventListener('click',function(e){var li=e.target.closest('li[data-anchor]');if(!li)return;var slug=li.getAttribute('data-anchor');var heading=document.querySelector('.anchor-title--'+CSS.escape(slug));if(!heading)return;e.preventDefault();var top=heading.getBoundingClientRect().top+window.pageYOffset-OFFSET;window.scrollTo({top:top,behavior:'smooth'});history.replaceState(null,'','#'+slug);},false);var headings=document.querySelectorAll('[class*=\"anchor-title--\"]');if(headings.length&&'IntersectionObserver'in window){var io=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(!entry.isIntersecting)return;var cls=Array.from(entry.target.classList).find(function(c){return c.indexOf('anchor-title--')===0;});if(!cls)return;var slug=cls.replace('anchor-title--','');document.querySelectorAll('li[data-anchor]').forEach(function(li){li.classList.toggle('is-active',li.getAttribute('data-anchor')===slug);});});},{rootMargin:'-20% 0px -70% 0px',threshold:0});headings.forEach(function(h){io.observe(h);});}})();",":type":"snowflake-site/components/markup-editor","isGSAPEnabled":true},"experiencefragment-footer":{"id":"experiencefragment-96e3f6a5be","localizedFragmentVariationPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/footer/master/jcr:content","configured":true,":type":"snowflake-site/components/experiencefragment","xfModelPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/footer/master.xfmodel.json"},"experiencefragment":{"id":"experiencefragment-182af41fb1","localizedFragmentVariationPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/footer-legal-disclaimers/master/jcr:content","configured":true,":type":"snowflake-site/components/experiencefragment","xfModelPath":"/content/experience-fragments/snowflake-site/language-masters/en/site/footer-legal-disclaimers/master.xfmodel.json"}},":itemsOrder":["experiencefragment-banner","experiencefragment-header","responsivegrid","modal_container","markup_editor_928258845","markup_editor_597730182","markup_editor","experiencefragment-footer","experiencefragment"],":type":"wcm/foundation/components/responsivegrid"}},":itemsOrder":["root"],":hierarchyType":"page",":path":"/content/snowflake-site/global/en/artificial-intelligence/ai-engineering/context-engineering","isPasswordProtected":false,"analyticsContentTags":[],"analyticsEnabled":true,"coveoConfig":{"apiKey":"xx335921a6-2a0a-40f2-a167-e390b4766c3d","pipeline":"snowflake.com","searchHub":"snowflake.com","organizationId":"snowflakecomputingproduction8neljofn"},"analyticsDebugMode":false,"analyticsData":{"excludeFromAnalytics":false,"subCategory":"","pageType":"homepage","templateName":"base-page-template54","siteName":"snowflake","pageUrl":"/content/snowflake-site/global/en/artificial-intelligence/ai-engineering/context-engineering","language":"en","category":"general","pageName":"Context Engineering: Managing Instructions, Data, Memory and State for Better AI Systems","contentTags":[]},"locale":"en"}
  