Cursor for Data Science
Learn how data science teams use Cursor to accelerate analytics workflows, from exploratory analysis to production pipelines.
Terms in this video
Transcript
Um, as a quick introduction, uh, my name is Matt. I'm on the go to market team. So, I'll be monitoring today's chat channel. Um, so I have the amazing job again to speak to people about their AI deployments, uh, and AI kind of software development industry in general day in day out. And I'm um, paired today with Amarita who will be leading most of today's session really as we dive into a demo. Uh so the agenda is very quickly introduction to cursor and then we'll
very rapidly pivot into the demo and spend the lion share of uh today's time there. But for those who are brand new to cursor just want to talk about like what makes cursor fundamentally different and why it represents just like a new approach to building software in this AI era. So cursor isn't just an AI editor with AI features. We've built our own editor, CLI, coding agents from the ground up. So that's not simply just a plugin. So it means >> Oh, hey Matt, there's a popup at the bottom of your screen. Do you mind
closing that? >> Yes. >> Perfect. Go ahead. Sorry. >> Cool. >> Um, but this like uh bottoms up approach means that we're, you know, our interfaces are optimized for all workflows that you're used to and reimagined for this like human AI collaboration that we're seeing becoming more and more popular. So there's a bunch of different ways that we see folks using cursor, but obviously kind of core to that cursor um process is still this this IDE. So we've got strong agents running on top of a custom
harness that's optimized for every model and works well with real kind of live workflows. And you'll see that today really throughout the demo because this is where we're going to focus most of our time. But under the hood, what's powering this harness is semantic search that gives agents really kind of deep awareness of even the world's most large code bases. And it's not just generating code, it's able to reason across context.
So with that, hopefully this gives a little bit of a preview into the platform, but as I said, we want to spend as much time as possible actually in the platform today. So, I'm going to pause sharing my screen. Be answering questions in the chat channel and kick it over to Amita.
>> Cool. Hello everybody. Um, as Matt said, I am Amriita. I'm a field engineer here at Cursor. Um, and I'm going to be leading the cursor for data science uh section or demo today. Um, I for full transparency so I was a software engineer for the past six years. Um, dabbled in fullstack development, mobile development, some backend development. Um, so cursor for data science is actually relatively new to me too, which is awesome because I think we'll
probably get a fresh perspective of like, hey, maybe I'm a junior data scientist or maybe I'm a senior data scientist, but I'm learning data science in cursor for the first time and how to use it in cursor. So, we're kind of going to go on this adventure together. Um, and I like to adopt a persona before I do any demos. Um, and my persona today is going to be, hey, you know, I am a data scientist. um I work you know in Excel but I also do a lot of stuff in
Jupyter notebooks. Um how can I you know change my workflow to use cursor with these things. Um so real quick could I have folks maybe put in the chat this would be helpful for me. Um put in the chat uh on a scale of 1 to five like one I've used cursor before. Uh five sorry one I've never used cursor five I've used cursor before. um in the chat just so I can see um the best way to okay to oh wow cool okay so it seems like a mix but mostly fours and fives um which is
great so we can kind of make this a little more advanced I'll talk about some of cursor's features that have come out recently that um would be useful to all of you all um but with that said let's go ahead and get started um I'm going to do a couple things here I'm first going to show uh some of the docs that cursor has right now for data science. Um then I'm going to go inside cursor talk about you know how you would use a Jupyter notebook in cursor. Then
we'll actually import a Excel spreadsheet. Um and we'll do some playing around there with the data there. Um and then we'll wrap up and do some questions. Um Daniel has a hand raised. Daniel, you have a question. >> Okay, maybe not. Marina. Yeah, I'm seeing there are a fair number of like ones in the channel as well. So, I think even covering the basics will certainly be um helpful as well. >> Yeah, that's totally fine. Yeah. Um the numbers all came all at once so it was kind of a blur. Um but I will go ahead
and start sharing. So, the first thing I'm going to share here is if you are not already familiar with this um this is a really great resource um for anyone in data science. Uh cursor has a number of different cookbooks that we use um which is basically workflows for different um types of roles and the one that we have here for data science is really great um we cover a couple things here um and I'll cover them in particular in the cursor IDE as well um but if you want to do like development using Jupyter
notebooks um feel free to do that uh feel free to follow the instructions here we also talk about how to integrate with any database um uh frameworks So I'll actually show some examples of like integrating with superbase or integrating with Postgress because we actually have a very exciting update that came out recently about both of these uh integrations. Um and then we also have a little bit about extensions using Postgress, BigQuery, SQLite, Snowflake um any of these frameworks and what that looks like inside Cursor. Um
so feel free to kind of look at this as a reference um as I'm talking or maybe after the session. Um, I think it'll be really great to kind of get um a it's honestly just like a good place to start if you are figuring out how to incorporate cursor inside your data science uh workflows.
All right. Okay. So, with that said, I'm going to go ahead and start uh sharing the cursor IDE real quick. Um, so here we have the cursor IDE. Um, and so for folks who maybe are a little unfamiliar, um, this is kind of how I like to have it, uh, laid out in front of me, I have my terminal, um, or kind of like my output box at the bottom. Um, this is sometimes where I run git commands or where I, you know, run my shell commands. Um, I have my file explorer on
the side. So, I'm actually going to bring in a Jupyter notebook inside here. Um, but for now, I just have some CSV files that I downloaded from Kaggle. Um, and then I have an agent pane here. Um, and this is where we're going to be doing most of our interactions. Um, so when I launch a new agent, oop, you'll see that here. Um, this is kind of where you're going to be doing most of your work in cursor. Um, we'll walk through kind of what this agent pane um or what
the capabilities are uh throughout this demo, but just for what it's worth, um, these are the different modes that you can use in cursor. We'll use a couple of them today. This e these are the different models that you can use in cursor. Um we'll also use a couple of them today. Um and you can actually see um even more models um if you want in your model pane inside cursor. So these are the ones that I just have turned on because these are the models that I want
the quickest access to. Um but if you want to see the other models that are available, um feel free to to check them out. Um, we at Kursar are really, really proud of our model flexibility and our model agnosticism because we really believe that there are certain models for certain jobs. Um, for example, for today, I'm mainly honestly going to be using um, GPT 5.3 codeex. It has become kind of the cursor daily driver now. Uh, we've moved off of Opus a little bit
just because 5.3 is really smart, really fast, and a lot less expensive. Um, but I also would highly recommend folks trying out, you know, Cloud 46 Sonnet, which came out yesterday. Gemini 31 Pro just came out, I think like maybe an hour ago. Um, so if you're in cursor and you want to try that out, go for it. Um, and then Composer 1.5 is our uh in-house model that also came out recently and is our first reasoning model. Um, quick model uh I guess cheat sheet. Um, if it
has a brain next to it, that means it's a thinking model, and that means it should be used for more high reasoning, complex, nuanced tasks. If there's no brain next to it, that usually means it's just a standard model. Um, I usually use it if I want like fast, efficient, um, something to get done that doesn't require that much thinking. Um, so yeah, a little bit about models.
Um, again, if you don't want to think about what model to choose, you can all go ahead and just hit auto. hides that for you. Cursor is the one that's driving the model behind the scenes. Cursor will actually switch models for you if it feels like the the performance you're getting is degraded. Um, so again, if you're kind of a beginner, I recommend, you know, just trying out auto for a bit. But I also would highly recommend folks kind of having an
opinion on what models they like to use um and what models they prefer especially because and I'll actually go back to the docs for this. Um some models are a lot more expensive than others. Um and you will see that. So here's like the list of models and their capabilities. What models accept images? Um what models are thinking models? What models are good for max mode, which is basically a mode you'd only use if you're trying to like add documentation across like a 100,000 file codebase or you're trying to um uh
trying to audit for security vulnerabilities. Um the more maybe useful uh chart for you all is this pricing model here um which is shows you kind of what models are more expensive than others. As you can see, there is one model that is very expensive. Um, so please be careful when using that. Um, but then there are other models that are cheaper, um, that are great and we highly recommend trying them out and seeing how you like them. Um, model selection is as much of an art as it is a science. Um, we have whole trainings
on model selection and best practices there. Um, but I'll tell you that I love 5.3 Codeex. I love Composer 1 for implementation. And then I actually really like Gemini 3 for any design related work. So we're actually going to try Gemini 3 um, for some data visualization stuff today. Amazing.
Um, I'm going to go ahead and go back to my cursor IDE. So, we talked about the the modes. We talked about auto and the models. Um, I'm going to select 5.3 here. Um, and then a couple of other things just to shout them out. Cursor does accept image inputs. Um, occasionally, uh, it can sometimes be really, really great when I, for example, an example I saw recently is a team at, um, at a company was doing hand-drawn diagrams for all of their, uh, like technical designs and they just uploaded pictures of their hand-drawn
diagrams and cursor made them into um, mermaid diagrams. They published them to Fig Jams. So, especially if you're doing like uh whiteboarding or anything related to like any data science workflows that you want to, you know, have laid out, uh uploading an image there and having cursor translate for you is really great. Um, and then we also have this voice mode. If you feel like you're better talking than you are typing, you can go ahead and do that.
Um, I'm not a big voice mode person, but some people are. Awesome. Okay, so let's get started into our demo real quick. So, what I'm going to do is I'm going to pull in um a uh Jupyter notebook that I downloaded yesterday. Um so, a couple quick things here and you'll see this in the data science cookbook as well. In order to get the notebook in a good state, uh I did download a couple extensions. Um so, in your extensions marketplace in cursor, it's very similar
to VS Code. You can just go to uh the Jupyter Notebooks extensions. Um, and there's a bunch over here that you can install. Um, I kind of installed I think all of the ones, maybe a couple extensions I chose not to. Um, but I basically installed all the ones that I found relevant for my particular scenario. Um, and I just made sure that they were the ones by MS Tools AI. You can also check based on like how many downloads you have here. Um but yeah,
really great um extension to have especially in cursor because um you want to be able to use all the tools and all the extensions that you would normally in a notebook. Okay, so I have this Jupyter notebook. Let's start by first figuring out, okay, what does this notebook even do? Um so the way I'm going to do that is I'm actually going to change my mode from agent to ask. Um, and I'm going to say, hey, you know, let's say I'm a I'm a engineer on a new team at a new company, and I want to understand what this does.
Um, tell me about what this Jupyter notebook does. um and give me some suggestions on how to build a new data visualization in it or um some charts I can edit. So, I'm basically asking it to, you know, summarize what's going on here and tell me like how I can best get started playing around with it. So it's going to inspect the notebook contents first um and then it'll summarize what it currently does and then suggest you know chart ideas I can add or edit directly in it. What's nice
about ask mode is that ask mode never does any implementation. Um it only does like question answering. So I can be a non-technical person. I can be a PM maybe or I can be a manager. Um that just opens up this notebook inside cursor and uses it as like a research tool to basically like maybe I need to understand what my engineers are working on or I need to understand the type of data I'm working with. Um this would be a great kind of uh reason to use ask
mode. Cool. So I'm seeing this notebook is a Fitbook Fitbit activity analysis workflow built around SQL light. Awesome. Um it reads all the Fitbit CSV files from an input folder. It loads each CSV into a SQLite database as separate tables. Um, it defines some helpful functions and then it runs some analyses on it. So, here are some chart ideas. It's saying, you know, weekday average steps. Um, I can do steps versus calories. Cool. Activity minutes composition. Um, and then a daily trend
over time. So, this one I'm kind of confused by. So, I'm actually going to ask cursor maybe to give me some more detail. So you can say something like I don't really understand activities composition. Can you tell me more about that? And what it's going to do is it's going to doubleclick on this and explain it to me in like a more maybe understandable way knowing that hey I said I didn't really understand it. What do you mean by it? So let me scroll back up here and
it's saying this means how your total time is split across different types of activities. Okay that makes more sense to me. So, high intensity, moderate, light, mostly inactive. Um, and then I love when it gives me like analogies or like simple ways to think about things. So, it's saying if one day has these things, then this would be a total tracked minutes. This is why it would be useful and this is the type of charts I can create for that. Awesome. Okay. So,
this is now I kind of have a better understanding of my notebook. Let's go in and actually do some changes or let's make some changes here. So, I'm opening my notebook. I'm going to go ahead and run this cell. And I immediately see an error and it's saying no such file or directory. Um and I don't know why that's happening. Interesting. So what I can do actually is I can just copy this add it to the chat and now it is able to quickly access exactly what I'm running
in my cell. So, I'm going to say I'm getting an error here related to uh the notebook not being able to find my file. Can you help me fix it? And in this scenario, I'm actually going to change this from ask back to agent because I actually want cursor to do some implementation for me here. So, let's say, you know, it needs to maybe move some file files around or maybe it needs to understand what's going on. Um, that's when you want to maybe make that change from ask to agent mode so that I
would be able to figure it out. So, it's saying I found the issue. The notebook is using a Kaggle only path while the files are in my local workspace. I'm going to update the path to autodetect local versus Kaggle paths and also make the database output path work locally, too. Awesome. That's what I want. So, it says it's replace the path, but I can make it even more reliable so it autofinds the Fitbit folder from our current notebook directory. Cool. I
would like that. That sounds great. Um, and as always, I can continue chatting with cursor to continue to have it to make changes here. Um, but let me have it update it cell right now and then I can make those changes going forward. [snorts] Cool. So, it's saying if you're still seeing the same error, it's usually because the notebook is showing an old output. So, let's try rerunning it then. And looks like it was successful and it was able to see all the different CSV files that are in my folders. Amazing.
Okay, so this is an example of cursor kind of self-correcting um and understanding errors that happen. Um I love using the the add to chat function. It's really really great in just like pinpointing exactly where the issue is happening. Um we will use this quickedit uh scenario a little bit later. Um but I would really recommend add to chat. We always say at cursor that like context is king and this kind of scenario here where I added those particular file
numbers is the context that I'm giving to cursor. So this is kind of an example of like how you would solve an error in line inside cursor. Awesome. So I'm going to run a couple of of these others. Uh cool. See able to get the input path. Awesome. Then I'm going to run this. Um I'm seeing an issue here. I'm saying the pandas import could not be resolved. What I love about this is it has this fix with agent thing. So this is not really causing me
any issues. Maybe it's just an import error. But let me actually just click on this and see what's happening here. So it's saying, you know, for the code present, we're getting this error. Fix it, verify, then give a concise explanation. So again, this is not like a, you know, it's not a compilation error. It's still able to run my cell, but I am getting, you know, this this potential warning here. So let's see what's going on. Um, cool. And as we're
seeing, we found the root cause. Pandas exists in my system Python, but not in my virtual environment, which is what the notebook is using. So, it's installing it in my virtual environment now. And then it's will verify the import for me. Um, you'll find that cursor is great at self-verifying. Um, it's able to kind of figure out an issue um, and why it happened. And as you can see, awesome. Now that the import is uh imported, sorry, now that the import has
been added to my virtual environment, I'm no longer seeing that um that error. Cool. Okay, so now I'm able to see a couple kind of just data points here. Um what I could do is I can actually take this guy. I'm going to add it to chat and I can say what is this cell doing in particular? Uh again, change this back to ask mode. Um, and I can have it see exactly what it's happening. Okay, it's doing a quick load and preview of one CSV file and it's loading the pandas
library there. Cool. Okay, so now we're going to build our database here using SQLite. So, I'm going to go ahead and run these cells. Um, and then we're going to do some database inspection work. Um, so I'm running both of these cells. Let me actually close these. Um, and as you can see, the database um is I I obviously can't load it inside cursor because it's a DB file, but it's now been created in my um file explorer, which is great. Um, and I'm seeing that
all the tables have been saved successfully. Um, so now that these tables are saved, um, we can now start working with them maybe to create some charts, create some visualizations. Um, so you know what I'm going to do is I'm actually going to now switch from agent mode and ask mode to something called plan mode. Um, and that's where we actually recommend a lot of folks um, who are using cursor for the first time really kind of play around with it
because it's extremely powerful. So I'm going to go ahead and save this. Um, I have a bunch of, you know, database inspection tools and then, you know, this ISO date function that has been created. Um, and I'm not going to run any of these just yet. I'm first going to create a plan on what exactly I want to make. So, to do that, you want to change this to plan mode. Um, and what you're going to do is you're actually going to work with cursor to come up
with a plan that you want to make. So, I'm going to say, um, I would like to create, um, a set of charts that detail, um, the information from my Fitbit activity notebook. um including uh activity per day, calories, and anything else you might suggest.
Um I'm actually going to ask cursor, feel free to use the ask clarification tool to get more data from me. And what the ask clarification tool is, um, we'll see it shortly, um, is a way for cursor to actually maybe get more direction from the user on what it should be building. Um, so I'm going to go ahead and run this. Um, and we're going to see how cursor is able to understand a kind of vague prompt like this in order to create a plan on how to create something like
this inside a Jupyter notebook. So, it's going to plan next moves for a little bit. It's going to inspect our notebook structure, um, understand what data we're dealing with, um, and then it's going to give us a plan. Um, and what's really cool about plan mode is it loads inside your cursor environment. So, you're able to see your code and your plan side by side. Um, I was a engineer for the past six years and I remembered that creating technical design docs was
always a hassle because I could never link directly to the code. I would always have the technical design doc in notion or Google drive or something and I wouldn't be able to actually be like here's the code I want to change here's the code snippet I want to modify here are the files that I will be dealing with. Um with plan mode you'll have everything in one place. All right. And here's the ask clarification tool that I asked it to use. Um a lot of times if
your prompt is vague enough cursor will uh bring it up for you. Um so you won't have to ask it explicitly. But I asked it because I wanted to to get a little more detail and a little more direction on how I'm going. So, it's saying, "How should charts handle multiple users ID?" Great question. Um, let's just say show per user. Actually, no, let's do show population level trends. And then which extra domains should be included? Sleep patterns, heart rate trends, active
minute. Um, let's do sleep patterns. I find that interesting. Um, and so now that it has those answers, and I can always ask Cursor to ask me more questions. In fact, I love the question tool. And I actually have a skill, which we'll talk about shortly, um, that tells cursor that anytime you use plan mode, um, ask me at least six or seven questions before going in and making the plan. But now we can watch it make the plan in real time. Um, so as you can see, it's put a very kind of defined goal, which
is create a polished chart section in your notebook that summarizes activity trends, calorie patterns, weekday behavior, and sleep insights. This is the notebook to extend, reuse the existing SQL view logic. Um, the source tables are already loaded into SQLite, including these things. Um, it says these are the implementation steps. So, it's kind of detailing exactly what it's going to do. Um, and the great thing about plan mode is I can go in and I can
make changes here. So let's say you know I actually don't want to do the sleep focus charts. I can go ahead and just delete this um and then put the cursor will pick up that change in the plan. Um similarly I could you know add another step if I wanted you know cursor maybe to do some testing or if I wanted cursor to add a different type of chart. Um I could do that here as well. Um here's the suggested chart set which is what it would be delivering. Um, and it's here's
some notes saying, you know, I'll keep this aggregate only and if needed later, we can, you know, be extended to using per user. Um, cool. This looks good to me. I think one thing I want to highlight here is actually I'll I'll do one more thing, which is can you add a diagram explaining to me the flow of how this is being built? Um, Herser's mermaid diagram feature is really phenomenal. Um, I think they do a great job in making sure that the diagram is not overkill, but it's also showing you enough info as to what it's
going to be doing. Um, as I mentioned, there was that feature where you can upload a whiteboard and cursor will kind of make it for you. Um, but as you'll see here, kind of this is a little bit more maybe info than I would have wanted. And I can always ask cursor like, can you actually simplify this?
So, I'm actually going to ask it, can you simplify this diagram a little more? um because maybe I don't want to like see what this ISO data is doing. I just want a simple flow about how this is working. Um but I can always just keep iterating and iterating until I see something that I really like. Um as always, this is a mermaid diagram, so you can even go into the raw um the raw mermaid code yourself uh right here and edit it if you want. Um I don't know how
many folks are, you know, very wellversed in mermaid diagram language. I'm not. Um, so usually what I would do is I would drop this in uh inside cursor and just work with cursor to make it better. Um, but yeah, here's kind of a good build flow diagram that I think makes sense to me. Um, and I'm going to go ahead and now build this. So the last thing I want to point out here with plan mode, um, as you saw, I used GPT 5.3 for building the plan, but for actually
implementing the plan, I'm actually going to use composer one here. There's a couple reasons. The first is that it's a lot cheaper and the second is that it's a lot faster. And the third is that I already did all the heavy lifting with 5.3 to give Composer all it needs in order to run off and do its thing. Um, you should not be using the most expensive model to build your plan. We kind of compare it to like taking a Lamborghini to a grocery store. Um,
while it is nice and it is cool, um, it is expensive. um and there's no need to use the most expensive model um for simple implementation especially when you've done all the heavy lifting already. So rule of thumb here at cursor we abide by this and we recommend it to everyone is uh use a high reasoning model for actually working with cursor on the plan and on your strategy and then use a simpler cheaper model for implementation. Um, we get a lot of
questions as to like this plan is great, like how do I work with, uh, my team on a plan. Um, a couple suggestions. You could check this into GitHub if you want. Um, you can, you know, put it in your GitHub repository so that people can access it. You can even save it to your workspace and so that it's always there if you want maybe like a paper trail of all the features you're working with. As I mentioned, like it's able to easily link to places in your codebase,
which is really great from the plan. So even, you know, I could probably ask it like, "Hey, can you for each specific setup section or for each specific step, could you link to exactly where in the Python notebook I'm going to be making those changes or to what data it's referring to?" And it would be able to do that. And that kind of solves the problem that I mentioned before of like having your plan and your code in two separate places. Now it's kind of
consolidated into one. Um, cool. But with all that said, I'm going to go ahead and just start building this now. Um, and we can watch it work. Um, and as you can see, it's going to take these to-do lists here, um, and it's going to, uh, basically check them off one by one. Um, and you can also see here kind of the speed of composer one, it's pretty neat. Um, keep in mind that, uh, composer one, while it is like a fast model, it is a standard model. Um, so
while I usually like depend on it for building plans, sometimes if I feel like it's not giving me the output that I want, I'm like happy to change it to a different standard model. Um, sometimes, let's see, I would like to use like Cloud45 Sonnet. Um, I can also change it to Cloud 46 Sonnet Medium, which just came out recently. Um, but for now, it seems to be doing what I want. Um, so let's just continue watching it work here. Um, a couple of other things about
plan mode, um, which is you can also have multiple plans obviously for the same feature. Let's say you know you're working on a Python notebook and then you're also working on a web app that's going to be drawing data from your DB. Um you can have those plans side by side and you can use both of those plans um to build features at the same time. So I can have one agent here working on one plan while I have another agent running over here working on a different plan.
Um and that would be totally fine. They're not going to conflict. They're not going to overlap. Um they're just like separate agents working on separate sessions. Um, so that's a little bit about land mode. Um, I'm going to continue watching this work. Um, it's adding the sleep charts as you see. Um, and then once it's done, I'm actually going to ask cursor to test it for me and make sure that it works. Um, and this is going to be kind of new for both
of us. I've never done this before, so we'll see it in real time of what cursor thinks is the right way to test. Um but that will lead us into our conversation about um skills rules um and how you know what the best practices are for testing and asking cursor to test stuff in code bases.
Okay, I'll take a quick pause here. I see there's a lot of questions. Um I'm going to try and go through as many as I can. Um >> now as much as possible I've been trying to answer them, but there's >> Okay, amazing. Um, >> are you looking at the questions in the chat or the Q&A questions? Okay, here I see the Q&A questions. Amazing. Um, okay. So, a couple questions. I see. What differentiates Cursor from other tools like GitHub Copilot within VS Code? Um, determine I should switch. Um,
I'm happy to show a demo actually of Cursor and Copilot working side by side. Um, I actually did it. So for context, I've used all the AI tools. Um, at my previous company, you know, I was one of the people on the AI guild. So I have tried out everything. And, you know, there's a big reason why I came to cursor and chose cursor because it was just amazing. Um, cursor is a builtout product while copilot is an extension inside VS Code that's a little bit
limited in terms of both its capacities as well as its ability to run in really large code bases. Um, I'll show a side by side of cursor and copilot. I took this actually two days ago. Um so it's a very recent side by side um of both of the tools working on the same repository, same model, same prompt and you'll see a very clear difference. Um when you use both side by side, it really just is night and day. Um cursor also has a couple of really cool
features. Um debug mode is one of them. Uh another is cursor blame. Um and I just think the plan mode generally is is way better. Um that I would highly recommend. Um when to use cursor CLI? Um I will show that briefly. Um it really is a personal preference but what I would say is the cursor CLI can be used across multiple repositories very easily. Um so that's probably when I would recommend using it is maybe if you just want to do some like research
across many different things. Um cursor CLI is also great if you want to use it inside other IDE. So you can put the cursor CLI inside intelligj you can put it inside PyCharm. Um you can put it inside Android Studio. Um it's really kind of flexible that way. Um, cursor agents have trouble reading my Jupyter notebooks. Um, permissions issue or something else. Interesting. I have not read into that yet. Um, Samuel, if you want to maybe message or email
highcursor.com, um, our technical support agents uh, monitor that email at all times. Um, and they can maybe help you figure out if it is a permission issue. Um, but we can also keep doing this demo and you can see if there's any big differences there. um articles about not using roll anymore.
Thoughts here with regards to cursor rules. Um well ro so I actually haven't used roll at all. Um I use mainly if I want to give something a persona I'll use a skill or a sub agent. Um I'll talk about that a little more here. Um I'm just trying to get through as many as I can. Um specific scenarios we might want to keep using GPT codecs or other expensive models. Um, honestly, uh, I mainly just use reasoning models for when I'm doing planning or if I have like a really thorny bug and I need the model to do
like reasoning to figure out like where the bug is located. Um, I usually for quick implementation, I'll always stick with composer. But usually what happens um, and this is kind of kind of rule of thumb, start with the cheaper model. If the cheaper model isn't doing what you want, then switch to the expensive model. I would say that's just a rule of thumb. Um, if you know that something is going to require high reasoning, then obviously you don't need to try the
cheaper model for that. Um, but usually if you don't know, you know, if you're not sure, start with the cheaper model. Sometimes they're underestimated. Um, possible to have a plan be executed on by multiple agents. Yes, absolutely. Um, you can do this multiple ways. You can do this either using sub agents or using um, uh, parallel agents. So the way to do that actually is I can just have um I could say um I don't have a sub agent unfortunately built out right now. Um the way you do that is actually just by
create sub agent. Um so you can create a sub agent that says this sub agent is meant to build out uh charts in Jupyter notebooks. Um as you can see I'm kind of giving it a persona. Um, and what I'll do is I can, you know, have this sub agent in my codebase and then whenever I have a plan that requires building out sub aents, um, sorry, that requires building out charts, I can ask it to call this sub agent like three or four times and it'll launch three different
sub aents. So, here's my new sub agent. Um, it's a chart builder. It's an expert visualization um, specialist for creating these things. Um, what's cool about sub agents also is you can actually um change the model that a sub aent uses. This is a cursor specific feature which is awesome because you don't want all your sub agents running cop opus 4.6 and you know racking up a huge bill. Um, for a chart builder I only really need something like composer
1.5, you know, or GPT 5.3. Um, and now um, let's say I'm building out a new a new chart. I can say, can you launch three chart builder sub aents to build out um new charts uh that I have not built yet. Let's see if it's able to figure that out. Um and what it will should do is that it will launch these sub agents side by side um and then be able to understand uh what's going on and build out these new features. So, let's watch this really quick and so you
guys can see the sub agent UI. Um, and there we go. There's the three different chart builders. It's doing hourly activity patterns, intensity level, heart rate, which is great. These are three charts that I um I hadn't built before. Um, and you can see each sub aent work. So, I could see like, hey, this chart builder is working. Um, this chart builder is working on the heart rate stuff. Um, I can look in and see what they're doing. So, long answer, but
it was a good way to demo sub agents, which is you can have sub agents working on different parts of a plan. You could have parallel agents. So, for example, parallel agents are just multiple chats windows. Basically, that's how I describe them. Sub agents are like smaller agents that are working inside a bigger agent. Um, context management and how rules play into that. Um, this is I guess I guess this is a good breakpoint to talk about some of that. Um, so context management basically means how much are
you using uh tokens in your context window. So, for context, sorry. Um, this is a context window. Uh, a chat contains a context window. And you can see how much of your context window is filled with this little thing at the bottom. Um, let me try and zoom in. I don't know if I can make that bigger, but if you guys can see that little square at the bottom, that shows that I've used 10.7% of my total context. As you can see, it's calling on some active rules here.
So, it's saying I'm using cursor brand style guidelines. I'm using the test case writing rule. Um, and I'm using this absolutely right rule, which I actually am not sure what that does. Um, but rules take up space in your context window. Um, a rule is essentially a guideline that cursor abides by whenever making changes. Um, a skill is like a recipe or an instruction. And then a sub aent like the one I displayed here is a persona or you know a a basically a a
smaller cursor a baby cursor that's working inside that has a set of very clear uh instructions on how to work um rules skills sub aents they're you know the bread and butter behind cursor they can also be kind of confusing so I've distilled it down to an analogy that I think makes sense a rule is like you should always wear your seat belt A skill is this is how you parallel park. These are, you know, the instructions on how to parallel park. And then a sub agent is your car is on autopilot and it's
parking on its own. Um those are kind of the three ways to differentiate between them. Um we have a lot of really great docs on all these things. Um here are some docs about rules. Here are some docs about skills, how skills work. Um you know, examples of skills. for example, this is like a deploying skill and then sub agents very similar to what I just showed with like the chart builder sub agent. Um, so again, feel free to check out the docs, the cursor
docs. As someone who's read docs for many, many years, they're really quite phenomenal. Um, they're very easy to understand and they're also just very concise. You know, they don't just go all over the place. Um, so highly recommend scale sub agents and rules if you want a little more clarity on that.
Um, to answer the question, rules do take up context window as you see here. Um, but the shorter your rule is, and the more concise it is, the better. Um, as you can see, the sub agent is like about 150 lines, maybe a little less. You want to keep your rules and skills around the same. Um, everything rule, skill, sub aents, they're all markdown files. They just all look a little bit different. Um, but that is kind of what helps cursor work and gives it context.
um some context management quick tips and tricks here. Um I don't want to spend too long because I want to get back to our demo. Um but if you want, let's say you're, you know, running up the the context window here, you're at like 70 80%. Um you'll start seeing a little bit of degraded performance, your agent might be slower, you might not be getting the response that you want.
Quick trip quick trick there is just using slummarize. That actually condenses your context window by getting rid of any unnecessary tool calls. um it'll get rid of like explore and all of these things that it was just doing in order to do its understanding. Another quick trick that I think a lot of folks maybe don't know about is you can actually use the context from a previous chat to continue a conversation. So let's say, you know, I've had a really
long chat with this guy. It's getting to like 80% of my context window. I can start a new chat and then do at past chats and then I'm able to get context from a previous chat. And what it will do is it'll actually smush the context there and make it as concise and as uh like compressed as possible. So it will take out any external tool calls. Um it will basically remove any MCP integrations that were done there because you know they've already completed and finished. Um and then you can just use that to be like uh spinning
from this chat. Um can we talk about blah blah blah um or you know and you can continue the conversation that way. Um, so those are some quick context window tricks um, for folks who want to make the most out of their context. >> That certainly got the most amount of emoji reactions [laughter] session.
>> Yeah, I there's a couple of other things. Um, if we open up the agent pane again, you can now fork a chat. Uh, which means that it will take the context from that previous chat. Um, and you can like make a new chat from it and start, you know, working again. This is actually a recent feature as of yesterday. as of cursor 2.5. Um, so you can use this as well as a way to continue building on previous contexts. Um, by the way, if you're not on cursor
2.5, quick plug to update. Just go to cursor, check for updates or restart to update and you should be on the latest version. Okay. Um, so let's go back to our original demo. Um, went on a quick tangent there. Um, and let's see what happened. Um, I think where was this?
Trap builder sub agent. this guy. Okay, so looks like it completed implementation completed. Add a visualization section. What was added? All of these things, chart features. Um, so this notebook now has new cells. Um, so I'm actually going to say, can you run the new cells and show me um the charts that were built? I don't know if it can or if I have to do that manually, but let's find out. I'm gonna put this on four or five because um I'm asking it to do something that I'm not sure of its capabilities for. But let's
see. So say I'll run the notebook to execute the new visualization cells. Cool. And show you the charts. So it's first going to check the current state of the notebook. Then it's going to run it. Amazing. Um one thing that I would highly recommend using cursor for um I'm sure a lot of you folks have dealt with like issues with pip and python versioning.
Um I know I have had my fair share of frustration there. cursor is really great with that. Um, something that I learned recently is that because Python is such a popular language, a lot of the models have been trained on Python. So, because of that, it's able to understand Python and Python issues really really well. Um, so if you use, you know, cursor inside of PyCharm or cursor in any like Python library, it's really able to to do well with that. Um, cool.
So, it's saying that I didn't install the mattplot lib library, which seems pretty key for building charts. So, it's going to install that and try again. Um, let's let it run for a bit. Um, looks like it's still working. Um, I can take another question while it's working. Um, data exploration using cursor, figure out how tables connect and the proper fields to focus on. Um, we're going to do another like advanced data science workshop areas. So, I'm happy to do that
in the next one. um if I don't have time for this um but if not um feel free to look at the cookbook and see if that helps out at all there. Okay. Do I have to open a new chat to run sub agents? Um it depends. So there are some models that are not trained for running sub aents. For example, you cannot run sub agents using composer one. Um rule of thumb, I think you need to use a reasoning model for sub aents. Um, but I would probably try and use a
high reasoning model. So I would use something like GPT 5.3 or Opus 4.5 for running sub aents. If you see uh that sub aents aren't running, it's probably because your model is not strong enough. Okay, so looks like it's doing some debugging for me. Um, which is a good segue into debug mode. Um, I don't know if folks have used this before. It is quite good. Um, basically what debug mode does is it adds logging to your uh codebase and you know what any good engineer would do and
it uses that instrumentation and logging to figure out what the issues are. So what we're actually going to see here is now that this is done. So let me run this notebook then um should I just run it from the top um or let me actually see which agent I should run. And I'm going to go to the bottom um and see here. Explore the relationship between heart rate and activity levels. Let's try this guy. So I'm going to run this and let's see. Okay, I'm getting an error. This is not defined. Um and
that's probably because it's not imported. So very easy. What I can do is I can say I'm getting an issue with with an import of PLT for the heart rate. Can you help me fix it? And actually, let's actually try out debug mode here and see how it does. Um, so debug mode is meant for like thorny bugs, not so much like import issues like this. Um, but what debug mode will do is it'll actually come up with hypotheses on what it thinks is wrong.
So, we'll use instrumentation and logging in order to do those things. Um, oh, I think maybe I had to run an import ahead of time. So, maybe let's do that earlier and then we'll be able to do it. But as long as we have the import cell in it, I think it should be fine. Um, but debug cell uh, sorry, deb debug mode is great. I would highly recommend folks trying it out and seeing um, seeing it work. Um, as you can see here, it's kind of know it knows exactly what
the import issue is. Um, so it's maybe not going to do like the whole hypothesis and logging here. Um, but it is really great for solving solving issues. So if you want to try it out, I highly recommend it. I've used it for a lot of like web app and like server side rendering hydration issues. Um, and it's been really great there. Okay, so looks like it's running now.
It's verifying that the import cell was added correctly. Um, and then let's go ahead and see if we can run this again. Um, any other questions here while this is running? Sorry, I lost the Zoom chat. There we go. Um, can cursor execute Jupiter cells? That was what I was trying to figure out, Alex. I don't think it can do it ma or automatically. Um, I think maybe there is some MCP server that I have not found yet. Um, probably some that someone has built that can do it. Um, but right now
I think I'll have to run it auto uh manually myself. All right. So, let's try this guy one more time. I think there were was it this one? Heart rate distribution. Let's do this one. Okay. Scroll down. Visualization libraries con confirmed. Okay. Operational error. Um, ambiguous column name. Interesting. So, what I could do here actually and I wish I could actually copy this output into cursor. Unfortunately, you can't. But what I could do is I can just copy this
entire cell. Um, so a way to do that is I can just do this. Copy this. And then what I'm going to do is I'm going to do this quick edit. Um, and what quick edit does Oh, where did it go? Sorry. Um, I'm going to copy this and then here we go. Quick edit. Command K is another way. And I'm going to say I'm getting an operational error here.
Um, any ideas on how to fix it? As you can see, it's using auto here as my model. Um, which is fine. Um, you have limited options when you're using your inline edit. I'm actually going to use op, sorry, opus here. Um, because I want to figure out the the situation quickly. Um, but this is also a quick way of seeing inline edits happen in real time. So, as you can see, it's doing some changes here. Um, the only thing about this is that you can't really see its
reasoning as to what it's doing. Um, so I can either accept or reject the changes. Um, I'm just going to go ahead and accept them right now. Um, and see if that fixes them. Um, and then I'm going to go ahead and run this again. Um, so command K or in or inline edits is is great. Looks like that worked.
Okay, awesome. Um, and then I might have to import these. So I'm going to go ahead and do that fix with agent. Um so as you can see like working with Jupyter notebook inside cursor is fairly straightforward. Um as someone who's you know not a data scientist I'm sure that someone who's more a little more experienced than me would be able to understand the errors a lot faster maybe pick them up a lot quicker. Um but I think even for new you know new data
scientists or for someone who wants to learn data science this is like a really great way of just getting started in it. Um just jumping in understanding the errors. Um, and what I love about cursor is that cursor is very verbose in explaining what's wrong. So, it's saying like, hey, this is what was the issue.
This is what I did and this is the explanation. Because the reality is that I don't want to just cursor to take the reigns and for me to just, you know, not learn anything or not understand anything. I want to know what was wrong and I want to know how to fix it so I can, you know, be better for next time.
Um, so looks like they're imported and then now let's try this guy. Oh, we're so close. We seem like we have the graph, but then the time series is not. So, let's try one more thing. Um, let's see what the issue was. Um, we have an issue with the cell. I'm actually just going to copy and paste this here. Um, and say I'm getting this error in cell 30. Um, I think that was the name of the cell, right? Cell 30 or 31. Um, and it's going to investigate it for me. You can also even do this from the
terminal. So if you have like terminal errors running um what you could do is you can actually copy and paste that from the terminal and similarly add to chat. Um and that's another way of doing that as well. Um so it's saying cell9 is using this. It's adding a check to ensure the data exists all of that. Um cool. Yeah that's that's kind of what cursor does is it's mainly meant to be like a debugger but also meant to understand why certain things are
working. Okay. Um, we have about 8 minutes left. I'm going to check the chat or the Q&A one more time for more questions. Um, how do I verify the code generated by LLM? Um, so a couple things. The first is we have this little review button at the bottom. So, as you can see here, whenever cursor makes any changes to code, um, or even here in when I built the the chart, uh, I forget where that which agent that was in. Um, you can see all the changes it's made just by hitting this review. Um, we always
recommend that people review their code. And you'll actually see cursor invest in code review very heavily over the next couple months because our mentality is that the more that AI will generate code, the more that it needs to be reviewed and the more that that process is going to going to become a bottleneck. Um, so I recommend uh always reviewing whatever code that's generated. Um that's you know kind of the the beauty of being an engineer is
that a lot of your time is unfortunately spent code reviewing but that's also where you learn the most. Um so we try to make the code review process still very transparent. We don't want it to be a black box. How do I um instead of cur uh yes instead of cursor does the LLM just autoinstall the packages or does it create a new virtual environment? Great question Sky. So when I prepped this demo yesterday it actually asked me what I wanted to do. It asked me do I want to create a a VNV or do I want to do it
inside my package or inside my project and I opted for it to be done in a virtual environment. Um but it is up to you and cursor kind of helps you make that decision. Okay. So run the cell that creates heart rate cell 90. Let's see where that is. I'm having trouble figuring out the numbers of the cells. Um but let's see where that is. Um, if I run this again, will this work or will I need to run that cell? Um, actually, let me see.
Let can you actually see, can you link me to where cell 90 is? I'm curious. Oh, sorry. I want to change that from debug mode to agent mode. Um, I'm actually curious to see if it's able to interact with the Jupyter notebook in line and see where it is. Cell [snorts] 90 is the code cell that creates heart rate. So, here is the cell 90 content. So, unfortunately, it's not able to show it to me inside the Jupyter notebook. itself, which is a little bit of a
bummer. Um, but I could just It's saying search for heart rate data preparation in the notebook. Um, or scroll to this um and look for the cell that queries heart rate sections. Um, so I'm going to go ahead and do that. Again, um, all of these not in here. Um, all of these notebooks are free. I just got them off of Kaggle. So, you're welcome to do this demo or watch this demo and do it again with me. and you'll probably be able to get it working faster if you're, you
know, more in the data science field than I am. Um, but what I will say, so let me scroll up to the heart rate analysis part at the top here. Is it right here? Um, go ahead and run this guy. Cool. Then I'll run this guy. Got a syntax error. Let's go ahead and do a quick inline edit here. Fix the syntax error.
[snorts] And it's cool. Okay. So, let's try this again. Looks like that worked. And then let's see if this now works. So, I'm going to execute this. Awesome. Execute this. Cool. And this one. And one more. And now let's try this. This was the one we wanted. And there we go. There is our daily average heart rate over time. Um just required me to go back and run a couple cells beforehand. Um cool. Uh Sky. So now I'll I'll stop for now with the demos. Um and I will uh open it up for some more questions. Um the other
part of the demo that I wanted to show which um folks are welcome to try on their own is um we're also very good at importing Excel sheets um and getting that like put in like a dashboard or a CSV. So I had this huge Excel sheet actually from the department of education about like funding for the DOE. Um and what I can honestly do here is I can ask it to you know can you convert this actually I'm going to do that. Uh, can you take some of the data related to funding in the California
Department of Education and create a new Jupyter notebook quering that data? Um, I'll let this run in the background and hopefully we'll get to some sort of state. It's a huge file so I don't know how long it will take. Um, and as you can see, it's actually using the brainstorming skill here. um which is a skill we created whenever we're asking it to use like uh creative tasks. Um but it's going to go through the Excel sheet and do something like that. Um but in the meantime, while this is running, I'll take some more
questions. Um Sky says, "I love using cursor. My ability to write code has decreased. How do you balance this dilemma?" Um very real Sky. I'm not going to lie to you that I think this is a real issue that we're hearing from a lot of people. I think two things here. The first is that cursor is meant to be an enabler. It's meant to help you learn uh new types of workflows and new types of code um or just new language generally. For example, I'm not a data
scientist, but I learned so much just prepping and doing this demo with you all. Um I learned like what Python virtual I mean I knew what Python virtual environments are, but now I know how they're used inside, you know, cursor. I now know like what are the import statements I would need in order to run um make charts or do data visualizations. Another thing is that I think you will still be learning a lot by reviewing code. Um and that's why I prefer cursor to other AI tools. Um I think stuff like uh claw code and all
those other tools, they're great, but they're not a great way to actually look at the code and understand what's going on. And that's where I feel like that skill is going to slowly slowly become more and more important. Um, Mata says, "I'm trying to create a sub agent specializing in machine learning models for about five minutes and it doesn't create the sub agent."
Um, you want to be on at least cursor 2.4 Matas for this. Um, and if it's still not showing up for you. Um, so for example, uh, sorry, for clarity, make sure to use this create sub agent skill to create it. Once you have that markdown file, make sure it's described very clearly um how to how it should be run and then try and launch it manually. So try first before cursor applies it intelligently, try first to say, "Hey, can you use my data science sub agent to
work on this thing?" And then let me know if that still doesn't work. Okay, so we have a one minute left. Um I think I got through as many questions as I could in the Q&A. Um and I think this was recorded so we will share it afterwards. Um Arez there is a simple way for cursor to display CSVs as tables. You can ask cursor to do that for you if you want. Um and it will give you some options on ways to do that. Um my rule of thumb is if you don't know
ask um and then once you ask then implement um and then you should be good to go. All righty. It was lovely chatting with you all. Thank you so much for joining. Um have a great day everybody.