Research ANYTHING with DeepSeek R1 + Perplexity

Rory Rogers shows how to build a market research tool using Perplexity's Sonar Reasoning model and DeepSeek R1 on Relevance AI. The tool pulls competitor data and market trends, formats results into HTML emails, and runs automatically via Make.com. Costs about $1 per million input tokens.
Chapters
What's up guys, in this video we're going to be going over how you can use Perplexity's new reasoning model that was made using Deepseek R1 to create some pretty cool stuff. What makes this model cool is it can use Perplexity to do detailed analysis of anything on the internet, and then it can use Deepseek R1 to actually analyze that data a bit further and then output whatever you like. If you don't know who I am, my name is Rory Rogers and I help business owners to integrate AI agent systems into their businesses. So that's something you might be interested in, then I've left a link to my website in the description. You you can go ahead and book in a call with me, or you can just fill out the contact form and I'll get back to you. Also, I just want to say that the tool that I make in this video will be available for completely free in the description. So if you want to get started straight away using Perplexity's new reasoning model, then you can go ahead and grab a free template and get started with it. Let's not waste any more time. Let's get into the video. Okay, so in this video, we're going to be building the tool on Relevance AI. In this video, we're building a tool, not an actual agent, just makes it a little bit easier. But then of course, we're going to have to be using the Perplexity API. And if you've never used that before, It's really, really simple to set up. I'll show you how it all works. Basically, if we look at Perplexity here, you can see there's an API bit, and then in here you'll need to add some credits to your account. You can do kind of anything, it doesn't really matter. It's not too expensive, this model, which is nice. You're going to get your API keys down here, and then if you go over to here, you can find the docs for the Perplexity API. So this is actually how you're going to set it up, and it's also got the supported models and the pricing on there. So we're going to have a look at that quickly. If we go to the supported models, you can see these are the models that you can use via API. So there's Sonar, Sonar Pro and then Sonar Reasoning. And for this video, we're going to be using Sonar Reasoning because this is basically Deepseek R1 with Perplexity put together, and we can use in an API, which is really, really cool. If we go over to the pricing here, you can see it's $1 per million input tokens and then $5 per million output tokens and then $5 per 1,000 searches, which is actually pretty good considering it's Perplexity and Deepseek R1 put together. Obviously, we know Deepseek R1 is really, really affordable and this is kind of following suit. Even with the Perplexity integration into it, it's miles cheaper than something like GPT-01. So yeah, if you're stressing about cost or anything, don't worry too much, it's pretty affordable, which is nice. If we come back over to Relevance AI, this is the tool that we're going to be making for this video. I thought to show this off well, what we're going to do is we're going to create a market research tool using the new Sonar reasoning model from Perplexity. Basically what it's going to do is we're going to input to the tool the industry that we want to do some research on. It's going to find us a bunch of competitors, sort of see what they're doing, give us an analysis of them. And it's also just going to look up some of the most recent trends in the market. And then same thing, it's going to analyze that, it's going to put it all together and make it look nice, and it's going to email that over to us. And the way this is going to be set up is that you can trigger it whenever you want, but then you can also have it so it gets triggered like every day or every week or every Monday, every Tuesday, whatever you like. So quite simple but quite a handy tool, and for pretty cheap and pretty easy to set up, which is nice. So The input here is just going to be industries. This is going to be the market that we want to research here. So really, really simple. And then the main bit here, the API step, this is how we're actually going to be connecting to this Perplexity model. If you've never used an API step before, it's really, really simple. If we go over to the docs on Perplexity, we go to API reference, and then you can see here, this is the reference. So this is what we need to send over in order to trigger the API. So we get the URL, which we just simply put in here. The method is going to be POST because we're going to be sending data. The headers are going to be authorization and then bearer, then your API key, which I've put in here. And then the other header is going to be content-type application/json because we're going to be sending over JSON. Then the body is going to be JSON object, and then we would literally just paste this part here, all of that. We just paste that into here. And obviously I've added a prompt and added some variables, that's why mine looks a bit longer. But you can see we've got the max tokens, the temperature everything like that. You don't really have to touch any of that. The main thing that we're going to be looking at is the system prompt and then the user prompt. So system prompt, basically I've told it what I just told you guys a second ago, what it's meant to be doing. So it's going to do extensive market research on a given topic or a given market. It's going to find 5 different competitors, analyze sort of what they're up to at the moment, and it's also just going to search the market in general. And then same thing, analyze sort of what's going on there, the market trends, if anything crazy has happened, in the news for that market, and it's going to output it back to us. So that's the system prompt. The user prompt, this is slightly different. The user prompt is either going to be the input here, so the industry. So this could be something like, I want to research the construction industry, something like that. But what I've said to Perplexity is I've put in this topic here, so the industry, something like, as I just said, I want to research construction companies. But then I've put in brackets The specific topic will not always be specified, so if it isn't, then research AI automation agencies. If it is specified, then ignore this message. It's just because if we want this to trigger like every week or every day, or as I said, like every Monday, Wednesday, and Friday, whatever you like, then we aren't actually going to be able to input a specific market every single time. So what you do here is you just put in your market or the market that you want to research as kind of a fallback. I mean, when you're actually downloading this tool you can probably just get rid of either one of these, because if you only want to be inputting specific markets to it, then you can just get rid of this part. And if you only want it so that it triggers regularly and just does your market, for instance, then you can just get rid of this variable here. But for this example, I've done both of them in here. I hope that makes sense. It'll make more sense when I actually trigger this tool. The next step here, we just use a simple LLM step. We're just using GPT-4o Mini, and basically it goes through the output from this, and it will just format it nicely, and then it'll also link these citations to what's actually in the text. So the way that this will output is it'll output all of the thoughts from Deepseek AI, so all of its sort of reasoning that it does in the background, and then it will output its actual output, and then separately it will output the citations that it's referenced as links. So we're just using this LLM step here to basically just ignore the Deepseek thinking part just take the output of it and then look at the links that it's referenced, and then basically just put them all together and make it look nice. And then really, really simple, we're just going to send that straight over to— in my case, it's to me, obviously, but you're going to send that over to yourself. The email body is just going to be an output from this LLM step. The email subject, I've just put in market research. You can do whatever you like. So we're going to trigger this tool and we can see it in action. This one we're going to input in manually, and then I'm going to show you how to build the tool to trigger this regularly. So I've simply just said digital marketing agencies in the US, so quite broad. We're going to run this tool and then we're going to see what outputs, because it does take a little while because obviously it's having to search the internet with the Perplexity tool and then it's using DeepSeq reasoning model to go through all of that. So it just takes a little bit of time. We'll leave it for a minute and we'll come back when it's done. Okay, so it finished. It actually didn't take too long, it only took about a minute, which is nice. You can see this is the way it outputs, outputs the citations separately as a separate variable And if we go to message here, you can see this in the think brackets here. This is what the Deepseek RWA model is actually thinking about when it's going through the data that Perplexity has scraped from the internet. So you can see, okay, so I need to figure out how to answer the query about digital marketing agencies in the US, blah blah blah. You don't have to read through all of this because there's quite a lot of it. Well, we should find the other think bracket, and then after that will be the actual output. So yeah, here you have a think bracket. This part after is the actual output. So Based on the provided research results, here is analysis of digital marketing agencies in the US focusing on their recent activities, da da da. And it's given us these competitors and sort of an analysis of them. We don't need to read through all of that because we pass that to GPT-4o Mini, which just formats that nice. It formats it in HTML because you can actually send HTML over email and automatically render, which is nice. But it might look weird now, but this is basically just the output from this step here. Minus all the thought stuff from Deepseek and putting the citations in as well. So if you look, you can see that's been emailed over to us. So I'm going to check my email. So yeah, this is what I received. So analysis of digital marketing agencies in the US, uh, competitors. So Inbee, Thrive Agency, Socially Powerful, Firebelly Marketing. And you can see it's given us links to the sources for these competitors, which is really, really nice. It's given us the current market trends in digital marketing. So the rise of AI automation, as we all know. And then the data-driven decision-making— so there's a growing emphasis on using analytics to track performance and refine campaigns in real time. And obviously, when you download this, I urge you to fine-tune this to get the specific kind of data that you want. At the moment, I've left it quite broad and quite general and not too crazy detailed, but when you actually download this template, I really do urge you to sort of fine-tune it so you can get the exact information you want. You might want more analysis on certain parts of the market or certain trends in the market, things like that. So yeah, I urge you to fine-tune it to how you want it, but this is how I've done it— quite broad, quite general. Really, really simple tool, but really, really powerful. Now I'm going to show you how we can actually make this so this triggers regularly. You can have this just in your inbox every morning or once a week, whatever you like. So we're going to come over to Make.com and we're going to set up this really, really simple one-node scenario here. And all this is is just an HTTP request that's going to trigger that tool that we just made. And if you watch my channel, you know that a lot of the time I'm building AI agents rather than just standalone tools. So if you're wondering how we trigger the tools, if it's any different to triggering the agents, it's not really. The only thing that's kind of different is on make.com there is a native integration with Relevance AI that lets you talk to agents, but it doesn't let you talk to tools. So we have to do this kind of the old-fashioned way, but it's still really simple. We just go to Use, Then we go to API, and you can see here we get an endpoint, we get an option to generate our API key, and then we get the request body that we're going to send over. Obviously the request body is going to be empty. We're not actually going to be giving this tool an input because we just want it to trigger regularly and we don't want to have to input every time, but we still need a request body to send over even if it's just empty. So we're going to put all of this in the endpoint. If we copy that, come back over to Make, go to URL, put the endpoint in there. The method is going to be POST. The headers. If we come back over, we look at the curl, the headers are just content-type application/json and then authorization and then an API key. So I'm going to put this in now. Okay, I've done that. I haven't put my API key in just yet, I'll do that at the end. But the body type, we're going to go raw. Content-type is going to be JSON application/json. And then the request content, we just come over here, copy this, and then we can paste this into here. And then you can see here the topic variable, which is the input for this tool. So yeah, topic, we're not actually going to be putting anything in this, but because this is not required, it's not actually going to have to have an input in here, which is how we're going to trigger it regularly without any input. So we just leave that blank, but in here is what you would put as your input. Uh, yeah, I've just put my API key in. We're going to hit save, and then just to test this out, we're going to hit run once. And then we should see this take a second and then trigger our tool on Relevance AI. Okay, so you can see this has triggered. It takes a while because it's actually waiting for the tool to finish running before it tells us, yep, it's gone through. So that's why it took a minute. But you can see here, if we go to output, as long as the status code is 200, that just means that the tool's been triggered correctly. If we go over to my inbox, you can see here, this is what I received. So AI Automation Agencies, market research and competitive analysis. So These are the competitors that it's given us, which is nice. And then the current market trends, it's given us a little bit here. And again, you can make this much, much longer. I've just left it sort of quite general and quite broad so that you guys can customize it how you want. But the way that we set this so that it does it regularly, so every week, every month, we just turn this on here. And then you can see here we get the option to customize when this triggers. So we're just going to select— I mean, whatever you want really. You can do it to every day, days of the week, days of the month, specific dates. We're just going to say days of the week, and we're going to say we want this every Monday, Wednesday, and Friday. And then we can select the time here. You can obviously put that to wherever you want, make sure it's in the right time zone, and then you simply hit save. You can see here it says custom schedule, and that's going to trigger in this case every Monday, every Wednesday, every Friday, and we're going to receive a full competitive analysis on those days straight into our inbox at whatever time you want, which is really, really cool. And it's pretty cheap as well on Perplexity. This really isn't going to cost us much if we're literally just doing 3 requests a week and it's not sort of a massive input or a massive output. It's a really, really simple but powerful and cost-effective tool that is going to come in really handy for you guys. So that is it for the video. Not a crazy long one this time. As you know, usually I build AI agents, but for this one I didn't really feel like it was necessary. I thought just making this tool would be enough to show off the new Perplexity reasoning model. As I said at the start of the video, this template will be available for completely free in the description so you can get started straight away. And also I've left the link to my website in the description, and if you're interested in working with me, we can go ahead and book in a call, or you can just fill out the contact form and I'll get back to you. But yeah, that's it for this video. If you've got any video suggestions you'd like to see, please do just drop me an email or just leave them in the comments and I'll try my best to do them. But if you don't, then I'll see you in the next video.
More from Rory

Dynamic Workflows are crazy. This is how to actually use them (beginner's guide)










