📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

How I Build Prompts for Voice AI Agents (2026)

Alejo & Paige - Amplify Voice AI1:03:54

Transcription

Today's video is very special. Welcome to my prompting master class. Not only am I going to teach you the foundations of what makes a good prompt, but I'm also going to build one live. So, I show you how I do it.

First, let's look at the structure of this prompt that has been optimized for GPT4.1, not by myself, but by OpenAI itself. They released a 29-page paper on how to properly prompt GPT4.1, and I adapted those 29 pages to voice AI leading not only to this structure but also to this way of prompting. So later in the video, we're going to get into what each of these sections will include and how to prompt it.

Every good prompt is divided into sections. It helps the AI have more structure and follow instructions better. And ours starts with a role and objective. This is the identity and the main objective that the agent has to accomplish. Then we have the personality. This is going to be contextual to your client, to what you're trying to build, because not every agent needs to be professional and friendly. They need some more characteristics that make them suitable to the use case. Then context. Tell it about the company that it's working for. Tell it about the user that is calling or that is calling it.

Then we have instructions. Within instructions, we have some subsections. You identify some subsections because it has two hashtags and instructions only has one. And here's where we will explain our communication guidelines, how to speak, the number and spelling format, how to say numbers or emails out loud. And then, very importantly, tools usage, how to use these tools.

Then we move on to stages. These are numbered stages: one, two, three, where we start with the greeting and then what? Okay. And then the user did this, and then what? And finally, example interactions is where we show the agent how we wanted to speak given different scenarios.

Okay, now let's get real. Everybody wants to know my secret. And yes, there is one, but it's not what you might think. Most people think I either build every single prompt from scratch and start from this and and and start writing word by word. And then other people think that I have a perfectly trained AI that built it for me. And I have found that my most effective method is mostly manual with the help of AI. Let me show you what I mean.

It all starts with actually understanding your use case. We usually use Figma to map out the conversation flow. What are we doing? What are what is the agent supposed to? It all rises and falls on you understanding your use case. What are you building? What is the agent supposed to say? We usually use Figma in order to create a conversation flow, which I've shown in other videos, and you can check out our school community for more guidance on building a visual conversation flow. Uh, agreeing to that conversation flow with a client or with your stakeholders. And then we get to building. And I build with Claude. This is my Claude project. I don't just ask for a prompt and then I copy-paste it and then go my merry way. There's a lot more to it and most of it is very manual.

So first, we have to define a use case and then we have to define some considerations. The difference between building a demo agent and a production-grade agent is that in both of them you have the use case, but the considerations arise from actually having a client, actually having stakeholders that tell you, "But the agent should not do this," and "The agent should handle these situations in this one manner," but "these other situations in this other manner."

So, without revealing any client information, we're going to inspire off of a use case that we have actually built for a law firm. And this is going to be an law firm agent. It's going to be an intake agent. So, inbound, this agent is going to be asking some asks qualifying questions to ensure that this client is a fit for the law firm. And if it's a current client, it can do a cold transfer to one of the three lawyers that are in the law firm.

Now comes the good part, which is what are the limitations of this agent? One of the biggest considerations is, well, let's say we do transfer the call. They say this is a current client. What happens if the lawyer is not available? The call transfer is only available for current clients. This is going to be a warm transfer such that if the lawyer does not answer the phone, the agent will come back to the user and ask them to leave a message and the lawyer will get back to them.

Now, we're going to refine this a bit further. This is going to be a family law firm. This could be an injury law firm. It could be uh anything else, but the niche that we're going to focus on is family law firm. Thus, one of the considerations is, is a user calls with any matter outside of family law, for example, a car accident, ask all the qualifying questions and then share that somebody will be in touch with them. If a user's matter is within family law, comma, ask all the qualifying questions and then transfer them to the receptionist. And I just want to be very clear here. These considerations are not enough. There's a lot more things to consider for real production-grade use cases like, is this within hours or after hours? Do I need a whole other agent for after hours that can't do call transfer? Those are the type of client management and project planning questions that we teach how to go through uh in our school community. So, we have several sessions that we've done of how do you find out what these considerations are, what the usage actually is, and what will be bring value to the client. But for now, this is enough complexity for me to show you what you came here for, which is how do you build a prompt that is effective.

What if functions are involved? Let's get into it. So, we're going to send this message to Claude, but you've probably already noticed that there are some instructions here on the top right that I am going to walk you through. What I have found is that the most effective way to become better at prompting is doing it manually, is going line by line. Why is this not working? Well, have you read your your whole prompt line by line? That's what most people skip. And we're going to get much deeper if you that's already something that you do. You read every single word. Great. We're going to get deeper than that because I'm promising you a master class and I'm going to give you a master class.

So, what we're going to do is send this message and what you'll notice is that Claude is not going to build a prompt. Claude is going to ask me questions. Okay. So, it's starting. "I'll help you create an optimized prompt, but first strategic questions." But how does it know what to ask? For example, "What are the specific qualifying questions you need asked? Type of family law matter, urgency, location or jurisdiction, opposing party details, children involved?" Yes, we don't want AI to just come up with random questions. We we want to give it guidance. We want to collaborate, not just use it as a tool.

So, before we get into all the questions, read them all one by one, and then answer them all one by one. Let's look at this master prompt. I've worked on this so hard for so long and now I'm really happy to share it with you. This is optimized for building for GPT 4.1 because this is this is based on on uh OpenAI's recommendations and how to best prompt it. So let's get into it.

Hey, my name is Allejo and real quick, sharing this knowledge with you is one of the things that brings me the most fulfillment that I've ever done. Uh, so I wanted to thank you for watching and as I share all this information and this value, uh, the the only thing I can ask for is if you like and subscribe. It helps this video get to other people. Uh, it means the world to me. So, thank you and let's get into it.

Okay, now we start with teaching Claude the same exact structure that we're using for our voice agents. Well, why do we want to do that? Because we want consistency out of Claude. So if we give it the same prompt structure that we are using, it is much more um um able to understand that structure, understand how you use that structure, and emulate.

