00:00:00
hey guys welcome to a new video where
00:00:02
we're going to show you something really
00:00:03
amazing which is a fully AI
00:00:05
conversational chatbot we don't need any
00:00:08
buttons to save data or to basically
00:00:10
grab certain pieces of information or
00:00:12
let the user make a choice everything is
00:00:13
going to go with conversation wise as a
00:00:16
demo and we are going to turn this into
00:00:17
a course very very soon but as a demo I
00:00:20
want to show you some examples of how
00:00:21
you can set this up so I prepared a few
00:00:23
different kinds of sort of conversations
00:00:25
that you might have with a chot right
00:00:27
and which is to book a coaching call
00:00:29
memb information small talk so just to
00:00:31
handle the small talk um for support
00:00:33
purposes and those are the four topics
00:00:35
that we're going to highlight today
00:00:37
there are a few elements that we need
00:00:38
for a fly conversational uh AI chatbot
00:00:40
right the first one will be to go on the
00:00:43
automation step go towards intent and
00:00:45
functions and create a few topics of the
00:00:47
conversations or the topics that you
00:00:48
want to cover right there's nothing
00:00:50
inside of these intents and even
00:00:52
basically disabling the AO intent detect
00:00:54
so it seems it does not do anything but
00:00:56
actually you're quite borong if you
00:00:57
think so so first of all let's go inside
00:00:59
of intent where you will see I only have
00:01:01
a name right and a description something
00:01:03
like this is more than enough then we're
00:01:05
going to set a minimum confidence score
00:01:07
and just save the results towards a Json
00:01:09
field because it's required and then I'm
00:01:11
going towards a specific intent or a
00:01:13
specific flow even this flow that I'm
00:01:15
going to set does not does not do
00:01:17
anything basically because we're going
00:01:19
to use these intent detections in a
00:01:21
different way so I've done this for all
00:01:23
the other ones as well all go towards
00:01:24
their own flows only have a title I turn
00:01:27
them to active you can also turn them to
00:01:29
inactive if you like to doesn't really
00:01:30
matter the most important part is that
00:01:32
we are going to disable this one because
00:01:33
the AO intent detection however great
00:01:35
they still do not capture the correct
00:01:37
context of the conversation every single
00:01:39
time so we're going to use this in a
00:01:40
different way if we are going towards
00:01:42
the next step The Next Step will be to
00:01:43
go towards the keywords and set your
00:01:45
default reply to fire every time and
00:01:47
then go towards the AI content selector
00:01:49
or the AI intent selector sorry and
00:01:51
inside we are going to use the functions
00:01:53
so the functions to determine which
00:01:55
intent needs to be triggered if we go
00:01:57
towards that specific flow which is the
00:01:59
bottom one as you can see there are not
00:02:00
many notes inside right so if we're
00:02:02
going to take a look the only thing that
00:02:04
I'm doing in the first step is just to
00:02:05
slice the uh open AI history so that's
00:02:08
basically the chat history that we are
00:02:09
going to use throughout the entire
00:02:11
conversation with the user on different
00:02:12
topics to provide context or we're going
00:02:14
to slice which means that we are only
00:02:16
saving the last five newest entries of
00:02:19
the conversation with the user this
00:02:20
means that open AI or cat GPT should
00:02:22
still have enough context but only saves
00:02:24
a small portion of it to basically save
00:02:26
tokens that you need to use inside the
00:02:28
chat completions themselves we're also
00:02:30
going to forward the history of the
00:02:32
conversation so far and it also allows
00:02:34
you to prevent any kind of uh chat B
00:02:37
getting stuck because the openi history
00:02:39
will become too large for example right
00:02:42
so we are going to get a slice of items
00:02:44
as you can see the Json field will be
00:02:45
openi which is a system field that's on
00:02:47
top then we're going to go with the
00:02:48
operation get a slice of items offset is
00:02:50
minus five so only save the last five
00:02:52
newest entries and then we're going to
00:02:54
save the results again back towards that
00:02:55
exact same system field now if we are
00:02:58
going to go towards the next step we
00:03:00
have the create chat completion to
00:03:02
determine the correct intent and if
00:03:04
we're going to take a look inside I have
00:03:06
not much of a system message and this
00:03:08
basically functions as the operating
00:03:10
system for the AI itself so the system
00:03:12
message is you are determined the
00:03:14
correct intent based on the user's reply
00:03:15
only output the Matched function name
00:03:19
then we have messages L text input
00:03:20
because that always saves the last entry
00:03:22
that the user typed and then we have the
00:03:24
functions which are really really
00:03:25
important because now you will see that
00:03:26
we have those intents that we created
00:03:28
under the intent detection but now we're
00:03:30
going to use them inside the chat
00:03:31
completion which is much more accurate
00:03:33
at least from my testing really
00:03:35
important is that we are going to go
00:03:36
with the remember history set to yes
00:03:38
then we have the model gp4 max tokens is
00:03:41
default at 100 which is fine for this
00:03:43
specific jet completion and that is
00:03:45
basically it you could also go with the
00:03:46
temperature down to zero or 0.4 which is
00:03:49
for me The Sweet Spot but I for this
00:03:51
chat completion it's not really needed
00:03:53
so if we're going to take a look perfect
00:03:54
thank you right I'm going to test the
00:03:56
request then it outputs only the
00:03:57
function and as you can see under the
00:03:59
function
00:04:00
small talk right so that is the
00:04:01
triggered and matched intent which is
00:04:03
just small talk basically confirming
00:04:05
something that was prior to the
00:04:06
conversation if I'm going to do
00:04:08
something else so let's say uh can I
00:04:12
schedule a coaching call with you then
00:04:16
it should of course in basically trigger
00:04:18
the intent coaching call so let's say
00:04:20
test
00:04:21
request and now you will see functions.
00:04:23
coaching call so we're going to save
00:04:24
this under the system field and you will
00:04:27
see that at the bottom because I already
00:04:28
saved this right we can just go and save
00:04:31
this specific section and then save it
00:04:33
towards the intent uncore match custom
00:04:35
field so if we're going towards the next
00:04:36
step we have a series of conditions that
00:04:38
check which basically which intent has
00:04:41
been matched so was it intent matched
00:04:43
contains small uncore dark then we are
00:04:46
going towards this specific flow which
00:04:48
is a standalone chat completion to
00:04:50
generate a reply based on the user
00:04:52
answer if not was the intent match
00:04:54
contain support right if so go towards
00:04:57
support was it membership go towards the
00:04:59
membership information was it regarding
00:05:02
coaching then go towards the coaching
00:05:03
call right so this is the way that you
00:05:05
can determine the different kinds of
00:05:07
topics that the user is talking about
00:05:08
without the need to let the user choose
00:05:10
from a specific menu right the
00:05:12
conversation the context of the user's
00:05:14
question or reply input however you want
00:05:16
to call it is the context that cat GPT
00:05:18
will basically determine the correct
00:05:20
intent and send the user towards the
00:05:21
correct flow so that's part one now
00:05:23
inside of these flows we going to take a
00:05:26
look you will see that we have different
00:05:27
kinds of intents right so for the intent
00:05:29
small talk we only have three notes and
00:05:30
if we take a look inside then you will
00:05:32
see that we basically have a starting
00:05:33
note which is mandatory we have the chat
00:05:35
completion and just the chat GPT
00:05:37
response on the membership information
00:05:39
we basically have the exact same as you
00:05:41
can see here right for the intent
00:05:43
support it's basically also the exact
00:05:44
same as you can see here because we're
00:05:46
just fetching the information from the
00:05:47
system message based on the system
00:05:48
message jgpt will generate a reply now
00:05:51
for the coaching call that's a little
00:05:52
bit different because we need to capture
00:05:54
certain elements like the date the time
00:05:56
and also the reason reason for the
00:05:58
coaching call right so if we're going to
00:05:59
take a look we have a few additional
00:06:02
notes and the first one will be to First
00:06:05
basically take a look at the user
00:06:06
context to see what kind of parameters
00:06:08
have already been captured if we have
00:06:10
everything then we're going with a
00:06:11
condition step to check if there is a
00:06:13
certain um basically a certain word in
00:06:16
this case completed inside of the
00:06:17
basically the return of the chat GPT
00:06:19
response and if yes we're going to do a
00:06:22
little bit of formatting and if no we're
00:06:24
just going to ask certain questions of
00:06:25
the user going to Loop this around until
00:06:27
we have captured all the parameters and
00:06:30
then we're going to Output it format it
00:06:32
and then send it towards the user so
00:06:34
inside of this one if we take a look
00:06:37
then I basically have static value you
00:06:39
can also import free dates free times as
00:06:41
custom fields and import them inside the
00:06:42
system message I just have this for
00:06:44
testing purposes to see if everything is
00:06:46
working properly so inside the
00:06:47
guidelines to respond as you can see the
00:06:49
goal is to make sure all parameters are
00:06:51
captioned to schedule a coaching call
00:06:53
the parameters needed are date time and
00:06:54
reason for the coaching call right and
00:06:57
then here we have I only have the
00:06:59
following free dates and times available
00:07:01
so the 24th of October between 10:00
00:07:02
a.m. and 2: p.m. so us can only schedule
00:07:05
between those times if it's outside that
00:07:06
time zone CH GPT will recognize that and
00:07:08
then come back with a fallback message
00:07:10
and I have done so for three different
00:07:12
kinds of days then I'm also going to
00:07:14
provide some guidelines on how to
00:07:15
respond so ask each parameter in a
00:07:17
separate sentence then we also have talk
00:07:19
in first person to make it a little bit
00:07:21
more personal and conversational add
00:07:22
fitting emojis and when all parameters
00:07:24
have been captured output only the
00:07:26
following so I want to have this kind of
00:07:28
Json format even though it's going to be
00:07:30
safe inside of a text field that is
00:07:31
where the JavaScript comes into place
00:07:33
right so we have the name which is the
00:07:35
first name which we will grab from a
00:07:36
system field then we have the date the
00:07:38
time the reason and then I have an
00:07:40
additional parameter which I'm going to
00:07:42
check in the next condition step the
00:07:43
stat is completed then we will have
00:07:45
messages set to L text input again we
00:07:48
have the remember chat history because
00:07:49
that's important if we want to loop
00:07:50
around that we have access towards the
00:07:52
prior history right to determine what
00:07:54
parameters have already been given uh
00:07:56
for this one we're going to set the max
00:07:57
tokens to 250 which should be plenty
00:07:59
plenty enough the temperature because it
00:08:02
needs to listen a little bit more
00:08:03
closely towards the system message I've
00:08:04
set to my sweet spot of 0.4 and the rest
00:08:06
is just set to default then we're going
00:08:09
with a chat GPT response basically just
00:08:11
generating the content right so
00:08:13
capturing the content and then we're
00:08:15
going inside the next condition step to
00:08:17
check if the chat GPT response custom
00:08:19
field contains the word completed
00:08:22
because that means that all parameters
00:08:23
have been captured again if not we're
00:08:25
just going to ask the questions look
00:08:26
back until we reach this yes step inside
00:08:30
we're going with an action as you can
00:08:32
see here we just have some additional
00:08:33
actions here may this is just static
00:08:35
payload if you can see right but this
00:08:37
allows us to grab the coaching call
00:08:39
details and we can actually put this
00:08:42
directly inside of a test value so we
00:08:44
can do that like this and then have this
00:08:47
as the jet GPT response right and we can
00:08:50
call this a parameter name so let's say
00:08:52
uh this parameter will be called um
00:08:55
let's see um appointment
00:08:57
details there we go
00:08:59
now we can grab this and replace the
00:09:01
static value so this static value there
00:09:04
we go with this system field or this
00:09:06
parameter name so if we're going to go
00:09:09
with this value let's first see if we
00:09:11
are able to successfully grab this these
00:09:13
details right let's say test function
00:09:16
and we're now getting all of these
00:09:18
basically all of these outputs right
00:09:20
we're going to save this inside of a
00:09:21
coaching called details and then we're
00:09:23
going to Output them so let's save this
00:09:27
there we go and then we're going to go
00:09:29
with another chat completion and inside
00:09:31
this chat completion we're just going to
00:09:32
format a nice looking appointment
00:09:34
overview so here we have the following
00:09:35
the user just made a coaching call
00:09:37
appointment you need to format this into
00:09:38
a good overview guidelines to respond
00:09:40
details for the coaching calls are
00:09:42
coaching calls and then you will see
00:09:44
that we have this right name date time
00:09:46
and reason so we're going to just give
00:09:48
all of those variables and then we can
00:09:51
even have this outside there we go and
00:09:54
then we are basically good to go so
00:09:57
let's test this entire setup out and
00:09:59
let's see what we get back so I just
00:10:00
deleted my bot user profile so we can
00:10:02
start from scratch let's just test this
00:10:04
out so this is just the main flow being
00:10:06
triggered on the demot don't mind that
00:10:08
but let's say hi uh how are you doing
00:10:12
today so this should trigger the small
00:10:13
talk section so let's take a look it's
00:10:16
first going towards the default reply
00:10:18
and the default reply will determine the
00:10:19
correct intent and here before we are
00:10:21
going to continue we're just going to
00:10:22
first ask for the name to make it a
00:10:23
little bit more conversational this is
00:10:25
also a guideline inside the system
00:10:27
message of the small talk so let's say
00:10:29
Mark so let's say my name is Mark so my
00:10:31
name is Mark so let's do that and let's
00:10:33
see what this gets triggered right so it
00:10:35
should return towards the uh basically
00:10:37
the small talk and as you can see nice
00:10:38
to meet you Mark I'm doing great thank
00:10:39
you for asking how about you how is your
00:10:41
day going could just do a simple
00:10:43
conversation so I am good thanks for
00:10:48
asking
00:10:49
um just excited
00:10:54
to get
00:10:56
started on my new Journey
00:10:59
so this again should trigger the small
00:11:01
talk and basically trigger a response
00:11:03
from jgpt so there we go so that's
00:11:06
fantastic Mark starting a new journey is
00:11:07
always thrilling can you share a bit
00:11:09
more about this new adventure I'm all
00:11:10
ears right so this is just a small talk
00:11:12
feature so what we're going to do now um
00:11:15
let's say um that is
00:11:19
actually what I wanted to talk
00:11:23
about uh during a coaching
00:11:27
session can I schedule one so now cat
00:11:31
GPT should recognize that we want to go
00:11:33
towards the coaching intent section
00:11:35
right so the coaching intent flow so
00:11:36
let's see if that works as
00:11:38
well so let's take a
00:11:42
look so it takes a little bit more
00:11:44
longer to reply and as you can see now
00:11:47
we get absolutely Mark I'm here to help
00:11:48
let's schedule a coaching call for the
00:11:50
first step could you please pick a date
00:11:51
from the available slots and now you can
00:11:52
see that we get the available slots that
00:11:54
we put inside system message directly
00:11:56
returned back to us so we don't have any
00:11:58
buttons to press to confirm a specific
00:12:00
date let's say I want to since we also
00:12:04
get the time slots let's see if we can
00:12:06
also directly give the time right so
00:12:08
let's say uh I would like well let's say
00:12:12
uh let's do 23 October at 2 p.m so this
00:12:16
should trigger a specific fallback
00:12:18
message by C GPT because this is outside
00:12:20
the par parameters that we give it right
00:12:22
so let's take a
00:12:25
look so as you can see I'm sorry for the
00:12:27
confusion Mark but I'm not available on
00:12:29
the 23rd of October could you please
00:12:30
choose date from the following options
00:12:31
so you get a direct conversation back
00:12:34
with the fallback message right so it's
00:12:36
outside the parameters given so we're
00:12:37
now needing to pick something from the
00:12:39
available dates so let's say okay let's
00:12:41
do uh 30
00:12:43
October um and let's say 11: a.m. so
00:12:46
that should be within the time frame but
00:12:47
again it's just asking for a date but
00:12:49
since I'm also giving the time it should
00:12:50
pick up the two parameters given so
00:12:52
let's take a look and see if it only ask
00:12:54
for the reason of the coaching call as
00:12:56
you can see perfect we' got the date and
00:12:58
time set now could you please tell me a
00:13:00
bit more about the reason for our
00:13:01
coaching call this will help me prepare
00:13:02
effectively for our session so let's see
00:13:04
uh
00:13:05
definitely uh I want to build a chatbot
00:13:10
uh for the real
00:13:12
estate nishe uh but I want some help on
00:13:17
how to uh fetch available
00:13:22
listings so let's see if CH GPT can
00:13:24
summarize the reason for the appointment
00:13:26
and give all the available details right
00:13:31
and there we have it great here's the
00:13:32
overview of your coaching call
00:13:33
appointment date 30th of October 11:00
00:13:35
a.m. and purpose is to discuss and help
00:13:37
you with building a chat bot for the r
00:13:39
estate Nish specifically on how to fetch
00:13:41
available listings looking forward to
00:13:42
our session and with that the basically
00:13:45
the completion for the coaching call has
00:13:46
finished right and now we can just type
00:13:49
anything that we'd like to and so let's
00:13:51
say great
00:13:53
thanks uh
00:13:56
looking forward to our
00:14:00
call so this should trigger the specific
00:14:03
small talk feature again so let's see if
00:14:05
that also works right there we go
00:14:07
absolutely Mark I'm equally excited
00:14:08
about our call we will make sure to
00:14:10
delve into all the details about your
00:14:12
building and your real estate chatot so
00:14:14
it basically grabs all the information
00:14:16
that we just made during the coaching
00:14:17
call and basically summarize it inside
00:14:19
the small T feature how cool is this
00:14:21
right no buttons being pressed to select
00:14:22
the date and time it's being fetched
00:14:24
from available information inside the
00:14:25
system message again you can do this
00:14:27
with dynamically fetching the available
00:14:29
dates and the available times right and
00:14:31
then give them as custom Fields inside
00:14:33
the system message but for demo purposes
00:14:35
I think this really proves a point right
00:14:37
um so let's say I need some help uh I'm
00:14:42
getting a five let's say a 403
00:14:46
error this in turn should trigger the
00:14:48
customer support intent so let's see if
00:14:50
we directly get a solution presented to
00:14:52
us right um this is also being set as a
00:14:55
information Point inside the system
00:14:57
message for support and as you can see
00:14:59
oh no I'm sorry to hear that you're that
00:15:00
you're experiencing a 403 error this is
00:15:02
usually happening uh when you're trying
00:15:04
to log in from a completely different
00:15:05
location possibly even another country
00:15:07
if you have VPN enabled that might be
00:15:08
the cost try disabling your VPN
00:15:09
reloading the page this should hopefully
00:15:11
resolve the issue for you if you're
00:15:12
still having trouble please don't
00:15:14
hesitate to reach out we're here to help
00:15:15
so we're switching from small talk to
00:15:17
coaching call back towards support
00:15:19
without touching or pressing any buttons
00:15:20
just a fully conversational uh
00:15:23
experience for the end user with the
00:15:24
business that it's interacting with so
00:15:26
how cool is this guys right so this is
00:15:28
just a demo we're going to turn this
00:15:30
into an actual template and also a
00:15:32
premium course where we're going to show
00:15:33
you how to build this out step by step
00:15:35
so if you're excited do drop a like on
00:15:37
this video so we know there is interest
00:15:39
in building out this premium course for
00:15:40
you guys and we will try to get that
00:15:42
done ASAP for now have a great day take
00:15:44
care have a great weekend and talk soon