# Competencies
# What is a Competency?
A competency can be thought of as a capability, and your AI is comprised of several different competencies. A competency should be an atomic action your AI is able to perform. For example in our case get_balance
and account_transfer
, which will get the account balance for a specified account and transfer money between accounts, respectively.
Like an AI is comprised of competencies, a competency is comprised of Classification Data, Slot Data, States, and Transitions. Right now, we'll only worry about the first two.
# Classification Data
Classification data is data used to help the AI determine what kinds of things a user might say to "activate" the competency. Following along with our example, one way of asking to "activate" the get_balance
competency is to say, "How much money do I have in my account?" As a conversational designer, you will want to make sure the classification data for your competencies have a wide variety of "utterances" (ways of saying something) so that your AI will be able to respond correctly to natural and messy human expressions.
# Slot Data
A slot is akin to a variable whose value we want to extract from the user utterances. Slot data is used to help the AI identify what data should be extracted, where this data usually appears in the sentence, and what shape the words usually take. Following along with our previous examples, let's say we have two slots for our account_transfer
competency: source_account
and destination_account
. Given the sentence, "I want to transfer $50 from my checking to my savings." we can identify that the source_account
is "checking" and the destination_account
is "savings".
# Adding Data
For the purposes of this tutorial, we have provided classification and slot data for you. Download this zip folder and you will import the files later.
Note:** After adding the data, take a minute to look over all the data to get a feel for what kind of data should be included in the data sets.
Navigate to the
get_balance
classification data by hovering over "Create" in the top navigation bar, then clicking on "Competencies". Once the page has loaded, find theget_balance
competency and click onget_balance_start
under the header "Classes".Click on the "Import" button on the toolbar and import the
get_balance_start-classification.json
file you saved. If your data did not import, make sure that your competency name exactly matches the competency name in this tutorial exactly.
Now that you have successfully imported your classification data, it's time to import slot data. In the navigation bar on the left, click on
source_account (0)
under the "Slots" header. Once you're there, click the "Import Data" button and import theget_balance-svp.json
file.Next navigate to the
account_transfer
competency by hovering over "Training" in the top navigation bar and then clicking on "Competencies". Once on the competencies page, click onaccount_transfer_start (0)
under the header Classes for theaccount_transfer
competency. Click on "Import" in the toolbar and import theaccount_transfer_start-classification.json
file.Next, click on
source_account* (0)
in the sidebar, and import the slot data for this competency by clicking on the "Import Data"button and importing theaccount_transfer-svp.json
file.Note: Here the
account_transfer-svp.json
file includes slot data for all three slots:source_account
,destination_account
andamount
. This is because these three slots are labeled in one utterance.
# Additional Resources:
Once you begin building competencies on your own you will need to collect your own data. To help you with is we have built a crowdsourcing feature right into the Clinc AI Platform. Crowdsourcing provides an efficient and effective way to collect sufficient and diverse data in a short time.