The Best Strategies for Automating Email Responses with AI Agents

Subscribe

apple podcast
spotify
stitcher
iheart radio
audible
maximum lawyers podcast

Join the Guild to grab our Case Roadmap.

Watch the YouTube version of this episode HERE

In this episode of the Maximum Lawyer podcast, host Tyson explores how AI agents — specifically using “prompt chaining” — can streamline email management for law firms. 

Tyson explains the step-by-step setup of AI-driven email campaigns, and he shares the best and the worst of prompt chaining, and offers practical tips for implementation. 

He emphasizes the importance of clear agent roles, continuous monitoring, and ongoing refinement to maximize efficiency. Listen in to this episode, a valuable resource for legal professionals interested in leveraging AI to improve workflow and client communication. 

Episode Highlights:

  • 03:04 New Email Campaign 
  • 05:16 Detailed Walkthrough of the Select Emails Campaign
  • 06:12 Drafting Email Replies and Agent Instructions 
  • 08:19 Prompt Chaining Framework Concepts 
  • 09:22 AI Agents vs. Automation Nodes 
  • Ask us a question about starting your own law firm here!

Resources:

Transcripts: The Best Strategies for Automating Email Responses with AI Agents

Tyson Mutrux 00:00:02 This is maximum lawyer with your host, Tyson Matrix.

Tyson Mutrux 00:00:11 Welcome back to another Saturday episode of Maximum Lawyer. And today I'm going to be talking about some more AI agents because that's what people have asked for and the comments on YouTube. And so that's something I'm going to cover. So the next four episodes, where are we talking about AI agents? Just so you know. So people ask for more detail about some of the frameworks that I talked about. And so I'm going to give you some more detail. And if there's more that you want after that, and I'm happy to cover that as well. But many of the comments that we got were about wanting more detail about them. And so what I'll do is I'll show you some of the things we're doing. I'll give you some more detail about why you might want to use some or the others. If you want a basic understanding, go check out my previous episode on this and the name of that episode. If you're looking for it is you're wasting ours.

Tyson Mutrux 00:01:01 Win them back with AI agents. That is. That is the name of that episode. And so you can. It's. I try to explain everything in a way where if you're listening to it, you have a good picture of it. But I do show my screen on YouTube, so you might you might get more out of it, out of it. If you do watch it on YouTube, just so you know. But you're not missing anything, right? I'm still covering everything in a way that you can understand it, but, you can, at least visually. I'm more of a visual learner. So for me, actually seeing it is better. But before I get into today's episode, just a reminder, keep the text coming. We're trying to be as responsive as we can when it comes to the comments and text messages and everything else and, you know, messages we get online. That way we can cover everything. I just there's not enough episodes in a week for us to do everything, but, I'm trying to get to trying to batch as much as I can so that if there's a certain topic that is consistently coming up trying to cover it.

Tyson Mutrux 00:02:06 So that is what I'm doing. And the the level of detail that I think people are wanting. That's why I'm doing four episodes. So, you know, I'm covering each of these so that they're sort of they're bite sized, but there's it's enough detail on the AI agent stuff that you have a better idea as to how it might work. But if you do want to text me with anything else, you want me to cover (314) 501-9260. If you are watching on YouTube, just leave a comment and we do check all the comments. So, that's another way of an easy way of doing it as well. But, I always love to hear from you. So text messages, I always prefer the text messages, but you can do either one. But let's get in to today's episode. And I think what I'm going to do is I'm going to start off by showing you the first one we're going to cover, and that's the one we're going to cover today. And that's prompt chaining. And I do show this in the previous episode, but I'm going to show it to you again, and I'm going to show you a new one.

Tyson Mutrux 00:03:04 This is a new one that we have built. So this isn't a regurgitation of one that we've that I showed you before. This is actually a new one. And this one is an email campaign. So you can see there's two here. Right. And there's and I'm going to show you why we have two for in a second. But what this comes from. So this is again this is the prompt chaining one. This originated because one of our attorneys, she wanted a just to have a draft email created for, emails that come through that need it. Okay. And that's, that's what we built out. I don't know if you've seen ads for I think it's called fixer XR, I think is the name of it. I've seen some, some social media, ads for it. I think it's similar to that. I think that that's kind of what they're doing there based on those ads. It seems like a cool concept, but what we decided is like, okay, well, that's something we could easily do with Nardin.

