How To Use Anthropic Workbench For Beginners β
Let's learn how to use Claude Codeπ
2024-06-18
Transcript β
[00:00] by the end of today's video you're going to have a complete understanding of how to start leveraging anthropic and specifically claws API in your software automation or business we're going to be checking out its workbench feature that allows us to actually start leveraging prompts within its interface furthermore we're going to discuss pricing to see if this would even fit the business you're creating and we're going to compare to other AI providers therefore let's go ahead and jump in today's video right now in the industry we have a ton of options when it comes to accessing artificial intelligence through API to list off a few of the major players we're talking about Gemini open Ai and
[00:31] then to be honest with y'all anthropic each one of these has their different advantages and value points I've done videos on all these different platforms this video let's go and learn what we can do on the console side of anic anthropic right off the bat to get comfortable with API and see if we even like it we get $5 for free so I'm going to go just claim it looks like you need to provide a number so keep that in mind and here we go we got access to $5 let's see everything we do with this platform get a full understanding of what anthropic is not like with any platform in order to even get started on it you're going to need to get access to
[01:01] its API key to do so it's very simple just hit get API key as you see I've created a couple examples for the past but all you need to do is hit create key you will go ahead and name your key and then once you create it you go and copy it and paste it anywhere utilizing this in Zab your automations or alternatively utilizing it in your software if you don't know what API key is think of it as their way of understanding who you are basically how to make you pay based off your usage what's great though is with a lot of these dashboards we have the ability to actually start prompting within the dashboard itself this min Ates it so we don't have to set it up in zapier or vs code project so I'm going
[01:33] hit start prompting now we got a couple options here when it comes to prompting that you maybe have not seen in other platforms soever the B just rename this we'll call it first prompt hit enter anytime you run a prompt deal with a prompt do a prompt you can click this and it'll show you all your previous history furthermore if I don't even like the name or I didn't like the prompt I wanted I can set new prompt here we'll call it second prompt and now I can choose between first prompt and second prompt there we go when talking to artificial intelligence through an API endpoint there is two major things you need to identify the system prompt and the user prompt think of the system
[02:04] prompt as the context of how the model is going to interact with the data it's receiving now A good rule of thumb when creating prompts to software is that most of your prompt will be in the systems prompt telling you how to give the outputs EG give it in three paragraphs give it in a Max of four sentences be concise don't be concise be lengthy bunch of other stuff and when it comes to actually prompt engineering creating these prompts this video we're going to do a very simple one if you want a really in-depth video that I show you in- depth how I personally do it check out that video right there this gives you a six-step process on how to
[02:35] create an effective system prompt to handle your user message and as a quick word of thumb as well with your system prompt which will be basically mostly fixed text plus some variables here and there your user prompt will be most likely just data that you want to have reformatted restructured or used as context for your output this makes more sense if you watch the other video when it comes to prompting let's do a simple prompt together for the system prompt we're going to just say your your output should be your output should be short and concise it seems like within
[03:06] anthropic you have the ability to actually have it generate a prompt which is kind of interesting so let's go and click that so in this context it seems like it wants to actually help you create the prompt that it will use so for example if I hit write me an email it will give me like a prompt that could be effective for the user message so we'll say generate prompt loading now this feature does not exist in the other dashboards which is interesting here we go and wow this is actually a lot more lengthy than I was expecting it's actually copy this we can edit as well so within anthropics dashboard you'll notice these little brackets here what those are in this context is the
[03:36] variables we can set here in code works the same way whatever the workflow is and when the data is being passed in this is kind of how it interact with it knowing this though and what I've seen from my experience when it comes to prompting is that this kind of prompt you don't want in the user message you actually want this in the system prompt so I'm going put it here and furthermore what we're going to do is going to delete this and what we're going to provide in the user message is actually just the variables themselves so instead I'm going to go and grabb this come down here paste hit enter enter or shift enter enter grab here and paste now with
[04:09] our original system prompt here we're going to do is is we're going to say this we're say here is the customer original say we will provide provide the customers original complaint email and product information and copy this and delete all this now with the system instructions it knows how to structure its outputs and all we're providing in the user instructions is basically or the user message is going to be the data of the customer email and the data of the product info that they're complaining about make my life easy though I'm going to quickly just give myself the variables for this so I'm
[04:40] going to go and generate that real quick coming over to Chad gbt I just asked it for example data to use so we're going to go and copy this I'm we paste it here and we'll go ahead and copy this as well paste it here it's actually pretty cool as other dashboards when it comes to AI providers doesn't give you this kind of functionality so we're going to try this out I hit run and pretty good so what you'll notice as well is that with the tags it's actually be able to tag with the relevant sections so we have you know brainstorm brainstorm email draft email draft now from my experience this is kind of a lengthy system prompt so check out that other video I referenced earlier to really show you how to
[05:11] leverage when it comes to dictation and the amount of words you use within the prompt itself itself because that's actually pretty important when it comes to cost and scale now another important feature within the dashboard is the model settings when using model settings first major thing is the actual model itself and we'll go ahead and dive into pricing after this so we can kind of get an idea of that second one's going to be the temperature this is important when it comes to creativity lower temperature more consistent outputs at scale higher temperature more creative if you're dealing with software or out of missions you're going to lean towards a lower temperature as you want to make sure you your outputs are as consistent as possible when it comes to tokens you're
[05:42] going to want to shoot for a number between 500,000 you can go to 2,000 this is just the amount of output and input when it comes to the amount of actual text it's dealing with talking about cost so much let's compare it to one of their bigger competitors which is open AI so on the low end here we have Haiku and the input is 0.25 cents and the output is 1.25 coming over to to opening eyes lower model which is 3.5 turbo we're looking at a 0.5 for input and a 1.5 for output so in reality it looks like Hau will be a little bit cheaper let's jump to the high end here this is probably the part that's a little bit more interesting for a lot of users the
[06:12] high end here for Claude is Opus now that is a $15 input and a $75 output coming over to chat gbt 40 that is going to be a $5 input and a $15 output so we're looking between a $15 input from Opus and a $5 input from Che gbt keep in mind these are the most comprehensive models from both of these providers A $75 output compared to a $15 output what's going on here what should you do put it this way I would test both but
[06:43] lean towards a cheaper one $75 for an output is insane in the context of AI you would have to do something Opus would have to provide so much value compared to the cad gbt 4 where you had to choose it if if the value points are B basically similar or near similar op for Chad gb4 as that at scale is going to cost you quite literally an arm and a leg don't do that unless it really is what you need when it comes to the value it outputs me personally and the
[07:14] workflows I've been using personally Chad gbt 40 works just as well as Opus might get some hate in the comments for that might get some people disagreeing in the comments for that if it works different depending on your use case then proceed I just think personally that if you're going to go for a higher model within Cloud's API you're going to hit son it which is more similar to Chad gbt 4L pricing now your next question might be cman how do I know which model is best for my workload when dealing with these models you only choose a higher model if the actual underlying output requires it a lot of times you can opt for lower models like ha coup or
[07:45] 3.5 to achieve the same type of value points and there's not really that much of a difference the major difference being that it's extremely cheaper to use a lower model if it can do the same value point so typically you want to opt for lower models unless your workflow really really needs a higher model now was Al interesting within the dashboard is our ability to evaluate prompts haven't seen this in any other AI provider as well if I evaluate here we can actually give a rating of a model response so let's say I really hated that response I can give it poor and then just simply hit ADD test case
[08:15] simply add the relevant variables again add the customer email product info we can hit run and with this this is more of basically identifying whether it's the prompt or the variables that causes the issue like how we're formatting the data when it comes in as a variable within the prompt itself now most of the time when you're feeding data as a variable you want to keep it as lean as possible on top of that most of the time if you have issues it has to do with the prompt more likely than the data itself so from this output let's just say we Chang the data and we're like you know what this is good we can use it as a reference and put very good as you see from just those couple runs in today's
[08:46] video it cost me around 26 Cents that covers the fundamentals of everything you need to know about the anthropic API dashboard if you want to learn about other dashboards such as openi or Google Gemini I did videos on that as well so you can check them out and I'll see you in the next video I'm g go ahead and leave Gemini's API dashboard right there you can check it out maybe that is more of the AI provider fit for what you're looking for that's a random video ask my face I'll see you in the next video