So, we are an expert. You are an expert voice agent prompt engineer specializing in GPT 4.1 powered real-time voice agents. Your role is to either create new voice agent prompts or audit existing prompts for optimal optimal performance. You understand that voice agent development is iterative. Prompts require multiple refinements based on real-world testing and user feedback.

So, number one is that we can create a new prompt like we're doing right now, or we can iterate on an existing prompt. As a personality, you're methodical, collaborative, and focused on practical results. You ask strategic questions to understand context before making any recommendations. And you recognize that every agent has unique requirements. So you gather specifics rather than applying generic solutions. I know that this personality goes beyond like, "You are friendly." Um, but I am sharing this methodical, collaborative, and focused on practical results, and then I'm showing it what that means. What does it mean to be collaborative? Well, you ask strategic questions. Cool. Let's go. Let's roll into context.

You're working with expert practitioners building voice agents for inbound and outbound use cases. These agents open in real-time with sub-2,000 token prompts, which is what is very much recommended for GPT 4.1. Don't have a prompt larger than 2,000 tokens. Um, and this would be excluding the knowledge base, which we're going to look at later. Success is measured through manual testing with transcript analysis. This means that I, as a human, go check if the prompt is good. I'm not waiting for Claude to tell me, "Yes, this is perfect." So, it's manual testing that defines the quality and integration varies by client, be it a calendar booking, SMS transfer, CRM, knowledge, knowledge queries.

Then we have instructions. This again is the same structure. We have instructions and then we have subsections. In this case, the subsections are the core prompt structure, which are the one we already went through. Um, knowledge base is something that I recommend embedded in the agent. If the agent only has one or two functions, like it can transfer the call, should you have the knowledge base uh separate or within the prompt? I recommend in the prompt. If you have a very complex agent, then I recommend having an external knowledge base, and I do have a video dedicated to knowledge base, which you can click uh in the link below and go check that out if that's what you're interested in. Otherwise, let's keep it going.

Voice agent best practices integration. So, this will be included verbatim and final prompt unless asked not to. What does that mean? Well, in the communication flow, we want the agent to only ask one question at a time and wait for a response. Keep interactions brief with short sentences. Use natural filler words. Handle AI questions with humor, then redirect to main objective. And never bundle multiple requests. Don't say, "What's your email and phone number?" So, these are best practices that we've honed in on for for literal years. Um, and now we added to this master prompt because every agent should have this except when they shouldn't. So, uh, we will include these verbatim unless the user says, "You know what, um, don't use the fillers." Okay, great. So, this will not be included. So, again, it's about collaboration. It's not about the AI doing everything.

Let's move on. We have technical precision. Symbols not to use. This is the M-dash. We don't want the agent to use the M-dash. We want a single hyphen. And this is an interesting one. This is a voice conversation with potential lag. Sometimes messages show up as two broken-up messages in a row as opposed to one full message. And transcription errors like wrong words. So, we have to adapt accordingly. Consider context to clarify ambiguous or mistranscribed information. This helps the agent not answer an unfinished message. Uh, maybe ask for more information, or if there is m some mis-transcription, it could also um uh gather the context to say, "Oh, this is what the user meant," and and be sure if it has some and understand whether it can answer the question with the information that it has.

Then alongside broken-up messages, we have, if receiving an obviously unfinished message, respond, "Aha." Sometimes voice agents are very eager, so we just want an "Aha," so the user keeps talking. Um, write out symbols as words, so $3, not dollars, three. And the word "at," not the symbol "@." Read phone numbers and account numbers in natural groupings of three, like 555-123-4567. This is the way we've taught it. You can modify this. Sometimes you can you can do uh phone numbers as one type that include those 10 phone those 10 numbers and they're formatted the way you want them. But we're also including account numbers, like like bank account numbers. So, we want to space that out. The whole point is consistency. So, this is consistent and and the human on the other side will be able to understand this, even if it's the not the most common format for phone numbers. But you can go ahead and change this because this exact uh prompt I will share with you and our final prompt that we build, I will share with you in our school community. The resources will be there for you to take and modify them however you want. The whole point is consistency.

So, in this case, we're teaching it how to read numbers, not only phone numbers. We're also teaching it to spell out names and emails. So, read them in groups of letters. When saying names, we want the agent to say, "First name is Jane, spelled J-A-N-E. Last name is Johnson, spelled J-O-H-N-S-O-N." And that space-hyphen-space is what gives 11 Labs, for example, that um awareness of, "I should pause here." So, it doesn't go all in a row. This is a short name, so there's no hyphen, but this is a longer name, so there is a hyphen. This is super super useful, useful especially for emails. When saying emails, instead of just trying to spell this out, we give it the structure. "The email is j-h-n-s-m-i-t-h-dot-51-at-gmail-dot-com." So, the agent does this really, really well. Go test this out for yourself. Um, this is not what I'm going to focus on in today's master class. Uh, uh, the the spelling. We've already perfected this. And if you have any questions or if you have a different use case, come to the school community and ask us uh, uh, here to help. Read times as 1 p.m. to 3 p.m. Never 1:00 PM. Uh, retail has has adapted this of how to read numbers and times very well, but agents still need some help because at the end of the day, it's 11 Labs spelling that out, and we want to give it as much guidance as we can.

Then uh state time zone once. Don't repeat through our call. If you're in a US sort of use case, you have multiple time zones that you have to deal with, and we don't want the agent saying, "3 p.m. Eastern time, 4:00 p.m. Eastern time." The the user already understands that it's Eastern time. So, we save the time zone once.

Then for call management, we have track information provided. Never ask for the same data twice. This is something that the agents do a lot. Limit choices to three options maximum. Like when retrieving availability from a from a calendar, we just want to offer three options. We don't want to overwhelm the user with options. Then we want to vary enthusiastic responses. Sometimes you don't want to have this. Different use cases uh uh make this sound a little weird, but we definitely want to avoid repetition. We don't always want to say, "Great, great, great." So, we want to vary what the use what the agent says. Um, and calls cleanly after goodbye phrases so the agent doesn't get hung up. Um, if the wrong person answers, ask politely for the intended contact. This is something that happens. Again, we've gone through many, many clients, many, many use cases, and these are the best practices that we've gathered that that work the most reliably for most use cases.

Now we have the good stuff, which is the function integration. We want to name tools clearly, which indicate their purpose. We want to provide detailed tool descriptions and usage examples. We don't also we don't only want to tell it what tools to use. We want to tell it when to use it and how to use it. We'll use what's called verbal bridges while the function is triggering, like, "Let me, let me check that for you." And if there's insufficient information for the tool to be triggered, uh, ask for new details rather than hallucinating those those uh parameters. If you're curious about mastering functions, I did do a video purely dedicated to functions. You can go check it out. Uh, uh, and and I go over this in much more detail.

Then this is the latest addition to this master prompt, which is uh dynamic variables. So, we give awareness of how we actually build. If you tell if you tell uh ChatGPT or Claude, "You know, include dynamic variables," it won't do it the right way because it doesn't understand that retail that VAP use these double curly brackets in order to to define dynamic variables. So, um, you should name dynamic variables in all caps and underscores, such as double curly bracket company name. We want to confirm all necessary dynamic variables and spelling with the user. This is very important. Don't just make up dynamic variables. And then the predefined dynamic variables are current time and user number. And they should always be included in bullet points under context.

And now, my favorite part, which is the strategic questions. We want to ask questions before creating the prompt. So, questions about the use case and the context, the agent's primary objective, is this outbound or inbound? What information do you have about the contact beforehand, if any? Sometimes somebody's calling in and you're not really checking the CRM whether you know them, maybe it's not possible, so we want to clarify what dynamic variables might be might we be able to use, and then what's the ideal call outcome and fallback options? These are some generic strategic questions. Sometimes we did give it the primary objective. So, what Claude did is adapt these questions to the information I had already given it. Again, collaboration, not just AI intelligence. But we really want to dig into the use case and the context, the integration requirements, like tools or specific business hours, and then the branding and communication, like the personality and tone, any company terms that we should use or compliance requirements, how should the agent handle objections? Everybody has a different take on objection handling. So, Claude asks us, "How do you want to handle this?"

And then I'm going to skim through this because the this is the audit checklist for existing prompts. So, when you ask this project about, "Hey, I have this prompt, but this is what's wrong with it," or "I want to upgrade this prompt," uh, it'll do some validations like structure validation, that is under 2,000 tokens, etc. Um, specific requirements for voice, like including filler words. Then for the conversation flow, that there's clear stages, numbered steps, then function integration, and what are some missing elements, and so you have better awareness of the structure of this project.

Claude is going to go through some different stages itself. Again, I'm using the prompt structure that I'm asking it to create. So, for stage one, which is the discovery and new prompt, ask strategic questions. We just went over this. Then for creation and audit, we will draft a prompt following the structure and the best practices. Or if you want to uh audit a prompt, an existing prompt, we essentially do the same but with a checklist. Then refinement collaboration. This is a good one because once we've tested the the prompt, we can feed those transcripts, we can feed those things that went well and that didn't go so well back to Claude to help us refine the agent. This one's key. And then this is called helping you test by telling you, "Hey, make sure that this flow goes correctly. Make sure that this other flow goes correctly." And what are the things that we need to test for? Because I recommend manual testing. Be it through call, if you're trying to test some of the voice aspects, or usually through manual chat. Uh, uh, so you can go through the different paths of the prompt that that Claude and you will create. So, what are those scenarios that you must test? And then, of course, some example interactions. This is what it looks like to create a new prompt. "The user says this, and then you say that." What does it look like when the user says, "Hey, something's wrong and I'm not sure what." What does it look like to audit? And what does it look like to have this iterative improvement?

And then important reminders, right? Um, we have GPT4.1 follows instructions literally. Uh, we want to be explicit about desired behaviors, but we don't want to be too too literal. We don't want to say "always" and "never" because GPT4.1 will take that literally, and that can lead to undesired behaviors. Uh, voice agents require iterative refinement. Expect multiple rounds of testing and improvement. Voice agents do not have time awareness. They're still LLMs. So, their only sense of time is the previous interaction. So, avoid using terms that refer to length of time. This is I see I see a lot of people building like, "And then wait 3 seconds before speaking." That does not work because there is no awareness of time. Then functions are always handled in the back end. Prompts should describe how and when to use a function, but the function itself is handled by the human. Sometimes AI want to define functions with actual code in the prompt, and that just does not work. Then real-time constraints matter. Keep prompts concise but comprehensive. Tool integration varies from use case to use case. So, you we always want to clarify where functions are actually needed. Manual testing with transcripts is the primary feedback mechanism. Right? I have a test, I go get the transcript from the call history in retail, and then I I feed it back, and then we go from there. We we iterate from there. Um, then industry-agnostic approach. We want to focus on universal voice voice interaction principles because the user will bring in the considerations that, "This is what's so special about this one use case in this one industry." And then instruction following is critical. Uh, GPT 4.1 excels when rules are clear and specific. And this includes not having a bloated prompt, not having 6,000 tokens in your prompt. Keep it under 2,000. That will keep uh uh GPT 4.1 effective. And finally, when creating new prompts, gather all content from the user before drafting to avoid multiple revision cycles, which is what it did. It asked me strategic questions. When upgrading prompts, identify specific prompt improvements rather than general suggestions. Also key, always check for conflicts or ambiguities in prompt creation improvements. Sometimes we tell it, "Hey, always uh transfer the call after the user says 'human'." And then we say, "You know, uh, then then we're then we're in the example interactions, we have a contradiction. We have the the user says, 'I want to speak to a human.' It's like, 'Do you want to speak to reception or or a or a specific person?'" But that's not what you told it before. You told it, "If the user says 'human,' then immediately transfer." So, we want to check for those conflicts or ambiguities when we check uh when we create the prompt. So, Claude can challenge you. Always has strategic questions in every conversation before doing anything else. And now that you have this whole context about what Claude is doing, now you can be the most effective because now you understand why it's asking you these strategic questions and where it's coming from, how it's going to help you create this great prompt for your voice agent.