Tyson Mutrux 00:04:08 And so let's just do it. And that's what we did. So we set up her the email trigger and the one we started with. And the reason why this is why we have the two different campaigns. You've got the reply to select emails. And for those of you listening, I've got two separate, email sequences set up. Right. So you've got these these two different sets of, of prompt chains that are set up. One of them is with it's a little bit longer and that's the more detailed one. That's the one that's reply to select emails. And then I've got a shorter one and that's reply to all emails. And so the one that's longer, it has two AI agents. So what happens is the trigger is the email comes through. You extract all the email data out of that email. An AI agent. This is the first one goes through and evaluates whether or not it is a response is needed. So we give it some criteria. And for those of you that are not watching that you're just listening.

Tyson Mutrux 00:05:16 And we give it. Determine if the following email requires a response. Reply with yes or no and we give it the email content. So I actually goes through and determines whether or not a response is needed. So that what that does is it's like a court notification comes through or a calendar invite or something like that. Anything that comes through that doesn't need a response, well guess what? No response is needed. And then if a response is needed, then a more detailed response. And so it gives the more detailed we give it more detail, we give it the subject, the message, the sender, all that. And the reason why we put the sender in there is so that we know who we're replying to, or at least the agent does. And this is one where if you see, you're not those of you who are. I'm not going to read all this for everybody, but this does give the instructions and it's, you know, the I'll give you the beginning. I'm a personal injury attorney.

Tyson Mutrux 00:06:12 You're a helpful personal assistant. And your task is to draft replies on my behalf to my incoming emails. Whenever I provide some text from an email, return an appropriate draft reply for it and nothing else. And we just we give more detailed instructions below. And what it does is it does a pretty darn good job of creating. And I and I showed some of the actual draft emails in the guild a couple of weeks ago. And so, I covered all this there, but it does a pretty good job. It doesn't always get the context right. And so that's fine. What we're looking for here is something that it's about 80 to 90% of the way there. That way whenever the attorney goes in and she takes a look at it and makes a couple edits and boom, can fire it off and saves a ton of time. Okay, a ton of time. Now, the reason why we created the second one here. All right. And it's because and this is the shorter one. So those of you that are not watching there's the reply to select emails.

Tyson Mutrux 00:07:14 And that's the one where it filters it out. And then we created the second one because this is the one that replies. It creates a reply to all emails. The main reason is because the reply to select emails was filtering out too many of the emails. And so to to to fix that issue is we just said, okay, we'll just create a response to all emails then. And if she doesn't want the other one she'll just delete them. And that's and that tends to have worked out better. What we could probably do is I could probably, take some time here and create a better, criteria for whether or not a response is needed. This is fairly new. So we it's not something we've, I've wanted to go back and test yet, but, with some fine tuning, the reply to select emails would be just fine. So. But this is the setup. Okay. I want to give you the setup. That way, before I get into more information, just, I want to give you kind of the setup as to what that looked like and when you might want to use the the prompt chaining framework versus others.

Tyson Mutrux 00:08:19 some of the others. So just some of the key concepts. Right. What we're looking at is you're really just talking about sequential processing where you go one after the next after the next. And it's and it's a really linear fashion. And if you're a linear thinker, that might be easy for you to understand. But just know that prompt chaining is not going to be the ideal framework for every situation. It's just not. You can't go in a lot of situations from one to the next, to the next, to the next, to the next. There are some of these other frameworks are going to be far better in certain situations. Another key concept of this is that you're talking about really specialized agents, right? Where these are, they're optimized to do one specific role. Okay. If you'll notice. And in one of those there was only one AI agent. Right. It just drafted an email in the other ones and those other things in there. They're called nodes. So they might do it's more of a thing of those is more like an automation piece where you can kind of like you could.

Tyson Mutrux 00:09:22 We've had automation for years at this point. Right? Well over a decade, what, 15, 15, 20 years is what we had when it comes to automation. So there's a lot of there's a mix of AI agent and automation with some of this stuff. And so some of those other, other nodes are just automations. but in the other one, the one the reply to select emails sequence or that framework, you have two, you have one agent AI agent that's doing the analysis as to whether or not a response is needed. And then the next one does the reply. I don't really want to combine a lot of stuff. It's kind of my my thinking when it comes to virtual assistants to where you want them to. Do you know one thing really, really well having them do everything is not a good idea. Same principle comes applies to AI agents. So think about that too. And when it comes to prompt chaining, you're probably going to see, a little bit of higher accuracy with some of these things going through.

