In enterprise AI, context—not code—has become the primary driver of intelligent behavior, as AI systems fail not due to lack of model intelligence but due to missing business context; successful AI implementation requires capturing five dimensions of context (business, technical, trust, operational, and domain) through semantic models, hybrid retrieval systems, autonomous agents, and governance frameworks, all unified within a single platform to enable governed, context-aware AI that can reason over both structured and unstructured data.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Behind the Cape - Context is the New Code: AI Engineering with Snowflake Cortex
Added:Hey everybody, welcome to another episode of Behind the Cape. I'm Data Superhero Keith Belanger. I'm excited to have fellow Data Superhero Karthik joining me today. Some of you may have seen him on some of our past episodes, but always a pleasure to have you back again. So, welcome Karthik.
>> Uh thank you, Keith. Thank thanks for having me here. It's always a pleasure to do yet another episode with you.
Looking forward.
>> Yeah. So, for those of you who have not met Karthik, can you give them a little bit of background about who you are and a little you know, tell everybody a little bit about yourself.
>> Okay, I'll start with a quick introduction for the benefit of the audience. Hello everyone, I am Karthik Raman. I'm based in India and I head the Snowflake practice at LTM.
In addition, I also lead the Chennai Snowflake Chennai user group chapter and I'm also a technical blogger. So, what you see on the screen is like the my LinkedIn profile. So, feel free to connect with me. And always happy to share my knowledge and expertise with the larger Snowflake community and learn from them as well.
>> Great. So, what topic do you have in store for us today for everybody?
>> Uh this is a interesting topic like this is a theater session I did at the year summit like last week.
Uh context is the new code. So, how we can do a context engineering with Snowflake.
So, that is what we are going to cover.
So, can we share the slides with the audience? Uh Is it okay?
>> Yeah, I'm sharing them right now. You're good to go. Go for it.
>> Okay.
So, I want to [clears throat] start with a simple question. Many of us will have seen a AI demo that looks absolutely magical and later then like when you expose it to a real enterprise data, it might fall apart.
So, I've been in the data and analytics space for more than like 23 years and here is what I've learned after spending years helping organization modernize their data platforms.
AI does not fail because models are not intelligent enough. AI fails because it lacks context and that brings us to the central idea of today's session, context is the new code.
Let me explain why.
Uh let let's travel back of just a few years. We have spent like enormous amount of time enterprises would have spent enormous amount of time building pipelines etc. We wrote ETL jobs, we created transformation logic, we built dashboards.
Every piece of intelligence in the system had to be explicitly coded by engineers. That was before the before Snowflake AI came into the existence.
If the business changed, we had to change the code. If schema changed, we had to change the code. If report changed, we have to change the code.
And then suddenly something interesting happened. The models became extraordinarily capable.
And Snowflake Cortex arrived. Suddenly we could do things like summarize, extract, classify, search, reason without writing any more additional code, but just by providing better context. Now we are entering the context native era. Agents autonomously decide like what to do, when to do, how to do, what tools to use, how to change them chain them together. All that agents decide on autonomously. They agents don't just execute instructions.
They decide, they plan, they orchestrate, they collaborate, which means the most valuable asset is no longer your code base. It is the context layer.
That is the paradigm shift we are talking about.
Moving on.
Yeah.
>> I was just going to say I can remember the good old days of having to write all that code.
>> [laughter] >> Yeah, we all went through that and then like now I'm glad like we don't have to go through that like anymore.
So, now that like we we have we accept that like context is the new fuel for intelligence, a far more important questions emerges.
Where does that context come from?
When we look at like large enterprises, context is not sitting in a single place. It is fragmented across departments, applications, policies, documents, metrics, and across across people. So, the moment you introduce multiple agents into the mix, you discover that agents intelligence is no longer the biggest challenge.
Bringing in a shared understanding is the most complex challenge. In fact, if you look at the large enterprises, um the hardest problem is like not getting the agents to think, it is getting the agents to agree on a common shared reality.
That is where like most agentic systems fail. When we are not struggling with the model intelligence like the all the models are like super brilliant like GPT-4, Claude, Llama, you name it, they are all brilliant. The struggle is giving the right context to the models at the right time with the right amount of guardrails. So, uh think about a scenario like what happens like when you ask a business question uh without context. The model will hallucinate, it will just like make up the numbers, and the model will give a confidently wrong answer. So, that is not a intelligence problem, it is a context problem. And what makes it even harder is context is not static. It changes with like who is asking, what is being asked, what role they have, what time of the data it is, when was the data last refreshed. So, it depends on a variety of factors. So, you need a dynamic, governed, real-time context delivery.
That is where like Snowflake is a game-changer.
It is one platform, one common semantic understanding, one governed source of truth.
So that every agent agrees on the same common reality before taking an action.
So um Snowflake changes like all the traditional problems like we had with context. Snowflake is a game changer there.
Okay.
Now moving on to the next part, okay.
Now that we are we are looking at a fascinating question. If the context has become the foundation of intelligence, should we still thinking about the AI system the same way we traditionally thought about the old data engineering platforms?
For decades, we always believed code creates behavior. But today, I would rather argue context is what like is going to create behavior. In traditional software, we wrote like hundreds of business rules. If this happens, do this. If that happens, do something else.
We were not just writing if-then-else branches. We were basically passing data and instructions. And the basically the model used to derive behavior from that. The quality of what we pass as an input largely determines the output.
So basically the model determines the behavior. The second thing is like traditionally we code queries the data. And like in the AI engineering on Snowflake, context is what like makes the data queryable.
Business users like they don't want tables. They want answers. So semantic model is what acts as a bridge between the business language and the data. It describes what your data means, the metrics, the relationships, the filters.
So the description is the context that makes natural language queries possible.
And the third quadrant if you look at it in traditional world, we used to write a lot of code to connect systems, but whereas in the AI engineering world, we give context to do orchestrate tools.
Agent node don't need like pre-defined workflows. They look at the context, the user question, and the available tools, the intermediate results, and based on that agents decide what to do, when to do, and how to do. Basically, context is the program.
And the context becomes the workflow, basically. And finally, in traditional world, we used to write a lot of code to enforce like rules and all that, but in the AI engineering world, context is what like inherits the governance. Governance should not be after thought.
That is the most important shift I feel.
You don't in the AI engineering on Snowflake in the new world like you don't write separate the security logic for your AI layer. The Snowflake security policies that protects the SQL queries automatically protects the AI response once as well. So, basically, governance will travels with the context. So, that is the most important shift I would say.
>> You know, one thing I want to just add here to what you're saying, Karthik, when it comes to context is the importance of getting to talk and communicate with your business cuz to right to get that context right, I've seen, you know, engineers and and folks assume the context, you know, without talking to their business participants and I think that's one key aspect to try to truly get that right context, you have to interact and talk with the people who will be using, you know, those those natural language queries and speaking in that context.
So, you have to get that language down, you know, and put that into that into the context into the semantic layer, for example.
>> Absolutely Keith, like you nailed it. The The business users like who knows the uh the functional domain, they have they have all the knowledge and then like that needs to be like clearly captured in the semantic model. That is absolute must.
Moving on, there are like multiple different dimensions of context that I wanted to cover here.
For me, I would I would broadly classify it as a five different dimensions of context. First is the business context.
What does the data mean? When somebody asks a business question, what is the churn rate, for example? The AI needs to know what what is the table like that it needs to look at, what date filter, what formula. So, basically semantic model encodes all of this.
Without business context, AI will generate a SQL that looks right, but it will do a wrong calculation.
So, that is the difference like semantic model is going to make. The second part is the technical context.
The technical context is more about how the data is structured. The column types, be it the joins, the partition keys, the freshness timestamps. So, all that technical context information is used by the agent to decide what Okay, what is the right approach to retrieve the data? So, should it do a table scan or full table scan or should it use a materialist view?
All that decision is made by the agents using the technical context. The third part is the trust context. This is basically what controls what AI is allowed to see. And honestly, most AIs AI solutions fall apart because of the trust context.
Snowflake security features like they define the boundary.
Uh PII data gets masked even before it reaches the model. That is the difference between the good successful AI solutions versus the ones that fail.
The fourth one the operational context.
A lot of things are there like be it query latency, warehouse load, pipeline failures, task history, all that are the operational context. Imagine you're creating an agent that notices the morning ETL job run failed and proactively alerts downstream consumers.
That is the operational context powering autonomous behavior. And finally, the domain context. What does the industry knowledge means? Uh You from the context point of view, this is the industry specific knowledge whether it's health care regulation, finance compliance rules, manufacturing shops, all that constitute the domain context. So, all these five context dimensions are equally important. So, here is a challenge like I wanted to leave the audience with. If they are currently doing any AI initiative, if they are struggling, it is not because the model is not performing. It is because one of these dimensions might have been like missed out. So, audience can can like look at their current AI initiatives and then like they can see if they are like capturing all the different five dimensions of the context that we I just spoke about. That is equally important.
I'll quickly move on, okay? Now, now that we looked at the all the five different um uh uh aspects of context. Now now I wanted to talk about, okay, how do we do AI engineering at scale on Snowflake?
So, now that we have established AI outcomes depend upon the five dimensions of the context, the next question is how do we operation operationalize these dimensions at enterprise scale?
Most AI architectures today are like assembled from multiple products. There will be a vector database for retrieval, there will be a orchestration framework for agents, there will be LLM platform for inference, there will be a separate governance tool for security, and there will be a lot of custom code to make everything work together.
But, Snowflake takes a completely different approach. It bring It brings the context engineering natively into the AI data cloud. So, there are four pillars I want to talk about. The first one is the Cortex Analyst.
Cortex Analyst use the YAML-based semantic model to encode business meanings. These semantic models defines entities, metrics, dimensions, joins, aggregations, business rules, etc. When the user is asking a business question like in a natural language, Analyst does not simply uh Cortex Analyst does not simply prompt a LLM and hope for the best. It grounds the generation process using the semantic model, produces verified SQL against Snowflake tables. The important part is semantic model becomes a reusable context layer, exactly. Instead of teaching every application what to do, when to do, we define it like once and then reuse it everywhere across the enterprise. That is the first pillar.
The second pillar is the Cortex Search.
Enterprise context like doesn't necessarily live in like structured tables alone. It is lives across the unstructured data, whether it could be the PDF, contract documents, policy documents, knowledge bases, support tickets, etc., etc. So, Cortex Search provides a hybrid retrieval by com- combining vector similarity vector similarity search with traditional keyword retrieval. At runtime, uh documents are automatically chunked, embedded, and indexed directly within Snowflake, and relevant context is dynamically assembled at runtime and injected into the model. This gives a governed rag without introducing a external uh vector database. So, that is about the Cortex Search. The third pillar is the Cortex Agent.
This is where the context becomes actionable.
Agents can orchestrate multiple tools in a single workflow. They can invoke Cortex Analyst to generate SQL, use Cortex Search to query unstructured data, execute queries, interpret results, and determine the next action step of action autonomously. What is important is context flows across every step of the workflow.
The fourth pillar is the Horizon Governance.
Context without governance becomes a liability for any enterprise.
So, Horizon governance ensures whether it is row access policies, masking policies, classification tags, lineage, RBAC controls. Together, everything every Cortex capability inherits these controls automatically. The model sees the data that the user is only authorized to access. And finally, Cortex Code, it brings all these capabilities together.
It understands business semantics through Analyst, retrieve knowledge through Cortex Search, uses agents for orchestration, operates within the Horizon Governance framework, which means code generation itself becomes very context aware. That is the power of Cortex Code. What do you think, Keith?
>> Yeah, I love the way you showed this because I think there are a lot of people that think of like Analyst Search and these agents as these independent things that can only use in singularity, right? And where you're showing it here is like, no, a given, especially with Snowflake Intelligence, a given natural language question might require that you're it's using Analyst Search, you know, and Horizon all at the same time, right? To bring back the right um answer to that question. It might have to scan, you know, um unstructured data and then it has to understand the context and then is that is that PII or sensitive data from a governance perspective so that answer comes back in the you know, securely, safely, and in the right context. So, I really like the way you show that here.
>> Yeah, that is the power of Koko. It brings all these capabilities together nicely.
>> Yeah.
>> Moving on, I wanted to talk about um what one of the I want to before we talk about the Snowflake architecture, one of the biggest challenges with enterprise AI is the architectural sprawl.
A separate model platform, separate vector database, separate orchestration frameworks, separate governance layer, all that. Each of these additional components in increases the complexity, latency, and mainly the operational overhead.
What makes Snowflake completely different is all these capabilities are brought together on a single platform.
Your structured and unstructured data, foundation models natively available within Snowflake, and then semantic understanding, agentic workflows, governance, all operating within the same environment. That means we are going to spend less time on like integrating the code, and etc. Fewer data movement challenges. And a single consistent security model. And a significant um faster path from proof of concept to production. So, enterprise AI becomes dramatically easier when the data, intelligence, and governance all exist like within the same unified platform.
That is the power of Snowflake we are talking about.
Um let's go one level deeper into Cortex itself. Every capability shows shown here contributes into a different form of context. When we look at the Cortex AI functions.
Cortex AI functions like provide manage LLM inference directly within Snowflake.
We can invoke models such as Claude, Lama, Mistral using SQL. The critical point is data stays within Snowflake secure perimeter. Inference always happens where the data resides, which is within the Snowflake platform.
Cortex analyst contributes to the business context, I would say. Natural language is translated into SQL using semantic models. The semantic layer constrains the search base and improves um the accuracy.
Without semantic grounding, text to SQL becomes unreliable, especially at large enterprise scale.
The third one is the context search. It contributes to the knowledge context, I would say. It combines vector retrieval and keyword keyword retrieval. It provides automatic chunking chunking and embedding and delivers sub-second retrieval performance for RAG applications.
Cortex agents, it contributes to the execution context, I would say. They maintain conversational memory, select tools dynamically, plan multi-step workflows, and orchestrate complex reasoning chains. Think of them as a intelligent control plane operating over your data ecosystem. And then finally, the Cortex fine-tuning. It contributes to the domain context. When organization can adopt like all the foundational models using proprietary data, with each training, which is done like within Snowflake, the result the resulting model becomes part of the same govern runtime. So, the way I would look at this, analyst provide business context, search provides knowledge context, fine-tuning provides domain context, agents provides execution context.
And the AI functions provides reasoning.
Together they create a complete runtime, which is the context runtime, which is the context Snowflake context.
And we are at the end of the presentation. In conclusion, what what I wanted to say is the shift from code to context is not coming, it is already here. Snowflake is the only platform where your data, your models, your retrieval, your agents, your governance all live together.
So I the audience, if you want to do one thing after the session, go and invest in your semantic models. That is the highest leverage move that you can do.
It It turns your data platform into something AI can actually reason over.
And remember, governance is not a nice to have, it is a must have. It is the thing that lets you ship your AI into production rather than being at a demoing stage.
So with that I can conclude the presentation. So looking forward to have the audience like reach out to me on LinkedIn and then like happy to discuss if they have any questions.
>> Yeah, I'm going to bring us back to the screen and that was great. You know what I what I find interesting Karthik is that what you talked about in context in reality from a data perspective. I mean, I've been in data for 30 years.
It's always been important. We kind of lost sight of that over the years, right? We're always like, you know, let's just get it in the data lake.
Let's just let data scientists at it.
Let's just And the context was in the person's mind who was trying to use the data, right? We kind of shifted that the user needs to know, right? And their systems didn't need to know. But AI is kind of remind from my perspective, AI has reminded us about the importance of that because AI doesn't have the experience, doesn't have, you know, the contacts and we have to now reintroduce what that into our development processes and in order to get it right. So, it's kind of like reversion is history. I guess you could say it's like something that we had to do many years ago.
And and now we kind of got away from it, but it's really in critical importance.
So, I thought I know I really enjoyed your your presentation and it's kind of a good reminder for the listeners that are out there of the importance of that and putting that into your development life cycle and building those relationships with your customer again and getting to understand the business. So, thanks for that. That was very well that was that was great.
>> Thank you, Keith. Thanks for the opportunity. Context again is going to be the most important thing in any AI systems that we are building and the customers are more and more spending a lot of time investing in building the right context for the AI tools and solutions that that we are building. So, it was a great opportunity for to be collaborate with you one more time and then share my experiences on this. So, looking forward to doing many more such sessions for our Snowflake community.
>> Well, thanks. Thanks for coming and and joining us today, Karthik. For the for everybody who's listening, you should be able to find his link to his LinkedIn below in the comments and until our next episode, thanks everybody. We'll see you all later. Bye.
>> Thank you.
>> [music]
Related Videos

Expanding Stikbot thumbnails
leopoldshorts
2K views•2023-09-24

Digital Discrimination: Cognitive Bias in Machine Learning
redmonktechevents2974
4K views•2019-12-18

Evolutionary Approach to Clustering by Ujjwal Maulik
ICTStalks
279 views•2019-06-26

Rose Yu "Learning from Large-Scale Spatiotemporal Data"
networkscienceinstitute
2K views•2019-03-04

Stanford Seminar - Generalization through Task Representations with Foundation Models
stanfordonline
4K views•2025-07-14

Satellite-Based Wheat Yield Forecasting using GEE & Transformer Neural Network
gisrsinstitute
634 views•2025-06-15

Paradigm Shifts in Data Processing for the Generative AI Era: Robert Nishihara of Anyscale & Ray.io
GradientFlow
2K views•2025-01-02

How to Build Your Own GenAI-Based Knowledge Management System
2150GmbH
360 views•2025-06-03
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23