Okay, so we're going to go through these one by one, or we could just say, "Answer your own questions and build a prompt." That's what most people will do, and then they end up with problems that they don't even know what's in them. So, yes, we are going to go through these manually, and yes, we are going to answer each question one by one. This is where the real skill-building happens.

"What are the specific qualifying questions you need asked?" We want to ask whether uh what's the urgency of the matter, what jurisdiction it's in, and if there are children involved. We also want to ask one disqualifying question as in, for example, whether there was a car accident or some kind of injury. We really want to suss out whether this is indeed a family law matter or something not related to family law.

"What information differentiates a current client from a new client?" Do they provide a case number? Do they ask or do you ask for their name and confirm in a system? Usually, we would do this. We would have an inbound call. We would check the phone number in the CRM and then find out, "Is this a person that we know or not?" Meaning meaning, "Is this a new client or not?" And I do have a video on that on dynamic variables where I I show you how to create this inbound system that checks a CRM before answering the call. I'll leave the the video linked above. For now, we're going to just take the user's word for it. We will ask the user whether uh they are a current client or they're calling for the first time.

"For new clients with family law matters, what information needs to be collected before transferring to the receptionist?" Just the qualifying questions is fine.

Now, the law firm details. "What's the law firm's name?" Amplify Family Law. "What are the names of the three lawyers?" You can make up the names of the three lawyers. And uh, yes, one will handle divorce, one will handle custody, and the other one will handle abuse. And yes, one will handle. Okay, awesome. Let's go to number six. "What specific family law areas do you handle?" Divorce, choice, custody, adoption, spousal support, domestic violence, etc. All of the ones mentioned. "What areas do you explicitly not handle so the agent knows when to say someone will be in touch?" Any areas outside of the ones you mentioned.

Now for transfer and tools. Uh, we have question A for the warm transfer. Word function tools, functions will be available: transfer to lawyer, transfer to receptionist, send message to lawyer. We're going to do transfer to receptionist and then transfer to lawyer. Within the transfer to lawyer function, we're going to have a dynamic variable. So, in context, please make up the names of the three lawyers and also add some phone numbers that we will use for the transfer depending on which lawyer they should get transferred to.

Nine. "When a lawyer doesn't answer, what information should be captured in the message?" We already have the call back number of the user. Uh, a brief summary or urgency level. Yeah. Yeah. But we want a brief summary and and urgency level.

Final few questions. Brand communication. "What's the desired tone and personality?" Professional and empathetic. Warm and reassuring, direct and efficient. Adapt to the situation of the user. Since this is family law related, we want it to be generally empathetic, but we don't want empathy to sound wordy. We want it to just be reassuring while professional. Okay. Yeah, this is this is a good one.

"Are there any compliance requirements or phrases that must be included?" Like, "This call may be recorded." Uh, disclaimers about legal advice. Um, uh, let's say disclaimer, uh, "This call may be, uh, this call is being recorded." Disclaimers about legal advice. Do not let the agent give any legal advice. And for compliance, we have to say, "I'm an AI assistant uh for Amplify Family Law." Awesome. Cool. That looks good.

"What are your business hours? How should after-hours calls be handled?" See, it even caught that. That's awesome. That's not in our master prompt, but it caught that if you're doing transfer, well, how are we handling after hours? And for a real use case, like I mentioned, uh, uh, we would be handling after handling after hours differently, of course. But for now, in order to focus on you getting better at prompting, we're just going to say it's 24/7.

And then uh for dynamic variables, "What information do you have about the callers before they reach the agent?" Also, when you watch that dynamic variables video, you're going to be able to pull out information from a CRM based on the agent calling. So, uh, we don't have any information.

Once I have these details, I create. Okay, awesome. So, now it can go to town. Now, it has everything it needs to do its best job. And we'll come right back when it's done thinking.

Okay, so it finished the prompt. We can now copy this and paste it, and we're done. No, we're going to read you word by word. We're actually going to understand what it produced, give it some feedback, and create another iteration of this prompt.

So, role objective: "You're an AI intake assistant for Amplify Family Law, a family law specializing in divorce, child custody, adoption, spousal support, and domestic violence cases. Your primary objective is to qualify incoming callers, determine if they're current or new clients, assess whether their matter falls within family law, and route them appropriately. Either transferring uh current clients to their lawyer or transferring new family law clients to the receptionist." Yeah, that's a good summary of what we're doing here. Um, a little wordy for my, you know, for my liking. I might trim it down a little bit, but it's good. It's explicit. It gets to the point.

Okay, personality: "A professional, warm and reassuring without being overly overly sympathetic, which a lot of times looks like wordy. Um, you adapt your tone to match the caller's emotional state, remaining calm and grounded when they're distressed, efficient when they're business-like. You ask questions with genuine care, but avoid sounding pitying. Uh, you're clear, organized, and make callers feel heard, and in capable hands." Again, maybe a little wordy, but we'll just roll with it for now because I want you I want to focus on the core part of the the instruction following and making sure that that everything's clear.

So, for context, "You for Amplify Family Law handles divorce." This we have already mentioned. So, remove. Yeah. Okay, awesome. So, we're going to remove that. "This call is being recorded for." This is uh remove, remove from context. Not bad. Uh, "You're an AI assistant, not a lawyer, and cannot provide legal advice." I love that. Uh, "Firm operates 24/7 for intake calls." Current time, um, and user number. It learned to use these dynamic variables. It just didn't learn how to use them. Uh, I am going to edit that later manually. Three lawyers at the firm. Sarah Mitchell for divorce. Uh, it also missed how to use this. It thinks that I am right. I need the dynamic variable for the transfer call. Not inside of the prompt. And I'm going to show you how to do that in a second. So, we'll know how to we'll know to modify this.

Then instructions, opening protocol, um, client status determination, qualifying questions. Okay, cool. So, there's there's an aspect here and instructions is not really meant to describe the stages. That goes in stages. We want to say it um for instructions. Make instructions the communication guidelines and tool usage, as opposed to the flow of the call. Leave that for stages. Okay. So, it's like doing the opening protocol and determination that is that is stages. So, we're going to routing logic. Yep. Current clients warm transfer protocol. Um, communication style, technical precision. Okay. So, it did it did include this uh call management, legal advice boundaries. Yes. Um, make instructions. Okay. So, I can be a little bit clearer here. So, I'm going to do that. Um, for instructions, remove the subsections with uh the flow of the call. You can keep that for stages. In instructions, you should keep the warm transfer protocol, the communication style, technical precision, information tracking, call management, and legal advice boundaries. So, we're going to see how it does with that.

And then for stages, we have opening and disclosure. Uh, mission call recording, ask how you can help. Yeah, we definitely want to make this more. Cuz this is the opening and disclosure. It's not four different steps. So, this is where where you know this is where AI needs a little bit of hand-holding. This is one step, not four. Um, term if current or new client, and if current client uh uh if new client see these are not steps. If Okay, cool. So, let me let me explain that to you. For stages, we really want to just have the stages numbered, not each individual step. If there are some conditionals, then you can use ifs or tabs to show which instructions depend on each other, steps depend on each other. Okay, cool, cool. Um, let's keep it going.

Example interactions. Example one is a new client family law specifically for divorce. "Thank you for calling. How can I help you today?" "Hi, I need help with a divorce." "I'm so sorry to hear going through this. Just so you know, I'm an assistant." "Okay, lovely. I'll get I'll help you get to the right person. Lovely. First, are you a current client with us or is this the first time calling reaching out?" "First time calling?" "Lovely. Um, oh yeah, these these M-dashes replaced all by." Okay, cool. Let's give this some structure. A little bit of structure at least. So, we have new client number one. So, you mentioned this is about a divorce. Just to make sure we can help you, is this related to an injury, car accident, and a kind of personal injury claim? "No, nothing like that. Just a divorce." Awesome. Perfect. What's the urgency of the situation? "I need to get this started soon." I understand. What jurisdiction? "Los Angeles County." Are there children involved? "Yes, we have two kids." Awesome. Thank you for providing that information. Let me transfer you to our receptionist who will help you schedule a consultation with one of our attorneys. Please hold for just a moment. Uses transfer to receptionist function. Awesome. Cool. So, we're showing it not only when to use that, right, which is in the stages when to transfer and all that stuff for warm transfer handling, but we're also showing it how. We're saying, "Well, at this point, this is this is how you identify when, and this is how you use it." So, we want to give you that coherence of what, when, and how.

For second example, uh, the current client. "Thank you for calling. I need to speak with my lawyer about my custody case." "Sure thing. I'm an AI assistant. Are you a current client with us?" It that there is an implication there. Yeah. Um, "What's your name?" "So, you're working David Chen on your custody matter. Is that correct?" "Yes." "I still let me connect you with David now." Um, and then transfer to lawyer function with David Chan's details. This one it caught right. It didn't quite know how to use the dynamic variables because it again, it's not building the the functions. I'm building the functions, but that this was correct. We want to use it with David Chan's details.

Example number three of an example interaction. Current client lawyer unavailable. "Thank you for calling. I need to talk with Sarah Mitchell about my divorce case." "Sure thing. I'm an AI assistant. Let me confirm that you're a current client." "Yes." "And what's your name?" "Lisa Thompson." "Lisa, let me continue with Sarah now. Please hold for a minute." Attempts transfer to lawyer, but Sarah doesn't answer. "I'm sorry. Sarah is not available right now. Would you like to leave a brief message and she'll get back to you as soon as possible?" "Yes, please." "What would you like me to pass along to her?" "Some questions about the paperwork she sent me." "And how urgent is this? Do you need to hear back today, or is it more routine?" "It can wait until tomorrow." "Just to confirm, is the best call back number the one you're calling from now?" "Yes, that works." Okay, we did give give the voice agent uh awareness of the phone number with a dynamic variable, user number. Cool. So, that that looks good. It's leaving a message. Um, and then new client for non-family law matter. "I was in a car accident. Need a lawyer." "Are you a current client with us? First time?" "This is first time." "Mention a car accident. Is this related to any family law matters or like divorce or custody, or is this specifically about the accident and injuries?" "Just the car accident." "Okay, understand. Well, that's not something we handle. I'll make sure someone from our offices reaches out to you to discuss your options or provide a referral. Can I confirm your the best call back number for you?" "Okay, lovely." So, this is where the real use cases come. Like the the law firm might not want it to say this. It it might want to take all of its information. And in fact, that is kind of what I suggested at the beginning. Now I'm reading this and I'm like, "Oh, maybe you don't need all the qualifying questions." Um, because you have enough to understand. This is for a referral. This is not for us. This is for another law firm.

And finally, example five, varying responses and natural flow. "I think I need help with a custody issue." "I'm here to help. Just so you know, you're a current client. What what is varying here? Is this related to an injury? Personal law firm? It's about my kids." "What's the urgency?" "Um, what jurisdiction?" "Uh, you mentioned two kids are involved. How many?" "Okay." Yeah, this I'm going to remove. Like, remove example five because it feels redundant. You don't want you don't want to add more examples just for having more examples. Example five feels redundant.

Okay, cool. And then important reminders is a voice conversation of potential lag. Okay, cool. Uh, warm transfer me. You need to may need to return to the colony. Provide legal advice. Track information already collected. I'm going to clean these up later because some of these are just already in instructions. AI disclosure is required. Call recording disclosure is mandatory. Family law only. Okay. I'm going to I'm going to clean this up later once we transition to retail. I'm going to send this in. Dynamic variables to configure. Yeah. Uh, now build the final refined prompt. And feel free to ask me any questions if there are ambiguities. This is a huge one. We've already asked we've already asked a ton of questions. I I know that uh you're tired of me answering questions, but this is this is key because what if I am saying something here that needs remove the subsection with the flow of the call? Well, you want to just remove the flow of the call completely. No, no, no. That's not what I mean. So, if instead of the voice of the of Claude getting confused, what I wanted to do is ask what I wanted to do is clarify. So, for the stages section, if it's just what it what it's doing, since we're removing the individual numbered steps and keeping just the main stages, do we want me to restructure it like this? High-level stages with conditional sub-bullets or like this? This is exactly what I want. is just the opening and disclosure with client status check, if current client stage five, if new client stage three. This is perfect. Uh, option B. And then also one clarification. Should the call recording disclosure stay in the prompt somewhere, like in the instructions or stage, or removing entirely because it's handled elsewhere? Keep it. Yeah, keep it only in the uh example interactions because that's going to be our opening message, like it's going to say that every single.

Okay. So, role and objective must have stayed the same. Personality. Um, I think "incapable hands." Yeah, it it changed the wording a little bit, but it's pretty much the same. Uh, we're going to clean this part up uh manually. Okay.

Instructions. Warm transfer protocol. Communication style. Let's check on this. "When using transfer to lawyer, this is a warm transfer. If the lawyer does not answer, return with, 'I'm sorry, they're not available right now. Would you like me to leave a brief message and get back to you as soon as possible?' Sure. Uh, brief summary of what they need, urgency level, confirm call back number, and reassure." Yeah, that that sounds good. Then communication style. There are all these phrases that we um that we had in the master prompt. I think I'm going to remove these because I don't really like how they sound. Um, but it's it's good to have instead of just having question, question. It it has a it adds a little bit of interactivity. Okay. Technical precision. Same instructions we already saw before. Information tracking. Yes. Um, confirm critical details. "You're calling about this." "Caller's information out of order." Acknowledge it and continue with the remaining questions. This is huge. See, like the AI just catches these things, and I I love it. Limit choices to three. There is not really choices in this. Uh, and calls cleanly after goodbye phrases. You know what? I'm going to finish this up manually in retail because there I already see some things that I can that I can clean up that I can remove. So, let's go do that. I'm going to go uh copy this, not not by sliding and copying because it'll remove some of this um uh markdown that we want. I'm going to copy with this. I'm going to go back to retail and then I'm going to paste it there. Okay, cool. Just start by cleaning this up first. Here's a refined prompt. Boom. Boom.

Okay, so we read over this. This looks good. Uh, personality. We already read over this. This looks good. "You're an assistant, not a lawyer, and cannot provide legal advice." "Firm operates 24/7." Um, yes. Okay. So, now we want to say, "Current time is this." And we want to say uh, let's say this because America, Los Angeles, it's like this. Okay, cool. Uh, because it just had some examples of California. So, let's just roll with it. Uh, "User's phone number is this," which gets obviously populated when the call comes in, when the call starts. "There are three lawyers at the firm. Sarah Mitchell for divorce." This is already her phone. We don't need to um we don't need to clarify that. Uh, then we have David, and then we have Maria. Okay, cool. So, we have these phone numbers. These phone numbers are going to go into the call transfer function, which we're going to do in a second.

Then instructions. "Warm transfer protocol." "When using transfer to lawyer, this is a warm transfer. If the lawyer does not answer, return with, 'I'm sorry, they're not available right now. Would you like me to leave a brief message and get back to you as soon as possible?' Sure. Uh, brief summary of what they need, urgency level, confirm call back number, and reassure." Yeah, that that looks good. Then "Communication style." We looked over these. This these look good. These look good. These are the same ones from the master prompt. "Track information." Looks good. "Limit options." Yeah, this is not this is this this is not necessary. Um, and "Call cleanly after goodbye phrases." Yes, we want to make sure there's an end-to-call function. Um, "If wrong person answers or caller asks for someone specific for someone specific, may ask who you're trying to reach." They're telling you who you're trying to reach. So, I don't think this instruction really makes sense. You'll see that I'm removing more than I am adding or even correcting. Uh, we did the correction part on the first draft iteration. Now I'm just removing things that are not necessary there. "Legal advice boundaries." Uh, "If asked for legal advice, I can't provide legal advice, but one attorney will be able to discuss that with you during your consultation. Stay focused on intake and routing." Lovely.

Stages. "Greet caller. Mention uh call recording. Ask how you can help. Disclose AI assistant status naturally." Love that. "Client status check. Determine if current or new client." And then transfer uh yeah, move to the right stage accordingly. "Qualifying questions for new clients only. Ask one at a time. Is related?" Yep. "What's the urgency of your situation?" "Or jurisdiction?" "Are the children involved in this matter?" Okay, so these are the five qualifying questions. Then the routing decision. "If non-family law, inform caller someone will reach out. Collect call back number." Uh, we don't want to collect call back number. Reach back out. Had this at their number. And then end call. "If family law, new client, transfer to receptionist using transfer to receptionist." Okay. "If current client, we move to stage five." This is stage five. Wait, but we already checked if current client. "Client if current client, confirm name and lawyer." Okay, so we don't need that there. "Warm transfer for current clients. Determine appropriate lawyer based on matter type." So, divorce, custody, domestic abuse. Uh, we're going to do the use the transfer to lawyer with appropriate lawyer details. We're going to be using the extract dynamic variable for that, which I'm going to show you. Uh, "If lawyer does not answer, return to caller, offer message option. Collect summary and urgency. Come from call back." Okay. Right. So, the lawyer doesn't answer with a with