Tyson Mutrux 00:10:26 You're also going to see because you have so much specialization, you're going to you're going to see that you're gonna have to clarify the rules quite a bit. So you're have to make sure that you each agent, since it's so specialized, it's going to need a lot of clarity. So that is that's another one of the key features of this. so that's why you might want to use the AI prompt chaining because you're talking about some of the improved accuracy, right? Going one after the next after the next. Because it is so well defined, you can really control the outputs. So because every single AI agent is it's it's pretty carefully tuned. It has to be. Otherwise it the rest of the chain doesn't work. And so that's pretty good. And you can you can also you're able to monitor each of the agents individually. And you can determine where any of the failures are coming. And then you can fine tune it more, fine tune it more. And that way it it gets better and better down the chain.

Tyson Mutrux 00:11:27 Okay. So that's another, another one of the reasons why, prompt chaining might work also. related to that debugging. it's it's a lot easier to debug in situations like this because you can go to the spot where the failure is happening and you can go fix it right there. It's really easy to identify, especially in a program like you can see. Okay. Did this fail okay? Yes. And if so, where you can go find it pretty easily. So the the ease of debugging is pretty good. This is also also something you could scale quite a bit. I mean I could this same one, we could I mean think about it. This could apply to one email or to millions of emails. Pretty easy to scale this one. Not too not too bad. All right. When it comes to I mean so the accuracy of it is of it's pretty good. Pretty easy to to debug, easy to scale a scale. And then also the specialization pretty darn high. The one of the things you're gonna have to really think about is, is that whenever you have, it's really the inputs and the outputs, the inputs and the outputs.

Tyson Mutrux 00:12:41 This is an important part of prompt chaining is you gotta remember if you have multiple agents, the the first agent, it's going to get an input from somewhere, but its output is really, really important because the outputs are going to be used by each of the subsequent agents for the most part. And so making sure that you, the first agent, is pretty, it's pretty darn important because you got to make sure that the outputs are so, so, are really good. And you can that's what's really cool. And in the one agent that we had where we had the two agents and the first one was just trying to you had to it was determining whether or not a reply was needed. We just said yes or no. we that's the only output we wanted. We gave it a very specific instruction. Yes. No, we didn't want any any other detail. And that allowed us to do some other things. down the, down the chain when it comes to, you know, filtering out different emails.

Tyson Mutrux 00:13:37 So that's that's important. the just kind of let's say you have a three agent framework kind of the way you would you would probably set this up as agent one. It's got that initial processing, right. It's, you know, really kind of break down. The information is coming through. It's going to structure it in a way that, with the output, that it can be really, really easily used, kind of like an outline for the rest of the, the agents. And then maybe agent number two, that evaluation sort of an agent refinement, maybe they're kind of refining things a little bit. And they're taking that initial in that output that they receive from agent one can make the changes that are necessary and then move it down the right, down, down the, the line. And then you can use agent number three with that content generation. What we didn't do, we didn't use that second agent in in our email because we didn't really need to. It wasn't we just really wanted to know was there a because there was no really outline created.

Tyson Mutrux 00:14:41 What we were doing was is a reply needed? That's all we needed to know. So that's why there wasn't really a third one. But if you were generating content of some sort, you would probably want to have that where like an outline is created and then the, the contents created where you're getting that more refined sort of a content. Okay. And then if you wanted to add a layer onto that like a fourth agent, you could then do some sort of use an agent that really fine tunes that like edits that final content and then puts it kind of like kind of polishes it out for you instead. And you can use that to, almost like a newspaper would use an editor, which is another way that you could use it. So just to kind of give you a real world example, something that we we had shown before in editing in was creating the, I think I had shown this one to you before, and that was the article writer where you go through and you have the agent create the outline and then the outline editor and then the article writer.

