All right. Wow. Thanks for wandering back from lunch and making it back here. This is awesome. Welcome to Inbound 25 in San Francisco.
For almost 30 years, San Francisco has been my home away from home. Love it here. For those of you that don't know me, I'm Dharmesh. I also work at HubSpot. And my day job, I'm the co-founder and CTO of HubSpot. And I spend most of my time thinking about AI, learning about AI, and building with AI.
And my night job, I spend most of my time thinking about AI, learning about AI, and building with AI. Now, some of you are thinking he needs a hobby, like something fun. Don't worry, I have it covered. I have a hobby. For fun, I publish a weekly newsletter called simple.ai, which tries to make the complicated world of AI simple. And as Yam said, newsletters are cool. Again, by the way, it's been fun. It's going pretty well. Chances are some of you are in the audience if you're subscribers. Thank you.
Oh, thank you. So, you can probably tell I love AI, but not in a troubling way like the movie Her. More like the movie Iron Man. I love AI less for what it is and more for what it makes me.
Now, I understand that not everybody is necessarily sold on the merits of AI. It's the most consequential and also the most controversial technology of our time. Is it an exponential opportunity or is it an existential threat?
So I asked AI this question. It thought deeply about it for a while and came up with its answer. Yes.
So there's a related question that I've been curious about. How do you compete with AI? Now take a couple of seconds and just reflect on the question. You don't have to answer it, just reflect on it.
Now, it's actually an intentionally ambiguous question and it can be interpreted in one of two ways. The first way is how do you compete against AI, and the second way is how do you compete using AI? Now, I was curious about how people naturally gravitate, which interpretation they gravitate towards. So, as an engineer, I collected data. I ran a poll on LinkedIn and out of over 6,000 responses, about a third of the people read it as how do you compete against AI, and the other two-thirds, how do you compete using AI? Now, not a completely scientific experiment, but the sample size was nothing to sneeze at. By the way, I'm not sure why people back in the day were like dismissively sneezing at things. I'm not sure why that was a thing. Humans are weird, but it's okay.
Now, the idea of competing against AI frames it as a zero-sum game. It's you versus AI. And that's not how I think we should be thinking about it. We should think about it as a positive-sum collaboration. The goal isn't to battle the machine. The goal is to build with the machine. And that's my goal today, to help take you, which is undoubtedly awesome, to you to the power of AI.
So, here's my unhidden agenda. We're going to start with talking about how AI works. Then, we'll talk about how to win with AI, how to use it better. And finally, I'll share some thoughts on where we go from here. Now, a word of warning. This presentation is a bit geekier than is appropriate for an audience this size. But as it turns out, I'm a bit geekier than is appropriate for an audience this size. So, let's start with how AI works.
Now, some of you are wondering, why do I need to know how AI works? That's a reasonable question. I'd like to tell you a quick story to kind of provide my rationalization for why I think this is important. So, I'm from a small town in the state of Gujarat, India. Shout out to all my good friends out there. I know there's like millions of you. I know this. All right. So, in my early years, my family had no TV, no phone, no refrigerator, and so our milk was cow-taught before it was cool.
Then, when I was in my teens, my parents gave me this surprising gift that would change my life. It wasn't a computer, that wouldn't come until my 20s. It was this little thing. It's a Casio keyboard. I had no idea how to play it. I wasn't even sure why I got that as a gift because I had not expressed any interest in music. But I got obsessed with it. And it had 29 keys. I decided to teach myself and I taught myself through brute force because I had a one in 29 chance of getting any given note right. And I would just play it until something sounded right. And it would take me weeks to learn a single Bollywood song that I wanted to be able to play.
Then in my 50s, 25 plus years later, I finally learned some music theory. I learned that notes have names. There are major and minor scales. And now with that foundational knowledge, I can now do in minutes what used to take me weeks. So a little bit of foundational knowledge went so far. And I just wish I hadn't fumbled it down for two plus decades and just learned it sooner. That's why we're going to spend 10 minutes on some foundational knowledge for AI. Trust me, you will thank me in your future. Here we go.
So, as we know, AI capability is growing on an exponential curve. Everybody talks about this. You may recognize the shape of this curve from middle school algebra class or if you're a founder, from your startup pitch deck. You know what's in there. Now, the good news is that although AI is growing exponentially in terms of capability, the learning curve for AI is much more linear. It's a manageable thing. And the further up the curve you move, the more value you get off of this exponential curve. So a little bit of learning goes a very long way. So that's why we're going to do a little bit of learning.
So now when we talk about AI, generally now we're talking about generative AI. That's the type of AI that can generate or create new things. All right. Now, some AI experts way smarter than I am have said generative AI is just glorified autocomplete. And that admittedly is the truth, but it's not the whole truth.
At the heart of generative AI is this thing called a large language model. It's an LLM. An LLM is a piece of software that's designed to do exactly one thing. Given any text, it's designed to predict the next token that follows that text. And you're like, "What's a token?" Glad you asked.
So, let's say we took the word joyfully. A token is just a small piece of text. It can be a word or part of a word. So, joyfully could be broken out into three tokens. Now, I could give an entire 30-minute talk on what tokens are, but the only thing you need to know about tokens, they're small pieces of text that mathematically average out to about three-quarters of a word. That's all you need to know about tokens right there.
And so, what tokens are used for by LLMs and AI, it's a compressed version, efficient version of the language for LLMs. It's very similar to how Gen Z compresses the language and takes suspicious into sus and charisma into rizz. And the one I was confused about, they would take a single-syllable word like win and convert it into double-u, which is three syllables. And I think I finally figured out why that was. It's because Gen Zers, they like to text. They don't like to talk on the phone. And that's the one thing we have in common because as an introvert, I hate phone calls with the heat of a thousand suns. My friends and family know that the best time to call me is email.
All right, back to LLMs. So, what is an LLM and how does it work? So, here's how you should think about it. Imagine this machine and it's got inside of it billions of knobs, like hundreds of billions of knobs, just like a stereo system from the 1970s, right? And you can turn these knobs up or down. And this machine is tuned to be able to do this thing called next word or next token prediction. So let's look at an example.
We passed in this text and we said the toddler built a blank and we passed that into the LLM and what it does it says the toddler built a tower. Now the thing to realize about LLMs and you'll hear this word sometimes it's non-deterministic. That means the answer is not known. It may not give the same answer every time. LLMs deal in probabilities not absolutes. So in this example, it could have said sand castle, could have said house. There were other words that could have completed that sentence. It just tries to make its best prediction on what the word could be.
Now the cool thing is once it's done this, we can take the output of the LLM. It just predicted this word and we can turn around and pass it right back in and it will predict the next word. And we can do that as many times as we want. And that's why an LLM is capable of producing a 1200-word article on the fall of the Roman Empire. It just does it one word at a time.
All right. So, how does an LLM actually work its magic? Like, what does it actually do? All right. So, there's this process that the LLM, the AI goes through called pre-training. And what happens during pre-training is the AI company passes this machine like tens of millions, hundreds of millions, and billions of documents, every web page that's out there, social media sites, including Reddit, and the comment section. It studied all of that.
So, it's studied the best minds of our generation debate whether a hot dog is a sandwich or whether water is wet or whether pineapples belong on pizza. Now, I'm not going to take a position on any of those except the pineapple thing. It absolutely does not belong on pizza. Feel free to at me. Thank you. Yes.
So, the LLM as all this information is coming in, it's kind of tuning all those hundreds of billions of knobs. So, it learned from everything from Shakespeare to Stephen Hawking to silly debates about pineapples. And at the end of it all, this machine is now capable of producing with such accuracy a really good next word that what it's doing is indistinguishable from thinking. That's why it feels so magical. This is what's happening behind the scenes.
Okay. So, back to the AI experts that said, "Well, it's just glorified autocomplete." It is. That's what it's doing. But it's like autocomplete with a PhD in everything.
So I find it helpful to think of AI as an adept intern that's learned a bunch of things about a bunch of things. And what AI does is basically, it's like having a thousand PhDs in your pocket. So suddenly you can write poetry, you can write prose, you can write computer programs. It's like Neo in the Matrix except it's not "I know kung fu." It's like "I know everything," right? You have the world knowledge sitting there in your pocket.
But AI is awesome, but it's not all donuts and dad jokes. By the way, as I was walking up here, I was going to A/B test one. It's not all muffins and movie quotes. Donuts and dad jokes. I'm just going to rewind the tape. And so, by the way, AI is awesome, but it's not all donuts and dad jokes. There are some risks and limitations with AI. Let's talk through some of those.
First, LLMs are limited to the data they were trained on. The AI company gave our adept intern lots and lots of data, but not everything. It's whatever the data the AI company had access to at the time and chose to include in the training run.
Okay. Limitation number two. Sometimes AI hallucinates, which is just a fancy-pants way of saying it makes things up. Think of it like that friend who's so confident they don't know they're wrong. We all have that friend. Some of us are that friend.
Limitation number three. LLMs are frozen in time. So all those knobs got adjusted and then it got shipped and that's what it knows. It's a little bit like the movie Memento. And apologies for the spoiler alerts. In my defense, you've had 24 years to see this movie and it's awesome.
So, in the movie, the main character has a traumatic incident and then after that moment in time, he can't form any new memories. His brain keeps resetting back to that one moment in time. And so, the way he handles this is like he writes little notes to himself. He takes Polaroid shots and writes little notes. It's basically he's leaving notes and mementos for himself. So, when his brain resets, he sort of can read the notes and knows what's going on. LLMs are just like that. They're stateless. So every conversation starts fresh. The reset button gets hit.
And so now you might be wondering, wait a second. I've used ChatGPT and things like that. It seems to know things that were not in that pre-training. Like I can ask it a question from what happened yesterday and it feels like it has a memory that it knows what I asked it like 60 seconds ago. So surely it must have some sort of memory. You're right. It does. And please don't call me Shirley.
The way this happens is that we provide the LLM what's known as context. That's our way of doing little notes and mementos. And in the world of AI, context is queen. The better the context you provide the AI, the better the results that you get.
So let's talk about context. The way this works behind the scenes is when you interact with an AI app like ChatGPT or Claude or Google Gemini, it takes your prompt and puts it in something called the context window. And this is the coolest thing. So what happens is it puts it in the context window. Everything that goes into that machine has to fit in the context window. That's where it goes. So it passes the context window. Your prompt, we'll talk about other things, goes into the LLM and the LLM passes its response back into the context window and it gives it back to you.
So, let's talk about the kinds of things that go into the context window because this is what all the advancements you've seen recently. It's all because of the context window. Here's how it works. So, let's look at the first thing that goes in there. It's your prompt. Whatever you type in, it's got to go in the context window because anything we want the LLM to know has to go in the context window. That's an easy one.
Next is the archive, the chat history, long-term memories, anything that it needs to know in order to kind of answer your current prompt, we put in a context window.
Next up, resources. Let's say we're asking the AI to analyze a PDF or take a look at a spreadsheet or look at an image and tell us what's in the image. All of those are examples of resources. Where do the resources go? Where everything else has to go is in that context window.
And finally, the most powerful thing is tools. We can give the LLM access to tools like internet access through a browser, access to a database, access to APIs with third-party systems. And this is how the LLM is able to break beyond those limitations that it's historically had.
Okay, so in the context window, prompt, archive, resources, tools. That's a lot. So I made up a simple acronym called PART. Now, word of warning, never spell the word PART backwards. It's a trap.
Thank you. Now, some of you are wondering if I maybe like started with that Star Wars theme joke first and then backed my way into the PART acronym and came up with all that stuff. The answer truthfully is yes. Yes, I did. And it was totally worth it.
All right. So everything we want the LLM to know has to go into the context window. And there's a lot of stuff that we might want to put in there. So it has to be pretty big, right? And it is. So modern large language models support context windows of up to like a million tokens. And as we knew from earlier, a token is about three-quarters of a word. So that's like 750,000 words. That's enough to fit the entire unabridged version of my favorite book of all time, Les Mis. Thank you for the one Les Mis fan. Awesome.
We're getting there. Almost big enough to fit the entire menu of the Cheesecake Factory.
It's actually a Venn diagram. People outside the circle are the ones that don't. This is a circle of the people that know about a large language model, what's inside, how it works, and what it does. This is a circle of people that know everything they need to know about tokens, which is a token is part of a piece of text that's about three-quarters of a word. And these are the people that know all the parts of a context window. The prompt, the archive, the resources, the tools. And this is you right in the middle of that Venn diagram.
Congratulations. It's good to be you. Feel free to update your LinkedIn profile tonight that you went through a micro master class in fundamentals of AI. All right, that was the hardest part of the presentation, by the way. It's easier from here.
So, remember like the keyboard story, right? It's like, okay, well, yeah, I learned some music theory, whatever, but we're not here to learn music theory. We're here to make music. So, let's take what we've learned now and figure out how we can better use AI in our daily lives. That's why we're here.
Now, the very first thing before we jump into that is you have to accept this, that AI is like in your soul, you have to accept that AI is real. The transformation is real. This is not a drill.
Okay. Okay. All right. Getting there. Little. Yeah. Yeah. Okay.
All right. So, how should you use AI? It comes down to a function of three things. The quality of the results you get are based on the quality of the model that you use, the quality of the prompt that you write, and the quality of the context that you put in the context window. We'll look at each of those. The quality of the model.
So, there has been a Cambrian explosion in the world of large language models. By the way, this is the second time in my life I've used the word Cambrian. The first time was two days ago. I was doing a practice run with my friend Brian Halligan, co-founder of HubSpot. It was his birthday, but he was going through a practice run and he said, "Dharmesh, it's not Cambrian, it's Cambrian." I'm like, "Thank you, Brian." Anyway, so I know how to pronounce it correctly now. Sorry for the aside.
Okay, so it feels like right now, every month there's a major new model announcement. And the reason it feels that way is because every month there's a major new model announcement. It's exciting, but it can be overwhelming. So, which one do you pick?
I'd recommend any of the three top-tier frontier models. OpenAI now has ChatGPT 5, GPT-5, which just came out about a month ago, which feels like 150 years now. Claude from Anthropic, by the way, Dario is going to be here right on the stage in the morning, founder and CEO of Anthropic, and Google Gemini. All great models, all will serve most of the use cases you would ever want to do. So don't overthink it. Pick one that you like or that your company is using.
All right, let's talk about the quality of the prompt that you're writing. Now, there's a common, I'm going to call it a myth, that humans use less than 10% of their brains. It's been disputed. We won't argue that. One thing that I know absolutely is true is humans use considerably less than 10% of AI. Here's how most people use AI.
They find a handful of prompts that have worked and 95% of their time with AI is just using those same prompts, using it for those same use cases most of the time. And nothing wrong with that. Use what works. But I'd recommend about 60% of your time on that repetition, repeating the use cases that work, but then carve out 30% of time on iteration. Taking the prompts that you're using right now for the use cases you're using right now and make your prompt better and get better results out of the AI. And the final 10% you should spend on experimentation, using AI for things that you're not sure will work, that you've never tried it for before.
So that's the 60-30-10 rule. All right. Now, speaking of experimentation, it reminds me of this timeless quote from Sun Tzu, the most famous strategist of all time, who said, "Just try it with AI."
So, my pro tip, every time you sit down at a computer to do something, try it first with AI and see if it can help. Don't overthink it. I'm not sure how even to describe it. Just try it with AI and you'll be surprised. And when it doesn't work, don't think, "Oh, well, this doesn't work." Think this doesn't work yet. And if it's an important use case for you, leave yourself a calendar reminder to try it again in three months. Remember, AI is on an exponential curve. So there's a chance three months, six months from now, that same thing that doesn't work now will work.
All right, here's a super simple pro tip for improving your prompt. It's called meta-prompting. What you do here is you take your prompt that you've been using that you love and you give it to AI and you say, "Hey, can you make this prompt better? Ask me whatever questions you need. I'll give you the clarifications, but make this prompt better." And it will do exactly that. It'll ask you questions like, "Who's the target audience? How long do you want it to be? Do you want official sources only?" And what it will give you back is a prompt that will work much better. So, it's a one-time investment to make your prompt that you use all the time and a lifetime of value. Your results will be better from that point forward. I encourage you to try it.
All right. So, that kind of craft or practice of tweaking the prompt has a term. It's called prompt engineering. And it's exactly what it sounds like. It's kind of engineering the prompt. But we need to broaden our scope from prompt engineering to what's now known as context engineering. And it's exactly what it sounds like. How do I take the context window and put just the right things into it? So, the AI gives me much better results.
By the way, there's entire careers that will be built around this notion of context engineering. And I'm going to quote the immortal words of Obi-Wan Kenobi on this one in terms of when it comes to context, use the context. And in case you're wondering, yes, I'm more of a Star Wars fan than a Star Trek fan. But to all the Trekkies out there, I come in peace. Live long and prosper.
All right. All right, so let's talk about how to improve the quality of the context you're providing to the AI.
Each one of the frontier models has this feature that's called custom instructions. And what you do in custom instructions is you just tell the AI, here's who you are, here's what you do, here's how you want it to behave, here's a personality you want it to have, here's what kind of writing you would like, all the things that you want, just like you would tell an adept intern like, this is how you should work best with me. You type it all at once. It'll take 10 minutes. And what happens behind the scenes every time now once you provide the custom instructions, when the AI app sends your context window along to the LLM, it provides all those custom instructions every single time and your results get much better. Once again, investment one time, lifetime of value.
The other thing you can do, and this is the most powerful thing we've come along recently, it's called MCP. And it sounds complicated because the term is unnecessarily complicated. It stands for Model Context Protocol. You don't need to know that. But think about this as a way to supply tools to the LLM in a standard way. So it's like USB-C but for AI, right? So any AI application that supports MCP like ChatGPT, Claude, Google Gemini can then immediately and directly connect with the thousands of applications that also support MCP like HubSpot. So it sort of connects the glue. It provides that integration layer. So HubSpot has our MCP feature. Karen talked about this earlier today. So you can kind of bring all that context right into the LLM.
All right. So we've talked about the model, we've talked about the prompt, we've talked about the context. All of these will help you get better answers out of AI. But AI shouldn't be just about getting better answers. We want it to take actions. Yam talked about this this morning as well. We want the AI to take action on our behalf. And that brings me to what I think is the most exciting area in the world of AI, AI agents.
Now, last year at Inbound 24, I predicted that this year would be the year of AI agents. I was wrong. This is not the year of AI agents. This is the decade of AI agents. We are just getting started on this massive transformational wave in AI and HubSpot is all over AI. We have our featured agents. We have the new Breeze Studio. And last year we launched something called agent.ai.
And it's the place you go to discover, use, and build your own AI agents. And it's for everyone. You don't have to be a HubSpot customer. Would love it if you were, but you don't have to be to use Agent.AI. Last year when we announced it, it had 47,000 people using the platform. It is now two million plus people on the platform.
Thank you. Yep. What I'm most excited about is not the two million people. That's awesome. What I'm most excited about is 26,000 people just like you built their own agent either for themselves, for their team. And 1,800 of those agents that people built are shared with the community that you can use for free. Every conceivable industry vertical. Every step in the flywheel playbook is represented with agents on the agent.AI platform.
And you can build your own agent. We have a low-code agent building tool. And so I went at 3:30 a.m. I'm regretting it today. I built an AI agent that takes all of the information from my keynote prep, including the talk, including the transcript, including the dad jokes, including the movie references, and everything that I cut and all the resources I looked at, and I put it all to an AI agent that you can have a chat with. Not right now. Like tonight. Let me get back to my hotel room so I can finish it up. But you'll be able to get to it by going to u.ai, which is basically a redirect to the page. So, it's the world's most expensive redirect in the history of humankind. It's u.ai.
All right. So, I want to show you the outline of a strategy for taking AI to your team. Yes, I know. Yeah, that's the second visual dad joke. All right.
Here's the real team strategy. How you take the individual efforts that you're doing and how do you apply this stuff to your team? And here's what I think you should do. Triage the list of all the possible use cases that you have for AI. Make a list and then triage. Prioritize them based on what's the most frequent, highest impact things and what are the things that have the lowest cost for failure. It's like, oh, I'll try it. If it doesn't work, no big deal. We'll move on to the next one.
Experiment to find out what works. This is going to take some iteration, right? So, you picked your use cases. You're going to try it. You're going to tweak the prompt. You're going to give it some more context. Once you find things that work, automate it. Build a workflow. Build an agent to get the efficiency because now you've got it working. And then finally, measure the results that you got from AI because AI should not be a performance art. It's not performative. It should be performance-driven. That's the idea.
Okay. So, I call this the TEAM strategy. Triage, experiment, automate, and measure. And yes, I like acronyms that make words. All right. And the goal behind that strategy is to go from AI being led by individual heroics where you've got this super ambitious, super creative person, which is awesome. We need those, but translate those individual heroics into team habits. Take those things then apply to the team to kind of go through that process again and again.
And as you've heard today from Yam, which we are big believers in, is tomorrow's teams will be hybrid. This is a time to get started even in a small way to start building out your hybrid team. So there was an interesting study by Harvard Business School in conjunction with Procter & Gamble that really makes the case for these hybrid teams. I did not come up with a cybernetic teammate thing. Not sure how I feel about that, but one of the findings that was super cool, they found that an individual using AI outperformed in terms of coming up with better solutions to business problems than a team with no AI. So the individual does become that super contributor with AI.
What they also found, and this is less surprising, is that teams with AI produce the best results, the most creative results to business problems.
Okay, so this is a cue for me to take a breath so I don't pass out on stage winding down. So the question is where do we go from here? Now, normally this is the part of the presentation where I try to predict where AI is headed. But in keeping with the theme of today's talk, it's not about the journey that AI is going to take. It's about the journey that you're going to take with AI. And where should you go on your journey with AI? And this is something I've been thinking about a lot lately.
So, HubSpot is 19 years old. It's when Brian and I started it. This is my 17th time speaking at this event. And HubSpot's philosophy over all those years has been very consistent. We like to learn about what's going on. We like to share what's going on and then build products that help people use what's going on. And I could not be more proud of Yam and the entire HubSpot team and their commitment to community and our customers to kind of adopt AI. It's, I almost was teary-eyed this morning honestly. Thank you.
And AI, as you can tell, is very personal for me. It's a personal passion, but it's partly personal because of this little guy. This is my son, Sohan, and this is a photo of him when he was three years old, and he's 14 now, and he plays the piano better than I do. Only as of like three months ago, we had a face-off. By the way, his favorite genre of music on the piano is jazz. Do you know what the favorite genre of music is for wind turbines? They're heavy metal fans.
So, he's a piano player, but he's also an AI power user. He's been using AI since his early teens, and he had access to ChatGPT before it was ChatGPT, right? So, he had inside connections and someone who started high school yesterday. And watching him grow up with AI has kind of helped me understand one of, I think, the most important principles in using AI responsibly, which is use AI to test your thinking, use it to clarify your thinking and elevate your thinking, but don't use it to replace your thinking.
And remember this, as smart as AI is, humans win on EQ because EQ is emotional intelligence. And as it turns out, AI is software. It does not have emotions. It does not feel anything because it hasn't had any lived experience. It has never laughed at a dad joke, even if the joke was fully grown.
It has never tried to negotiate with a toddler. It's never tried to fold a fitted sheet. It has not lived life. But you have. And if you take your lived experience and you add AI as a tool, it's additive to your life, will improve your life, will improve your experience. But my challenge to you is don't stop there. This is where the journey starts. And my challenge to you is to make AI a true collaborative partner.
And that's what takes you from the awesome you that you are to you to the power of AI. Because the future does not belong to artificial intelligence. It belongs to you with augmented intelligence. AI isn't here to replace us. It's here to replace the parts of our work that don't bring us joy. To handle the repetitive so we can focus on the remarkable. And the paradox is beautiful. The better AI gets, the more it allows us to be human.
And being human is not a bug. It's our best feature. It's always an honor to share the notes from the journey with you on the journey with AI. Hope you enjoy the rest of Inbound. Thank you so much.