A warm transfer. Um, ask if there's anything else you can help with. This is the call closing, and then thank the caller professionally and call. Okay. This looks so much cleaner. This is, this is much, much better than that first iteration with 23 points, 23 steps. Now, for example, interactions. Uh, these should have stayed the same because I only asked for, uh, changing the example five. This looks good. Okay, great. So, yeah, not family law. And then they will, uh, reach back out. Well, that's not something we handle here. I'll make sure someone from our, uh, reaches out to you to discuss your pro, your options. I'll make sure someone from our partner office reaches out to you to discuss your options. Can I confirm your best call? Uh, is this, is this, is this the best call back number for you or no? You know, uh, we might say no, it's this one. Sure. Is that right? And it did the, it did the spelling right. That's awesome. Thanks for calling. Awesome. Cool.

And now for the important reminders. I'm going to clean this up. This is a voice conversation with potential lag. Um, always consider context. This goes in instructions. This, this would not here go here. Is it already in instructions? This is a voice conversation with potential lag. It's always conversation with potential lag. So, two broken up messages. See, I like it better explained like this. So, put that there. I can do this and scroll up quickly and find things quickly because I know my prompts. So, because I've gone over it manually so many times. Never pry legal advice. Warm transfers mean you may need to return to a caller if the lawyer doesn't answer. Be prepared to smoothly handle this. Track information already collected. For example, if caller volunteers a jurisdiction early, don't ask again later. One question at a time. Call recording disclosure is mandatory. Um, we are going to have that in, in the opening. So, we don't need that. We are also going to have the AI speaks first and start with the dynamic message. Um, no, no, we're not going to start with a dynamic message. We're going to start with exactly who, exactly this custom message. Thank you for calling Amplify Family Law. This call is being recorded. How can I help you today? Lovely. Um, what else? One question at a time. Sure. Uh, AI disclosure. Um, mention this naturally during, uh, at the beginning of the conversation. Current clients should be transferred quickly. Don't put them through full qualifying questions. Yes. Right. Uh, family law only matters outside of your scope. Politely inform so then someone will reach out. Awesome. Adapt empathy to the situation. Match the caller's emotional state without being overly sympathetic, without being verbose. Children question is yes or no. Don't need exact number unless caller volunteers it. We don't need that much. Um, vary your acknowledgement phrases. We also don't need that. And end calls cleanly when caller says goodbye promptly without prolonging. Um, yeah, sounds good.

And now we have our prompt. We are pretty much finished, but we haven't tested yet. So that's what we're going to do next. Okay. Now for the fun part. Let's create these functions such that they are dynamic for Hulu transfer. We're going to have one transfer function which is static. It just transfers to receptionist. So let's create that one first, and then I'll show you how to create a dynamic transfer call. Okay. So, transfer to receptionist. Transfer the call to the receptionist when required. When is it required? Well, it's based on the prompt. We're going to have a static destination. This transfer is going to be a cold transfer, uh, because we know the receptionist is going to, going to pick up. Uh, cold transfer, the difference with warm transfer is the warm transfer will wait for somebody to pick up or for it to go to voicemail, and then if it does go to voicemail, it comes back to the user. Cold transfer, it just redirects the call, and that's where the voice agent's job is done. Then the for the displayed phone number, we can have the agent's phone number or the transfer's phone number. So, the user's caller ID shows up, uh, and the receptionist's number. Uh, in this case, we want to have the retail agent's number show up because we want the receptionist to know, oh, this is somebody that just filled out intake. This is a qualified lead. I'm going to pick this up and I know what's on the other side, which is a user. On the other hand, now that think about it, we are we might we might want a cold trans, uh, warm transfer because the user just gave a bunch of information. We don't want to have the user repeat all that information. So, let's do what we call a whisper message. You can, you can pretty much ignore all of this. Uh, detection timeout is is how long should the call ring until the voice agent just considers it as as not, not, not answered. Then the whisper message, we do want to have on, uh, and it's going to be a prompt is, you know, summarize, uh, what the user said about their situation, uh, including their name. Okay, lovely. And then we can, yeah, we can update. We decided to do warm transfer. Okay, great.

So now we need to add the more complicated warm transfer, which is which lawyer should this be transferred to? And we have these people's phone numbers right at the top in context. There we go. We're going to copy those and we're going to create a new call transfer. We're going to do dynamic routing, uh, to the correct lawyer, and we're going to paste that in there. That we're not done though. Uh, we need to, if the user wants to resupport, if the, okay, if the user's, um, situation is related to divorce, then transfer to Sarah Mitchell, um, at plus one, and then the phone number. Bam. If the user situation is related to, uh, child custody, then transfer to David Chen, had this phone number. Great. How am I so fast? I've done it so many times. If the user's situation is related to, there we go. Bam. Then transfer to Maria Rodriguez at phone number. Okay. Lovely. So now we have the dynamic transfers based on the situation of the user. Uh, this is going to be a warm transfer. We're going to have the relaxing sounds. Um, human detection will give the lawyers 30 seconds to pick up. Um, and then it is going to be a whisper message, and it's going to be the same one as the receptionist. Though these would be existing clients, so it wouldn't be the same thing. This would be a whisper message. Uh, uh, tell the lawyer that a current client is trying to reach them. Okay, lovely. Then we have the name of the function. We have to obviously adapt to what's in the, um, prompt, which is transfer to lawyer. Boom. And then we're good. Let's update. And now we have the transfer lawyer, transfer receptionist.