Tyson Mutrux 00:15:49 And then you had someone, an agent write the title, and then someone, an agent write the meta tag. And and that was. So that's a one, two, three, four, five agent sequence that we have. And when it comes to writing articles and I'm talking about blog posts is what I'm talking about. But in for that, that one we just called it, we called it, articles. I want it to be written like an article, and that's why I call it articles. And that's also why that's the same instruction that we were giving the, the agents as well. I want to get in a little bit about prompt design. Okay. And the agent specialization, because each of the I want to kind of, harp on this a little bit, specialization really matters. And so each of the agents system prompts should really do a really good job of describing the role of that agent, what the goal of it is, and then the output expectations. Okay. so, you know, you're an expert content planner.

Tyson Mutrux 00:16:57 Your job is to create a structured blog outline with clear sections and bullet points. Right. That's that's like the beginning of what you would use for, like, an outline agent for like someone that an agent that's going to evaluate. I keep saying someone. Almost like it's a real person, but I know it's not. But, for an evaluation agent, you are a critical evaluator. Refine the provided blog outline to ensure logical flow, completeness, and clarity. That's how you might start the evaluation agent. And if you have other detailed instructions below that, you do that. For example, like the email one I showed before it was having problems giving out outputs about dollar dollar amounts. So for example, email comes in about an offer and then the reply might be thank you for your offer of $12,500. Well, it was having problems putting the comma in there and the decimal point in there, and also the dollar sign. It was just like it was just the numbers is what it essentially was, what it was.

Tyson Mutrux 00:17:58 And I gave it instructions on where to put the dollar sign, where we put the comma, all of that. And so you might have to give it some further instructions like that. But that's that's part of the testing process too. And just know that there's going to be some testing with this too. But you want to make sure you're giving very specific instructions. And if there's anything unique about your practice area, you're going to want to make sure you add that detail as well. So some and some of the stuff, by the way, hopefully you're listening to this or watching this one first before you watch the other ones, because I am giving a little bit more detail about how to guide some of these agents that are probably not going to do in the subsequent ones. So, if you, it's good that you're starting here because I'm going to give you more detail here than I will probably in the other ones, just because I this one's probably going to be a little bit of a longer episode, but that'll allow me to streamline the other ones for you so you have a pretty good understanding.

Tyson Mutrux 00:18:51 And I will remind people in the other episodes that make sure to come back and and watch this one first. I could I do want to touch on n a n and the reason why we're using Nardin. I don't get paid by N, there's no affiliate links, nothing like that. but this is something that it's when all all the agents that we tested out, all the different platforms. This is the one that we can modify the most. this is the one that gives us the most flexibility. It has the most integrations. It is the when it comes to the learning curve, it's higher. So if you if you do something like night N. Luckily I have someone like that can that can help me get over the hump on some of this stuff. If you don't have someone like Kashif, there's other platforms out there that are a little bit easier to use. You're not going to do as much. Be able to do as much with them. But the the flexibility with with being able to do a lot of different things, with being able to do things with coding that you can't do with other platforms.

Tyson Mutrux 00:20:00 It's a pretty vast system. It's pretty awesome. And there's it's pretty cool because there's a lot of cool GPT s built out in OpenAI that you can ask you questions, and it'll just give you the code that you need to copy and paste. I've done that on a few different things. It's a pretty it's a pretty cool platform. talking about let's talk about monitoring a little bit. Make sure that you're constantly checking on these to see what the outputs are, checking for error rates, all of that because you want to make sure that you you're going to have to refine these over time. It's just like if you're I mean, if you're just thinking about if you're training an employee, right. And sometimes you that's why we train a lot with our firm. And you have to kind of go back and retrain on things. Same things with the AI agents. Sometimes they can kind of get off base, especially if you're using any sort of platform that's a self-learning platform where they're using something like a Rag system, which I'm going to talk about in the I'm going to talk about Rag in a completely different episode by itself.

Tyson Mutrux 00:21:01 That's going to be it's a lot to cover. So and it's a pretty complex thing. So if you don't know what rag means, don't worry about it. But, if you if you're using some sort of a self-learning system, then you're, you're probably gonna have to retrain over time, because there's probably times where you're gonna have to debug or retrain and all that. So make sure you keep an eye on things. just to kind of recap, when it comes to sort of the advantages, potential challenges, I guess I'll cover to a little bit when it comes to prompt training, you're probably going to get some higher content quality because you are you're refining it as you go down the process. And that's one of the great advantages Edges of a prompt chaining. Easy to to debug it. Find out where the issues are. That's pretty great. And then also it's it's such. It's such a simple thing that you can scale it. and you can it's also adaptable to other workflows, which is pretty cool.

