Transcript#
This transcript was generated automatically and may contain errors.
Hello everyone, I am Chetan. I am on the product team at Posit where I own our Snowflake integration. And today I will show you how we deliver on AI-Powered R & Python Data Science You Can Actually Trust.
Three parts. Let's start with the problem and the context. So picture this. A data scientist gets access to a Snowflake database. They open the table and hours later a VP is making decisions from the same data product that this data scientist built. Now what happened in between is the crux of this talk.
Specifically, three things had to hold up for this decision to be trustworthy. Number one, an analytical collaborator. So a data science agent which knew when to lead, when to ask and when to use the methods that your team trusts. We call this calibrated autonomy.
Second, a dynamic data product. Not some pre-built widgets, but one that answered her follow-up questions live, composed new plots on the fly, all governed by her access. And third, trust end-to-end. Nothing is a black box. Everything is code backed. Everything reproduces. And all of that is powered by the Posit native app running inside Snowflake.
Two things worth knowing here. Firstly, Posit. We are the company behind some of the most widely used open source data science tools on the planet. Creators of RStudio, Positron, Shiny. Millions of weekly users. Everything code backed with an open source foundation. And that is not incidental. That is why the trust story holds up when you add AI agents to the mix.
On the right, you see Posit Native App. This is our enterprise data science platform running natively on Snowpark container services. So fully managed from a data scientist exploring a table to a VP making a decision. Explore to consume all inside your Snowflake account, your perimeter, your RBAC inherited, and cortex LLMs that just work out of the box. And one thing worth calling out explicitly is this is the only managed R runtime on Snowflake. Python and R both are first-class citizens, which makes it the only place on Snowflake where your multilingual data science teams have.
And one thing worth calling out explicitly is this is the only managed R runtime on Snowflake. Python and R both are first-class citizens, which makes it the only place on Snowflake where your multilingual data science teams have.
Data exploration and cleaning
OK, let's move to the demo. I'm going to start as a data scientist who's logged into the Posit Native App. And let's go through that flow. So I start firstly with Workbench. This is our developer tool. And I'm going to launch a new session in Positron, which is our data science IDE, which has a unified agent as well. And my credentials and RBAC are inherited. So when I open a new project, you can see the cortex LLMs. They just are available out of the box. And so I ask a data science agent to explore a table.
And it invokes a Snowflake skill based on the context and then connects easily to that table and gives me a snapshot of the data set. It's about two and a quarter million loans. And a couple of things start catching my eye. Number one, there seem to be some data hygiene issues as well as there is a semantic model available. So I go with the first recommendation of the agent and ask to look at a semantic model. Now, this is something that my organization has created and defines things which are business specific like leakage ratio and net revenue. So when agents do the analysis, they know exactly what that means versus relying on their training data.
OK, now let's do some data cleaning as I enable the cleaning mode. And I just point the agent towards the table and say, hey, if there is data being needed, let's just do it. And that starts an audit. And this is the first calibrated autonomy moment. Now, instead of going off on its own, the agent is using judgment to surface choices as recommendations. It's flagging what needs attention. The agent suggests, I decide.
And it just doesn't clean the data memory, it's asking me to create a clean view or table within Snowflake. And then it builds a script. So even the cleaning process is reproducible a month or six months from now. OK, now after this is done, I can actually see the clean Snowflake view that the agent has created from within the ID. I can see the stats, I can see the shape of the data, I can see the raw data, all of that.
Driver analysis and predictive modeling
Now that the data cleaning is done, I want to do some actual analysis. So I ask the agent to find factors which are impacting the interest rate in this data set. And it invokes a custom skill. Now, this skill has been built by my team. And the reason is we have a specific pipeline of steps that are certified and validated for any kind of driver analysis. These are real methods of how to do R-squared decomposition, specific visualizations that my team has standardized. And the skill does that along with giving me reproducibility information. And then at the end, summarizing the factors which are influencing the interest rate.
Now, for the next step, I ask the agent to run the same analysis, but segmented by prime versus subprime borrowers. So firstly, the agent decides what prime versus subprime means based on context. And then it is running the same exact pipeline, the same six steps, but with new parameters. That's reproducibility. You can see side by side compare graphically. And at the end, the table with the pattern summarized and some strong suggestions.
OK, now let's take it into a different direction. So I'm going to ask the agent to build a predictive model with this analysis. And the agent fires out the box skill, which we ship with Posit Assistant. And the first thing it's going to do is take the sample set and split it into test versus frame and provides me a baseline. And although it's a bit naive, it provides me a natural next step, which is to perform a linear regression with a median prediction and standard scalars. I take that recommendation and the CV results are coming back.
And OK, R squared. But let's look at the next suggestion. It sees that the linear regression didn't capture the non-linearity, so it recommends a gradient boosting regressor. So this is a senior data scientist call. But what is the rhythm here? The agent suggests and I decide.
OK, so we see the models plateauing here and the agents suggesting now a hyper parameter tuned. And I tell it to stop and validate instead of the holdout test set. And this is another calibrated autonomy moment. The agents suggesting the next step in judgment. But I don't want to run a computationally expensive hyper parameter sweep without me in the loop. We got the residual plots back and this is looking good.
The agent suggests and I decide.
Generating a Quarto report and building a Shiny app
So at this stage, I say I want to keep this analysis for posterity, maybe for me for tomorrow or share it with my peers. And all I need to do is write slash report. And that's going to invoke a scale and provide me an outline of all of the analysis that we have done and outline of the talk. And now I can always change this. But right now it makes sense. So I say, yes, let's go ahead with it. And this will start building that Quarto document. You can also build a notebook if you so prefer.
I think this is about seven hundred lines or eight hundred lines. And once this is done, because we are in Positron, we can just click on the preview button and see this this document. OK, so this is the table which we worked on. It has all of the code, the environment information and the summary, the analysis. This is not a chat log. This is an analytical artifact that can also be version controlled. Six months from now, someone on my team opens this, runs it, they get the same answer. Again, reproducibility.
For the next step now, I say let's turn this into an interactive data product. Let's turn this into a shiny app and connect it to snowflake data. And here I gave a very vague prompt. And this is the other side of calibrated autonomy. Because building a shiny app is the output is so verifiable. We believe in that case, human in the loop can just be friction. And so the agent just zero shots this.
So I can go and see that the agent created and press the play button to get a preview of this. So the app seems to have good bones. It has the driver analysis as well as the predictive model. But let's say I want to take it up a notch and I want to add a natural language forward UI, which is driven by context. And so I can do all of that with Posit assistant. For sake of time, I've already built that up. And let me just load that into the new project and show you how that looks.
OK, so you see, as it's loading up on the left side, you have a natural language UI where you can ask questions. And on the right, you have some prebuilt widgets which have the same lending cloud database, the two and a quarter million loads. And then I have a couple of tabs here on state analysis. And there's some load details there as well. OK, so this looks good. And now to ship it, all I need to do is literally click one button, deploy your project.
And all of the open source dependencies, all of that is being packaged and being shipped to Connect, which is our publishing or hosting platform. And I go to the Posit landing page, click on Connect, and I can see this data product that was just published here. And I can see this app now running in Connect. And to share it with anyone, I just need to go to the UI and copy the URL and then share it with them. And I can also add specific Snowflake roles to share with a full group.
End-user experience and data governance
OK, great. So now let's move to the next chapter. Let's see how end users interact with this product. So now I'm the end user, the VP from our opening story. She has the app, opens it, logs in with her SSO. And she's looking at all of the widgets. Yeah, this is what I'd asked for. So it makes sense. But I want to ask now some small business loads. I want to just see those.
So I ask that question that has text to SQL powered by Cortex and the whole dashboard updates, the whole dashboard reacts, including all of the tabs that are there. This is great. This is at par with what I expected. And now I ask a question about leakage ratio. Now, that's not defined anywhere in the dashboard here. And the agent comes back with the right answer. And more interestingly, leakage ratio was defined in a semantic model. And as you can see, the agent did a select start from semantic view. So this these interactions are semantically aware.
Now, for the next step, I want to look at a baseline plot. Now, this is not anywhere on this dashboard. Neither is it a cookie cutter kind of a chart. So let's see how the agent handles it. There you have it. Because we use grammar of graphics, we can compose these incredibly rich visualizations on the fly. And if you look at the query that was used to generate this, it's only six lines of SQL code. So reproducible, easily understandable and frankly, graceful.
OK, for my last question, I asked something about a little sensitive data type. So I asked about building a heat map with employment length, loan purpose and default rate with a specific color palette. And again, the agent is able to compose this dynamically. And I can see there are a few loan purposes where the default rate is higher and the employment length has some impact on it.
OK, so at this stage, I have what I need. But now an analyst on my team, she logs in on the same app. But she's seeing only half a million loans instead of two and a quarter million loans. And I can ask the same question, which is around employment length and building that heat map. And let's see what the agent does.
So the agent mentions that the employment length column is masked for her. And what we saw here was the same app, two different users getting two different answers. And that's because we are able to inherit and extend your data governance, your Snowflake role-based access.
And what we saw here was the same app, two different users getting two different answers. And that's because we are able to inherit and extend your data governance, your Snowflake role-based access.
Summary and next steps
So we went through a lot there. We went through the end-to-end data science workflow, starting from connecting to a table all the way to interacting with a data product all within the Snowflake perimeter. And three key things to take away. Number one, we used an analytical collaborator for building a data product. We had a data science agent that used calibrated autonomy.
Secondly, we had dynamic natural language visualizations. So end-user asked questions, charts were composed on the fly, governed by access, respecting semantic models, not pre-built widgets, dynamic data products. And finally, trust, which we saw end-to-end. Everything was code backed, everything reproduced, even my team's validated methods. I was able to reproduce them by using an agent to orchestrate the workflow.
If any of this resonated, we encourage you to try out the Posit Team Native app. You can scan this QR code or we'll leave a URL for you to click and get started. It's available on the marketplace and you get a free 30-day trial during onboarding. Thank you.