There is a different way to do it with extract dynamic variables where you can essentially decide who to transfer to and those dynamic variables will be extracted. What would that be useful for? What if in your end of call report you want to have, hey, who was the call transferred to? Receptionist, Sarah, David Chen, or Maria Rodriguez? Um, and by extracting those variables, uh, like, you know, transferes, who was it transferred to, their name, their phone number, etc. That's a way to collect that information. But that's not what we're looking at today. Today, we're mastering prompting, and functions is a huge portion of prompting. Now, what we're able to do is actually call this agent and, um, uh, test it. Right? So, so we think we feel that we're done, but we haven't tested it. So, how do we know that we're done? One way is using the test chat. Since we have, uh, transfer functions, you'll see here, please note call transfer is not supported in web call. Uh, it does work in the test chat. It's like, please transfer me to Maria on current client. Yep. Uh, unless it activates it. There you go. Let me connect to you with Maria Rodriguez. Transfer lawyer. And obviously it fails. Um, it says it transferred successfully. That's fine. Uh, and then it tells Maria, "Hey, Maria, I have a current client on the line who's trying to reach you." And then in the whisper message to Maria, it would say, "Hi, Maria. I have a current client on the line who's trying to reach you." Uh, so that worked fine, but let's do an, an actual example with an actual call. So, when you publish this agent, assign it a phone number, and then give it a call. Okay, so let's give our agent a call.

Hello, how can I help you today? Hey, um, I have an issue with, uh, my partner and I need some help. Thank you for calling Amplify Family Law. Just so you know, uh, this call is being recorded. Also, I'm an AI assistant here to help get you to the right person. Can you tell me if you're a current client with us or is this your first time reaching out? No, it's my first time. Got it. Thank you. So, you mentioned you have an issue with your partner. Can you tell me what type of family law matter this is about? For example, is it related to divorce, child custody, domestic violence, or something else? Yeah, it's abuse. I'm really sorry to hear you're going through that. Just to make sure we can help you, this isn't related to an injury, car accident, or any kind of personal injury claim, right? Uh, no, no, it's not. Thank you for clarifying. How urgent is your situation? Do you need immediate help? Come help as soon as possible. I understand. Thank you for letting me know. What jurisdiction or location is this matter in? For example, New York. I'm in New York. Thank you. And are there any children involved in this matter? No. Thank you for sharing that. I'm going to connect you with our receptionist right now, and they'll help you schedule a consultation with one of our attorneys. Please hold for just a moment. That is really funny. So, I, I got confused myself. That's really funny. I got confused myself because I thought I was going here. No, but this is only for, for a current client. I did the intake form where it's asking me the questions, and then, uh, I get transferred to receptionist to finish booking the appointment. So, so it's funny that the AI was more right than I was. So, it guided me through the right process, which was really cool. So, that's reassuring, right? When you have a test and you think you're testing this one thing, but you actually find out, wait, the AI did it right. This is what building right looks like. It's not that I got it right on the first time, and that's why it's good. That's not the point. The point is that I did it in an iterative process. We went through, we went through, um, everything that Claude shared with us. Every question we answered it fully. We gave it context. This is where the work is. It's not in the first sentence. It's not in having a good master prompt. as in being collaborative with the AI such that you get to a point where you're like, "Okay, this is draft one, but this is not what I need. What I need looks more like this, and I need you to remove that and change this from there, etc., etc." It asked for more clarifying questions, and finally, uh, um, it created the final prompt. But that didn't stop there. You saw that I copy-pasted it, but then I continued the work. I went again line by line and found what are the things that are are unnecessary, what are things that might confuse the agent, how can we make sure that the transfers work well, and, and that's that's kind of where the magic happens.

I will show you one more, um, before we wrap this up, which is transferring to an actual, uh, lawyer, being a current client. So, let's try that out. Hello, how can I help you today? Hey, uh, I have talked with Sarah. Thank you for calling Amplify Family Law. Just so you know, this call is being recorded. I'm an AI assistant for the firm here to help get you to the right person. Are you a current client working with Sarah Mitchell, or is this your first time reaching out? Yeah. Yeah, I'm a current client. She's my lawyer. Great. Thank you for letting me know. And, um, can I get your name, please? Mhm. It's Allejo. A L E J O. Thank you, Allejo. Just to confirm, you're a current client of Sarah Mitchell, and you'd like to speak with her now. Is that right? Yep. Perfect. Allejo, let me connect you with Sarah now. Please hold for just a moment. So, you'll notice I prefer, um, having a shorter flow, a simpler flow, a not so many confirmations. This is where the iterative process comes in. This is something you can also do through manual chat. Is the, is the agent being too verbose? I just said I just wanted to talk to Sarah. Um, it would imply that I'm a current client, right? Well, this is where understanding your use case really comes in. What does the lawyer want? Does the, does the law office want, uh, a double confirmation to prevent people from from calling and getting transferred to the person right away? Is there some kind of verification that would happen? This is where the real work happens. We just did the 80% in about an hour. The other 20% the integrations, the telefan, uh, the BNA scenarios, the actually keeping a track record of this, right? Because the calls happen and where do they go? So, end of call report dashboards, that's where the other 20% of the quality, but 80% of the work really comes in. So this is an amazing, uh, launchpad for you where if you know this, if you can master building this prompt, then, then the other things will come, will come naturally. There's still work, uh, but they will come naturally. And for all those, all those other things that I mentioned, which is where the real building for a client happens, refining the, the agent, refining the integrations, all that stuff, asking the right questions to the client is what we teach to our school community. So, come join us. You'll get the template for this exact prompt and, uh, for the master prompt that I use in Claude. And maybe, you know, you're building something for yourself, for your own company, and you want a little bit more than this. Maybe you're stuck somewhere. I have a one-on-one link below that you can book 90 minutes with me, and we can go as deep as you need. Are you building on conversation flow? Great. Uh, I can help you with that. Are you building on NAD? Are you building tests on Secura? Whatever it might be, I'm here to help. So, book a time and, uh, and we can dive deep. There is so much more to learn, and as models get better, I get the question, well, when will GPT5 be ready for prompting? I don't know the answer to that, but I can assure you that when it is, I'll find out about it. I'll create an optimal prompt for it, and I will teach it to you. So, hit that subscribe button and that like button so more people can see these videos and so stay tuned to where the technology goes and how to make the best use of these new technologies. Thank you for watching, and remember to never stop prompting.