Tyson Mutrux 00:21:57 You can use this with pretty much every other, workflow. Okay. Because you could just kind of plug in. It can be, it can be up chain, down chain, whatever it may be of the other workflows too. That's that's another one of the cool features of this. Some of the the challenges of it. you do have to be a little you have to be you have to refine the agents quite a bit more. You have to be very specific when it comes to the roles. you gotta clearly document each agent's roles, their interactions, the outputs and all that, too. So that is that's there are some challenges with that. cost control can be another thing too, depending on which platforms you're using, which LMS you're using, which LMS. As you'll recall, those are the ChatGPT of the world. The Gemini, those are those cost money to use. Right? And if you're not if you're not, if you're just firing a bunch through it, cost can go up quite a bit.

Tyson Mutrux 00:23:00 So keep keep that in mind too. so that's, that's depending on what you're pushing into it and pushing out of it, that could cost you money, a bunch of money if you're not, if you're not paying attention. All right. So just to give give you some tips, some final tips. Make sure you clearly define those rules. I'd work with a worksheet or something beforehand like a spreadsheet to to make sure you figure out what all the rules are. Maybe scratch it out on paper. Decide okay, how do we want this thing to look? What do we think this is going to look like? And there's been a few times where I thought it was going to look one way, and we ended up changing it and making it better. So but having that visual is pretty handy and then having those rules to find out. Pretty good. Use ChatGPT or some other LLM to help you with some of those instructions. Pretty darn good. Like I said, that that GPT just search engine if you're using Nardin in OpenAI and or and ChatGPT and you can find there's some really good GPT in there too.

Tyson Mutrux 00:24:01 Test test test. Make sure your test is a bunch really, really important. maybe. Okay, so this is another one to make sure you use in the right models. The what I mean by that is if you ever go into ChatGPT, there's several different models, Claude. All all of the, all of them have several different models. Right. And some of them are better for creating images. Some of them are better for writing. Some of them are better for reasoning. Make sure you're using the right ones for the for the for the tools that you're or for the agents that you're creating. That's that's really, really, really important. Make sure you have some sort of schedule for monitoring things and so you can go in and check and make sure everything's going right, because if you don't, and that's really for any automation. But that's, that's something that is important. And then make sure you iterate, make sure you get better. Don't just set it and forget it. Come back and change things.

Tyson Mutrux 00:24:51 If it's, not, not working the way you want it to. All right. I think that's everything I want to cover today when it comes to prompt change. I'm just looking through my notes and see if there's anything that, I want to cover, but I think that's all. I think that's enough for prompt chaining. the next one that I'm going to do, just to give you an idea, I'm going to I'm going to talk about routing. Routing is going to be a really good one for emails and routing emails and any, any big major flow of information that you have coming through and then routing it to where they need to go. This is going to be the episode for that. so I'll cover routing in the next episode, so stick around for that. Before you head out, though. remember that we we're really open up the floor for questions. So if there's anything that you have about starting or running a law firm, maximum law.com ask you also text me (314) 501-9260. It doesn't matter if you're just starting out, if you've been doing this for a while.

Tyson Mutrux 00:26:00 you know, maybe you're thinking about launching a firm. You just want some help, right? just let me know. Right? You could be somewhere in the middle, and you're kind of stuck. All good. We've got your back. So maximum law.com forward slash ask or shoot me text, and I'm happy to have it. happy to help you out. So remember that until next week. Consistent action is the blueprint that turns your goals into reality. Take care.

Guild Membership

Meet us in Scottsdale, Arizona! The first quarterly mastermind of 2023 has tickets available! Become a member to purchase your ticket.
Join the Membership

Love this Podcast Episode?

Share this on social media:

Free Access to Stage 1 of Maximum Lawyer in Minimum Time

Sign Up Today!

Customer Reviews

4.9 out of 5

Join Our Facebook Group

If you want to discuss current events or ask for help from other thought-provoking legal professionals, join our Facebook. Stay tuned for updates.
Become a Member

Unlock The Law Firm YouTube Accelerator Playbook

Get the complete, step‑by‑step system we use to turn YouTube into consistent, high‑value clients!
Button: Get Instant Access to the Playbook
We only send you awesome stuff =)
Privacy Policy
crosschevron-up linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram