Create a Highly Accurate Knowledge Base in Voiceflow using Tags API
Summary
TLDRThis video tutorial guides viewers on creating an accurate knowledge base for AI agents or chatbots using Voiceflow's Tags API. It explains the concept of tagging as a method to efficiently retrieve information, akin to organizing books in a library. The host demonstrates setting up tags in Voiceflow, structuring data for clarity, and using the Tags API to query the knowledge base effectively. The aim is to enhance the AI's ability to provide precise answers by directing it to the right documents based on user queries.
Takeaways
- π The video is a tutorial on creating an accurate knowledge base using Voice Lo tags API, which is essential for AI agents and chatbots.
- π·οΈ Tags are compared to stickers on books in a library, helping AI quickly find relevant information without searching through every document.
- π οΈ The presenter demonstrates setting up tags in Voice Flow using the Voice Flow tags API, emphasizing the value of a well-structured knowledge base.
- π The process involves creating an assistant in Voice Flow, attaching knowledge-based documents, and then tagging these documents for efficient AI referencing.
- π The use of a wellness website called Vikasa as an example to illustrate the organization and structuring of a knowledge base.
- π The importance of clean data input into Voice Flow is stressed, with text files being preferred over PDFs, docs, and URLs to avoid information bloat.
- π The video guides through the steps of uploading documents to Voice Flow, cleaning the data, and attaching them to tags for organized knowledge base management.
- π An API key is used to connect the Voice Flow assistant with the knowledge base, pulling in the necessary documents for tagging.
- π The creation of tags using the Voice Flow tags API is demonstrated, showing how to assign tags to specific documents for targeted AI queries.
- π The video includes testing the API to ensure that questions posed to the AI are answered accurately based on the attached tags and documents.
- π€ Finally, the script outlines integrating this functionality into a Voice Flow chatbot, allowing it to query the knowledge base effectively using the API.
Q & A
What is the main purpose of creating a knowledge base for AI agents or chatbots?
-The main purpose of creating a knowledge base for AI agents or chatbots is to provide them with a structured and organized source of information that they can reference to give accurate and relevant responses to user queries.
What is the analogy used in the script to explain the concept of tags in a knowledge base?
-The analogy used in the script is that of a librarian in a big library. Tags are like special stickers on certain books that help the librarian (or AI) know exactly which books to look for first when someone asks a question, making the search faster and more accurate.
Why is it important to have a well-structured knowledge base for an AI agent?
-A well-structured knowledge base is crucial because it ensures that the AI agent can provide the right or the best possible answers to queries. Without it, the AI might not be able to find the correct information or might provide inaccurate answers.
What are the recommended data sources for uploading documents to a knowledge base in Voice Flow?
-The recommended data sources for uploading documents to a knowledge base in Voice Flow are text files, followed by PDFs, DOCs, and then URLs. Text files are preferred because they are the cleanest and easiest for the AI to read and reference.
How does the script suggest organizing the data for an effective knowledge base?
-The script suggests organizing the data in a clean and precise format, with a preference for plain text files. This helps in reducing information bloat and makes it easier for the AI to read the knowledge base correctly and provide accurate answers.
What is the role of tags in structuring a knowledge base for an AI agent?
-Tags play a crucial role in structuring a knowledge base by directing the AI agent to reference specific documents for particular questions. This ensures that the AI agent provides accurate and relevant information without getting confused or providing wrong information.
How does the script describe the process of attaching tags to documents in Voice Flow?
-The script describes the process of attaching tags to documents in Voice Flow by first creating an assistant and attaching knowledge-based documents. Then, it explains how to use the Voice Flow tags API to create tags and attach them to specific documents, which helps in organizing the knowledge base effectively.
What is the significance of using the Voice Flow tags API in the process of setting up a knowledge base?
-The Voice Flow tags API is significant in the process of setting up a knowledge base as it allows for the creation and management of tags. These tags help in categorizing and linking specific documents to particular topics or queries, ensuring that the AI agent can retrieve the correct information efficiently.
How does the script guide the viewer in testing the knowledge base setup using the Voice Flow API?
-The script guides the viewer in testing the knowledge base setup by demonstrating how to use the query API in Voice Flow. It shows how to input a question and the relevant tag, and then how to interpret the output to ensure that the AI agent is retrieving the correct information from the knowledge base.
What is the final step described in the script for integrating the knowledge base with a Voice Flow chatbot?
-The final step described in the script is to configure the API in Voice Flow to connect the chatbot with the knowledge base. This involves setting up the API step with the correct URL, headers, and parameters, and then testing the system to ensure that it can provide accurate responses based on user queries and the associated tags.
Outlines
π Introduction to Creating a Knowledge Base with Voiceflow
The video introduces the process of creating a highly accurate knowledge base using Voiceflow's tags API. It emphasizes the importance of tags in structuring a knowledge base, comparing it to a library where tags act as stickers on books, directing the AI to the right information quickly. The necessity of a well-structured knowledge base for effective AI agents or chatbots is highlighted, and the video promises a step-by-step guide on setting up tags in Voiceflow.
π Setting Up the Knowledge Base with Voiceflow
The speaker details the initial steps for setting up a knowledge base in Voiceflow, starting with creating an assistant and attaching knowledge-based documents. The use of a wellness website called 'vikasa' is demonstrated as an example of an organized knowledge base. The process involves copying URLs from the website, importing them into Voiceflow, and emphasizing the importance of clean data for effective AI operation.
π The Importance of Clean Data for AI Accuracy
This section discusses the challenges of using URLs as data sources due to potential information bloat, which can confuse AI agents. The speaker recommends using text files for sensitive data to maintain the quality of answers. The process of reformatting web data into clean documents is shown, and the newly formatted documents are re-uploaded to Voiceflow for a more accurate knowledge base.
π·οΈ Utilizing Tags to Organize the Knowledge Base
The explanation of tags continues, with the creation of tags using Voiceflow's tags API. The process involves listing documents, obtaining an API key, and using it to connect the API with the knowledge base. The speaker demonstrates how to create tags for different documents and emphasizes the importance of associating tags with the correct documents to guide the AI agent in providing accurate information.
π Attaching Tags to Documents for Specific Queries
The video script outlines the process of attaching tags to specific documents within the knowledge base. This step is crucial for directing the AI agent to the appropriate document when a query is made. The speaker shows how to use the 'attach KB tags to the document' feature in the tags API, ensuring that each document is associated with the correct tag for precise information retrieval.
π€ Testing the Knowledge Base with Query API
The speaker describes how to test the knowledge base using the query API to ensure that the tags are correctly associated with the documents and that the AI can retrieve accurate information. The process involves sending a query with specified tags to the API and receiving the correct response based on the tagged documents. The testing interface is used to ask questions and receive answers directly from the knowledge base.
π Implementing the Knowledge Base in Voiceflow Chatbot
The final steps involve implementing the knowledge base functionality into a Voiceflow chatbot. The speaker discusses creating buttons for different programs within the chatbot and using variables to store user selections. The process of capturing user input and sending it to the knowledge base for a response is detailed, including setting up API calls within Voiceflow to interact with the knowledge base.
π Configuring API for Voiceflow Chatbot Integration
This section covers the technical configuration of the API within Voiceflow for the chatbot. The speaker explains how to set up the API step, including the method type, URL, headers with API key, and parameters for the request body. The importance of correct formatting, especially with JSON and double quotes, is highlighted to ensure the API functions correctly with Voiceflow.
π Demonstrating the Effectiveness of Tagging in Knowledge Retrieval
The speaker concludes by demonstrating the effectiveness of tagging in retrieving accurate information from the knowledge base. The video shows how the chatbot can provide specific pricing information for different yoga programs based on the tags associated with the user's query. The demonstration reinforces the importance of a well-organized knowledge base with proper tagging for AI accuracy.
π¬ Conclusion and Additional Resources
The video concludes with a summary of the process and an invitation for viewers to engage with the content. The speaker offers help through their AI agency for those needing assistance with AI projects and encourages viewers to explore additional resources, such as other instructional videos on creating chatbots or lead generation systems.
Mindmap
Keywords
π‘Knowledge Base
π‘Voice Lo tags API
π‘AI Agents
π‘Chatbots
π‘Tags
π‘Voice Flow
π‘Data Structure
π‘API Key
π‘Workflow
π‘Variable
π‘Capture Step
π‘Query API
Highlights
Introduction to creating a highly accurate knowledge base using voice Lo tags API, essential for AI agents or chatbots.
Explanation of tags as a method to enhance the accuracy of information retrieval from a knowledge base.
Analogy of tags to stickers on books in a library to prioritize search by an AI, making it faster and more accurate.
Importance of a well-structured knowledge base for providing the right answers in AI systems.
Demonstration of setting up tags in Voice Flow using the Voice Flow tags API.
Use of a wellness website 'vikasa' as an example to illustrate the knowledge base structuring process.
Instructions on creating an assistant in Voice Flow to attach knowledge-based documents for tagging.
Importance of data cleanliness and structure for effective knowledge base operation.
Comparison of different data sources for knowledge base input, emphasizing plain text as the most effective.
Process of uploading and organizing data into Voice Flow for a cleaner knowledge base.
Explanation of attaching documents to tags to ensure the AI references the correct information.
Step-by-step guide on creating tags using the tags API in Voice Flow.
Testing the created tags and their functionality in querying the knowledge base.
Integration of the knowledge base with Voice Flow's chatbot for practical application.
Use of variables in Voice Flow to store user selections and questions for the knowledge base query.
Configuration of the API in Voice Flow to connect with the knowledge base and retrieve answers.
Final testing of the Voice Flow chatbot with the knowledge base to ensure accurate response retrieval.
Conclusion summarizing the process of creating a highly accurate knowledge base in Voice Flow using tags.
Transcripts
hello and welcome in this video I'll
show you how to create a highly accurate
knowledge base using voice Lo tags API
there's a must watch video if you are
creating AI agents or AI chat Bots using
voice law you must probably be wondering
what are tags and how they help you get
accurate information from the knowledge
base let me explain with an example
let's imagine your knowledge base is
like a big Library filled books okay so
when someone asks a question it's like
searching through all the books to find
the answer using tags is like putting
special stickers on those certain books
these stickers help the librarian that
is your AI know exactly which books to
look for at first when someone asks a
question this way the librarian or the
AI doesn't have to search through every
single book but can go straight to the
ones with the special stickers making
the search much more faster and more
accurate so if you asked a question
about yoga the librarian would only look
at books with the yoga sticker on them
this makes finding the right answer much
quicker and easier a knowledge base is
the heart and soul of any AI agent or
chatbot and without a well structured
knowledge base you won't get the right
or the best possible answer for your
query okay now let's see how to set up
tags in voice flow so for this video we
will use voice flow and the voice flow
tags API and I'll leave the links to
both in the description so let's get
started all right this video is going to
be a bit long because we have a lot lot
to cover but I promise you it will be
very valuable and worth your time so
close all your tabs grab a cup of coffee
or your favorite drink and let's get
started don't forget to add this video
to your favorites so you can easily come
back to it later for reference as always
all the links prompts and responses will
be available for free on the source Hub
and I'll leave a link to that in the
description below okay perfect so the
first thing we need to do is we need to
create an assistant in voice flow okay
and the reason we need to create an
assistant is so that we can attach the
voice uh the knowledge based documents
and those knowledge based document is
what we will be tagging it'll all become
very clear once I start doing it okay so
the thing is that so for the knowledge
base what we'll do is we'll actually uh
you you can use any site uh for the
purpose of this video I'm going to use a
website called vikasa they're very
beautifully organized it's a wellness
website uh okay so let's go
there all
right so as you can see out here they
have uh they have multiple programs but
for this video what we'll do is we
uh use like if you go to the foundation
yoga training it has the dates it has uh
you
know all the information about uh this
particular program as well as the
pricing so if you go
down and you can see the pricing as well
okay so it is very very clearly
organized and same thing if you go back
and you say Okay 300 are Advanced and
then it is organized again the same way
you have the dates as well as the
details and the pricing so this is a
perfect example if it is actually the
knowledge base is like this okay so for
the purpose of this video what I'm going
to do is I am going to take the four 1 2
3 and four these four pages okay and uh
so let's copy the URLs and then I'll
show you how to actually add them to
voice flow so this is the first so I
have all the four URLs now let's go back
to voice flow we'll create an assistant
and we will attach this in the knowledge
base all right so
let's go to the assistant and send new
assistant because uh uh knowledge based
test all right modality is going to be
CH since we are using that and then go
to English and let's say
continue okay perfect so now we in the
workspace
okay once you go back you can actually
see within this assistant this is arasa
KB test which we just created you have
something called workflow and knowledge
base so the workflow is where we design
the AI agent and the knowledge base is
where we upload the documents which we
want the AI agent to reference to okay
so to add documents you have multiple
sources here so I'm going to use the URL
since we just copied the URL
and copy this paste it let's say it
doesn't matter let's say monthly to
refresh rate
okay and let's
import so it's importing right now all
right so I want to mention that your
data source needs to be as clean as
possible and structuring your data
correctly is very very important for an
effective knowledge base so when you
input data into voice flow the best type
is text files followed by PDFs and docs
and then only URLs this is important
because when a bot scrapes a web page it
often picks up unnecessary spaces
characters and irrelevant links because
of this this information bloat it can
get harder for an AI to read the
knowledge base correctly and provide
accurate answers make sure you have a
well structured text file for sensitive
data such as uh pricing or dates Etc
this will greatly improve the quality of
your ansers so now you have green marks
next to all the URLs that basically
means that it is a voice flow has
actually uploaded those documents okay
so now if you click on the white portion
next to the URL you will see how voice
flow is storing this data
okay and it's in chunks and as you can
see it is a lot of garbage basically
because you have all of these
TTS uh you know it's not not good at all
actually so uh um yeah the the most
important part is that especially when
you creating an AI agent the AI agent is
as good as the data it gets okay so if
you give garbage it is going to spit out
garbage so we need to make sure that the
data is actually valid and it's in a
very clean format so as I explained
earlier in the video when you're are
uploading data to knowledge base it
needs to be very clean and very precise
okay and the way the voice FL is the
best data is the plain text if you can
actually just get text and put it out
there uh it is very easy for the AI
agent to actually reference the data
okay so then of course is the PDF files
or the doc files and then comes URLs
because the problem with URL is there is
a lot of bloating okay so there's
information bloating because as you can
see uh you know it is chunked out so
first of all there's a lot of probably
this is because of the spaces or and
this has got a lot of URLs as well
because a page also has URLs and other
links as well so probably it is not the
best way to do it okay okay so what I'm
going to do is I will actually create um
you know for these four documents for
these four URLs I'll create a clean
document so if you go to Foundation yoga
what I'm going to do is actually I'm
going to uh you know right click and uh
copy it and put it in a text so that we
can actually use this so the same thing
out here as well just right click and
copy and put it into a text file so it
can be used all right all right so I
have created these four documents now uh
you know if you see this is now the
documents look much cleaner these are
doc files so I copied all of the
information from the website and then
sort of organized it in a way that uh
the AI can easily read it and reference
it okay so I did it for these four and
it's advisable that if you're doing it
for your clients or or for yourself uh
as well for your business it is always
advisable that you actually U you know
take the data and put in a very clean
format so that yeahi can actually read
it and then give right answers rather
than total garbage okay all right so
what I'm going to do is now I'm going to
actually uh delete these
for okay so now what I'll do is I'm
going to reupload uh it in plain text so
that is as I said that was preferable so
let's go back to the documents and I'm
going to open this that's opening in the
text file just copy this and then put it
out
there so this is the document just say
import all right great so now I've
uploaded all the four documents as you
can see uh you know and uh if you click
on these
documents look at the way it is stored
now you know as compared to earlier
because it is so clean and it's very
well formatted so it's much easier for
the AI agent to actually reference the
document and get the right information
okay so the next thing is that we need
to attach these documents to tags now
what you need to understand is what what
are tags and why are they important okay
so a tag is something like it tells the
AI that okay you need to reference only
this particular document for this
particular question so this is what
happens so now when someone asks a
question about uh to the AI agent about
the foundation yoga it will reference
only this particular document this is
the foundation yoga teacher which has
got all the information so it doesn't
get confused and it does not get uh
wrong information you know so it is not
giving if somebody asked pricing for the
yoga uh Foundation yoga teacher training
program it is not giving you pricing for
the advanced okay because they are
structured in a certain way basically so
if you see this is the dates for the
foundation and if you go out
here this is a nicely organized site
that's the reason I'm taking this as
example so if you go to Advanced the
same thing out here it has got the dates
so if somebody is asking for dates for
the foundation yoga program you don't
want the AI to give dates for the
advanced okay so that's where tagging
helps so tagging tells the a agent that
only look at this particular document to
answer this question which is for the
foundation yoga program okay so let's go
ahead and create some tags all right so
the step one in creating tag is so we'll
go to to create tags basically we will
be using uh the tags API which is from
voice FL
okay so I'm going to leave this
particular Link in the description uh so
you can easily uh go to this so the
first thing we need to do is we need to
create a document we'll need to go and
check out a document list all right so
don't worry about this I'm going to
actually uh guide you through this whole
process step by step there is no coding
involved it is a no code solution but of
course I mean you know so don't get uh
bothered by the code which you see out
here uh this is just for reference all
right okay so the first thing we need to
do is we will actually go here and uh
you'll come to the document list now
what is this document list is that it
gets uh you know it goes back to the
knowledge base to the AI agent and says
hey these are the four documents which
we have all right and these are the four
documents which need to be Tagged so
once I go back to uh vicasa uh sorry my
test and uh then we will go to
Integrations and you have an API key
here which we need right now this is the
primary key this is the API keys and you
will just copy this key okay so it's
copied let's go back to our system all
right so I'm going to use the key out
here and what is this going to do is it
is going to connect this particular API
with this knowledge base right here uh
which is our knowledge base these four
documents okay and it will pull these
four documents so it knows that this is
the a agent and I'm going to pull this
information all right so when I say the
document I've connected the AP key and
I'm going to say try it and there you go
so as you can see it is right here all
it's pulled up all the information so
total is four documents data and then so
this is not the code basically okay so
this is the as you can see this is total
of four documents and this is the
document ID you can see the name 200 uh
let me just actually copy this and put
it into a
so it's easier to see all right again
don't go get bogged down by the code
this is just information nothing else
I'm just going to expand
that so you guys can easily see it show
FS all
right okay so now if you can see this is
total of four and there's a data and
then the data says this is 200h hour
foundation yoga training program so this
is the document this is the document ID
which we'll be using and
uh if you see there are no tags out here
okay so this is look at this tags column
this is empty which basically means that
there is no tag uh which is attached to
this document and that will that's
exactly what we'll be creating so that
we can reference the tags when we're
actually talking with the AI agent all
right so okay so the same thing out here
this is tags is empty tag is empty so
this is a different document ID and this
is for 300 Advanced and so on so forth
all right so now we have got the
document list out so the next step is
that so now we've got the document list
now let's create the tags okay so for
that we will close this API and let's go
to the tags API which is right here just
below that and open this so in order to
create tags what we'll do is we will
actually go to the create tag which is
right here create KB tag okay which is
knowledge based tag all right and so it
has zero tags right now if you can see
right and the best part is it
automatically copies the uh the key so
you don't you don't have to reenter it
again and again it has already there
okay so now if you go here and you say
try it it has got a 400 which means
error which which basically means that
there are no tags right now okay so
let's create some tags so in order to
create tags what I'm going to do is I
will actually go down and uh come to
data object okay this is the body
patterns which is the parameters so you
just create it out here and you can say
something like foundation so I'm going
to say U you know so what is the name uh
this is advanced yoga teacher training
let's start with the the first one
Foundation yoga teacher training so ytt
okay so I'm going to create and say
ytt Foundation this is the tag which I'm
using right now okay so I'm going to
this is a string and uh that's it so all
I have to do is now say try
it and it's a 200 perfect so it's
already created the tag so you can see
that this is the tag right now again the
tag is not L to the document we're just
creating the tags okay so there's a tag
ID and there's a tag uh name and we will
later uh join this tag ID with a
document ID so that U you know it knows
exactly what to reference so similarly
we'll do it for all four so I'm just
going to call this ytt foundation so
Advanced all
right so then say try it
again 200 and it's created this one as
well so the next one should be YTD
Yin
okay okay so this is also created and
then finally what was the last fourth
one refresh
okay so let's call this
refresh so tag is something which is
easier to remember so just use those
names and then again let's create
this perfect so it's also created okay
so now all the Four Tags have been
created now if you go back to the tags
API and I want to see the list all right
say C KB tag list let's go here and see
what all tags have been created so if I
go here and say try it now it should
show all the Four
Tags and there you go so all the Four
Tags you we just create this is all is
right here okay okay so now we already
have the tags created everything is
right here okay so let's copy this and
put it into a text document as well all
right
okay all right so now we have all the
tag IDs we have already created that
okay and then from the previous uh text
file if you remember we had the document
ID as well so let me just get that grab
that right here okay so if you remember
we have uh you know all of this uh we
have already created the data
and the tag was empty okay the tag was
empty and this is the data uh the
document ID so in the next step what
we'll do is we will attach this
particular one uh the document to their
respective tags so for this is uh 200 uh
Foundation yoga teacher program so for
this what we'll do is we will actually
attach it with the foundation tag okay
and then the next time we run this you
should see this tag filled about here
okay so let's do that
so after this what we need to do is we
need to attach so there is in the tags
API you have something called attach KB
tags to the document okay so let's go
here and we are here right now okay so
there's nothing right now here all right
uh in this what it says is that it needs
a document ID okay so let's get the
document ID so we will copy the first
one which is this copy this put it here
okay and the data object which is body
PM let's open that add
string okay so once we come here uh you
can see an array what it requires is
existing KB tag label so you need the
label okay uh which is this so we'll say
YT
foundation and then we attach it right
here okay and that's it so now if you
can see it is different uh let me just
say try it
and we have a status of okay which is
that it was a success okay let me do it
for all four of them and then we'll see
exactly uh whether it's attached or not
and how it looks okay okay perfect so uh
I've finished for YT refresh that was
the last one so I've done it for all
four of them okay so after this what
we'll do is we let's go back to the
document API all right and in the
document list so if you now see this is
the first document Okay so then when we
actually generated this particular one
there's nothing in tags this is the
document ID but the tag is empty all
right and now we have attached the tag
to the document so now let's run this
again and actually what I'm going to do
is I'm going to create another document
so you can see all right and let's see
this one and uh let's go to the document
list which is this
one you already have the API and let's
say try
it okay perfect okay so let's copy this
and then put it
here perfect so if you see the
difference between both the documents
okay this is the first one this is the
second one in this there is no tags and
in this you can see the tag ID now right
it's right here ytt Foundation is the
first one and if you go down this is ytt
Advanced and Yin and refresh okay
perfect so now it has attached the
document to the particular tag okay so
now our API business is finished out
here and this is uh so it's all
connected now okay great so now uh we
have the document list we've already
done the tag attachment everything is
ready okay so the final thing is that we
out here we need to test this as well
okay so let's go to the query API now
the query API is used to actually query
the knowledge base okay and that's what
we'll do out here okay so in the query
database if you see we have a sample
request and we need to use that that in
wherever you call the API but let's for
now let's test this out here okay so we
have a testing interface let's go down
and you can ask a question here and put
everything out here okay so let me just
check real quick okay so we already have
our API which basically means that it's
all knowledge bases all
connected okay so what we can do is
Let's test this and uh for the question
I'm going to ask uh what is the program
pricing okay what is the program pricing
chunk limit is equal to two so
essentially what is the program pricing
we have four documents there and uh this
is a very generic question so program
pricing can mean whether you are talking
about the Foundation program pricing or
the advanced program pricing what are
you talking about and that is where the
tag is going to help the tag which we
just created when we say okay the tag is
ytt foundation so it will get the
pricing for the YTD Foundation which is
this okay and uh otherwise if in case we
say what is the program pricing for YT
Advanced it should actually go to let me
just see that real quick okay so it
should go to Advanced and then get the
pricing for this which
is right
here let me just see that wow okay which
is right here okay so the one is 3600
and the other one is 4500 okay so let's
test this so I'm going to say what is
the program pricing I'm not saying uh
anything else and then since says yes
true basically means that okay you want
the AI to generate the
answer settings F tags in tags yes this
is include tag add string and then this
is where we Define the tag and sorry
input the tag which is ytt
foundation so now when we try when we
actually execute this um query what the
system should do is it should go to this
particular document uh which is tagged
with this tag and then get the price ing
for this which is supposed to be 3600
okay I think we don't need to include
anything else and let's say try
it and perfect we got 200 which is okay
let's see the output so the output is
the tution for a 200 hour
foundation yoga training is teacher
training is is 3500 perfect this is
great okay so it's working fine and
let's test this again now with the other
tag so I'm not going to change the
question I'm just going to change the
tag now and I'll say
ytt Advanced okay and let's test this
and now this should become what is the
pricing okay so Advanced is 4500 okay so
now this should become 4500 okay and
let's see
this oh perfect see so now it is giving
the response as 4500 so because the tag
is different it is YTD Advanced perfect
so I this is this is working great now
okay so now what we next thing is the
next step is to actually Implement all
of this functionality into voice flows
chatbot and use the API to get uh to
kind of query the knowledge base and get
the same results okay but this is
working fine this is the we are testing
the API and the API works right now so
it is actually getting all the values
from the knowledge base all right so
let's head over to voice flow just a
quick note I hope you're finding this
video helpful and if you are please give
it a thumbs up and drop a comment below
making these videos takes a lot of time
and effort so your support really helps
this Channel and encourages me to keep
going and making more content like this
for you also I love Automation and on
this channel my goal is to create many
more videos where I show you step by
step how to use AI to automate repeative
task to boost your business productivity
so if you're interested in this kind of
content hit the Subscribe button below
so you never miss out when I post a new
video if you'd like to work with us you
can schedule a free 30- minute Discovery
call with me and for that also I'll
leave the link in the description and
lastly we've recently launched our free
AI automation community and it's a
dedicated place to meet and network with
like-minded AI enthusiasts ask questions
and learn from each other share wins
request videos and access my free
YouTube resource and more and that is
just the beginning so if you are eager
to explore the Limitless possibilities
of AI automation this is your golden
ticket I'll drop a link to in the
description in case you're interested in
joining the AI community okay let's get
back to our video okay so now we are
back in the assistant uh this is the
knowledge base so let's go to the
workflow this is where we will Design
our AI agent okay and then you can start
addit workflow and we are here I don't
know how this got there so it's a blank
canvas right now so let's start putting
some stuff out here uh the first thing
I'm going to do is I will actually put
in a text just say connect this
thing welcome to Vasa
how can I help you
today okay so let's put this and this is
there after that what we can do is we
can actually add some
buttons so the buttons are for the 10 so
we can actually say hey uh this is for
YTD
foundation so and then add a button we
can put
in
ytt add r
and so on so forth so we'll create those
four buttons so we have these four
buttons right here and then they connect
to something like so the moment the uh
the user comes in he says welcome to
vikasa how can I help you today and then
of course he sees these four options now
when we are quitting the knowledge base
okay it can be only one uh at a time so
one document at a time in the sense that
when you're asking questions you will
know want to know about the ydt
foundation or the ydt advanced or Yin or
refresh whatever the case is okay so we
will use and so we will send this
information to the API which we just
created the knowledge base so that it
Returns the uh the correct answer all
right but so we have four different
options here depending on what the user
chooses okay and then we need to store
that so that we can send that to the
knowledge base so for that basically we
will create a variable a variable is
nothing but it's just a holding Place uh
which tells once the user selects this
uh White Foundation that is what it
holds and then it is passed on to the
knowledge base saying that hey the user
wants the information for ytt foundation
uh using this question or okay or about
this question
sorry okay so uh what I'll do is I will
just quickly create a variable uh let's
see when you actually connect this it is
in the actions we'll go to something
called set variable and we won't have it
out here so let's create one when you
click on this this thing there's an
option to create a
variable and I'm going to call it
something like U test here and I'm going
to say program you can name it anything
you want it doesn't matter okay you can
call it strr program you can just call
it program you can call it underscore
program whatever you prefer okay and the
description of this is that it uh tells
us what exactly
is uh What uh
program tells us what
program has the user selected okay it'll
all start making sense just give me some
time okay and say just create variable
so now it's created the variable okay so
what we'll do is enter value applies to
this thing so once this is so let's say
for example when I run this bot so
welcome to vikasa how can I help you
today and then you have YTD Foundation
Advanced YTD Yen and refresh okay so
when he selects this we want this
program this s Str program which is the
variable we just created to have the
value ytt Foundation when he selects
this that particular uh variable will
have the uh the value Yen and so on so
forth okay and so that is the reason we
have this and so once you go here it'll
go here and it'll of course there's
nothing connected so it'll finish off
but this is how it is done so again
it'll all start making sense in some
time okay so all four of them are done
now so basically when he selects this
thing this is going to get U active uh
this the value of the St program the
variable which we have is going to be
this okay and I'm going to show you how
it'll all tie up so now the next step is
that uh we will ask the question okay so
let's ask the question to the user for
that we will use a
text so we can say something
like what is your question and this is I
mean of course you know don't we can
always change the text but this is just
to for example so what is your question
for uh
program and then we will open the
bracket and you can see SDR program
right here and we will use this
okay all right so basically what's going
to happen is it's going to say what is
your question for the program ydd
Foundation or ydd Advanced or whatever
the user selects based on that it will
actually uh assign that okay and let's
connect this to all one
two three and four okay
so this is done after this then what uh
is your question for the program and
then you need to use a capture step so
where is the capture this is basically a
capture step which will actually capture
the user's input because you're asking
them a question right so then now they
need to input and uh this goes into last
utterance which is whatever the user
inputed so now what we have is we have a
capture step and in this the user is
going to whatever the user enters uh
this this is going to be captured in the
last atance I like using variables so
similar to what we did out here like you
know we used the SDR program uh to
capture what user was inputting as a
program Choice what we'll do is we'll
create two more variables so let's go
and create two more variables one is
question asked so uh we call the
variable question asked which means that
whatever the user inputs in the capture
step it is in last utterance but uh I
prefer using uh questions asked
basically as an creating own variable
okay so we'll do that and the next is
answer okay and what basically means
that when we connect it to the step and
the API returns an output that will be
captured in the variable again it's
going to make sense once I do it so let
me just create those variables right now
just going to go back where you have
variables right now you can see all the
variables are right here and I can
create a new variable okay so I'm going
to create something called question
a
okay let's create this you can put a
description or you can let it be it
doesn't matter and uh then is the next
one is
answer oh
sorry okay now let's done let's create
this as
well okay so we have two more variables
two new variables and uh you can always
add a description if you want uh so I'm
going to add that later on okay now
let's go back to our
agent okay so we are right here okay so
once the user enters captur in the
capture step what I'll do is I will
after this action I'll say set variable
and applies to we just created question
asked okay and then the value of this
should be last utterance so this is what
last utterance a system variable so this
is what it actually captures from the
user when he enters that and I'll show
it to you okay and it those goes into
this thing uh into questions asked so
let me just show you exactly what I
captured uh let's put a text step
here and I'm going to say just to be
more clearer let's say stdr
program is equal to and then I'm going
to put an stf
program value and this is just going to
Output it so that you know exactly what
the variables values are and what is
coming in and the next is what we just
created question asked question
is asked okay and which is equal to and
then question asked all right so the
purpose of this particular block is that
it will just input what the user has
selected okay so let's run this and I'm
going to show this to you so that it
makes sense why we creating or using
variables okay welcome to vikasa how can
I help you so let me this time I'm going
to use YTD
Advanced
okay so what is your question for
program YTD Advanced and I can say what
are the start
dates for the program okay or something
like
that
and if you if you see out here the value
St Str program is equal to Y Advanced
and the question asked the the Val the
variable value is what are the start
dates for the program I'm sorry for the
mistake out here uh the start mistake
okay
uh so this is exactly what it is sending
to the API okay these are the two values
basically so it'll send this question
and it the S Str program is uh YTD
Advanced so now what is going to happen
is that the API is going to look at this
document the advanced document and it is
going to see how can I answer this
question what are the start dates for
this program and then it is going to get
a response back okay and that response
we will capture in the variable which is
created which is called the answer okay
and I'm going to show that to you but
first what we'll do is we will actually
U configure the API and uh that we'll do
right now all right so for configuring
that API what we'll do is we will go to
the API step let's put it out here we
connect this so that it goes inside here
and okay so this is where we will need
to actually get a lot of information I'm
going to use information from here uh
from this particular thing okay so the
first thing is it's asking where whether
it's a get or a post response so a PO
get is generally to get information out
a post is that you are actually giving
some input to the API all right so right
here we are sending in uh we are sending
in the two uh two variables right here
question asked and SDF program so we'll
use a post which basically means that we
are sending these two variables and
based on this please give us the answer
okay and uh after this is your header
and uh so we need a URL so for this we
will go here and copy this
URL
okay the next is the header so header is
where you need to put in your API key
okay because it needs to be
authenticated it needs to know that okay
it this is coming from this particular
agent which has got this API key so API
key is sort of an identification all
right so we will use this this is the
API key which we were using and so we
will copy this and of course it has to
have a key value pair
so we will use authorization here
okay I'm just going to type it in small
cases
authorization
okay so this is done okay and uh so now
it is basically when it sends the
request it will send the API key along
with this so that the system knows that
oh it's coming from this particular AI
agent and this is what I need to know
what I need to do
sorry the params so params is the
parameters the parameters are these two
values okay so now here we'll go into
query
API okay so basically this is so when
you query uh the query API is that
you've already created the documents
you've created the tags now whatever
query comes from the user I'm going to
use that and I will actually generate a
response in the AI and then send it back
to you okay so that is what exactly this
quy API does okay and it needs a format
in the body should be in this format
okay so this is of course a sample
request so we will modify this according
to us and so let's go back and we'll
paste it out here uh from our system
what we actually had generated initially
so I think now everything is all set uh
you know it's everything connected let's
take a quick check on everything so the
API the URL should be a post Tye because
we are sending in the variables uh we
are sending in those two variables you
know the question asked as well as uh
what is this St strr program and then we
getting a output back so the the API
type should be post and then after that
you are doing the URL so the URL should
be from here and you'll pick this up in
the query this is the URL okay and uh
yeah and then the authorization in the
headers make sure that you need you need
to put in the API key and the second
header make sure that you put in
content-type is application uh / Json
this is important uh because without
this I've seen that the system uh you
know it has unexpected Behavior so it's
always better to put this okay then we
have the parameters which are the
variables and then of course um this is
our ra Json and we are ready to test one
important thing I wanted to cover I just
wanted to let you guys know is I just
copy this and I'm going to show it to
you if you see the code and this is
important because the thing is that and
I spent a lot of time on this actually
because I was not able to figure this
out the quotation marks is double quote
should be like this because when you are
actually writing it and typing it and
you do a quote from the keyboard it
comes like this you see the difference
let me just actually yeah see this is
the double quotes from the keyboard and
this is the quote it is expecting and it
just uh you know behaves weirdly and the
answer output is not exact and so I was
testing it and I was not able to figure
out exactly what's going on wrong and
then when I actually uh copied this that
is when I came to know okay so just copy
this and put it out here and should be
all good to go okay it's the same thing
out here so this is fine okay
and now let's test it so uh we'll do a
first uh regular test through this thing
uh let's test it from here itself and
then we'll run the whole program so the
question asked is what is the program
pricing and right now I'm using a tag
YTD Foundation okay so if you notice
what is the program pricing now what is
a program pricing is a generic question
because if you go to vikasa it can be so
what is the program pricing can be for
the advanced yoga or it can be for
uh Foundation yoga or it can be for Yin
or refresh anything all four any any of
the four of them okay so it is a generic
thing and based on the tag the system
will respond you know when I say YTD
Foundation now the system knows that
okay we need to say Pro program pricing
for we need to see the program pricing
for YTD Foundation now if I do the tag
as YTD Advanced it should give the price
for uh the advanced uh right here the
300H hour Advanced uh pricing okay so
now let's test this for ydd foundation
right here and let's say
generate and now it's going to the API
and it's going it's got the result back
we have a 200 okay and now if we go to
the output let's see the output the
output of the tution is okay it's right
here okay
3,500 and I'm going to test it again
with Advanced I'm not going to change
the question and that's where the
tagging actually helps let's say send
request again but in this case I'm going
to make this as YT advanced
all right and let's see generate now it
should give you the pricing for YTD
Advance which is
4,500 yeah so this is Advanced which is
4,500 and that should be your answer so
if you go down and we see the output the
output is the pricing for 300 Advance
perfect is
4,500 okay so that is the beauty of
tagging so when you actually tell the
system that okay just use this
particular document or this particular
page to answer the question
uh it actually just uses that page
information okay uh so all right so now
this is we have done this raw let's use
the system to actually generate the
response so what we'll do is let's run
this from here and run
test okay so welcome to Vasa how can I
help you today and I'm going to say ytt
Foundation what is the question for
pricing so I'll say pricing that's it
nothing else and let's see what it comes
up
with excellent so the tuition for 200 R
Foundation yog Got Run is 3,500 okay so
again let's run this one more
[Music]
time and now I'm going to say
Advanced what is the question again I'll
say pricing that's it
the pricing for 300H hour advanced yoga
is 4,500 perfect okay so as you saw this
is working perfectly now and we got the
tags working and this is how you
actually connect I use the tags uh with
the documents uh so that you can
actually uh you know your knowledge base
is highly accurate and uh yeah so
hopefully you found this video helpful
and that's it now we have created a
highly accurate knowledge base in voice
flow using TX API I I hope you like this
video and found it helpful also we are a
full service AI agency so if you need
help with building an AI agent or some
other AI project for your business do
check out my AI automation agency flip
bites you can also schedule a free 30-
minute Discovery call with me I'll drop
all the links in the description finally
here's another awesome step-by-step
video on how to create a lead generation
air chatbot from scratch or you can
watch another video that I'm sure you'll
find very use useful I can't wait to see
you in future videos thanks for watching
and I'll see you next time
Browse More Related Video
Mixing FAQ sets and knowledge base documents in your Voiceflow agent to generate better responses.
Logseq Chaos? Mache nicht den selben Fehler...
009b What is a PAC? Using the GSV instruction, Get System Variable in the conveyor logic.
Bulk WhatsApp Broadcasting from Excel (Without getting blocked) - Promotional Messages -WA Marketing
Chat With Documents Using ChainLit, LangChain, Ollama & Mistral π§
How to Build Custom AI Chatbots π₯(No Code)
5.0 / 5 (0 votes)