You can watch here our chapter on Orchestration Bots - enjoy!
Find in this tutorial the description and resources used during this Orchestration Bot demonstration
Hi,
Is the orchestration child bot must connect with Luis machine learning classifier? Or can we only use Teneo studio classifier?
Best regards
Hi @sc_chatbot ,
you would need to store the top intent of the Teneo Classifier and the confidence score inside a global variable similar to what we do with LUIS in the demo, and then you should be fine.
Here’s some code to get started, to be run in the Global Scripts under Pre-Matching:
import java.util.regex.*
try {
def annotations=_.getInputAnnotations();
def annotation_names=_.getInputAnnotations().getNames();
def annotation_all=_.getInputAnnotations().getAll();
for (item in annotation_names){
if (item.contains("TOP_INTENT")){
gsTop_Intent=item;
}
}
for (entry in annotations){
def matcher = entry.toString() =~ /^.*?TOP_INTENT.*?confidence=(?<conf>.*?)}.*/;
matcher.matches()
gsTop_Confidence=matcher.group("conf")
}
}
catch (Exception e){
println "Exception: "+e;
gsTop_Intent="NO_INTENT.TOP_INTENT"
gsTop_Confidence="0.0"
}
Let us know if it works out for you
/Benjamin
Hi @BEKOBCN ,
Thanks for the reply, it is really helpful.
The script works for me. But I have a few more questions:
- If the orchestration bot must include a child bot flow which has a trigger to match with the Top intent class name from the child bot? Could it call the child bot with the syntax condition only?
- If I want to call many flows from the child bot, shall I specify all flows class names in the orchestration bot flows?
- Would the orchestration bot enable to get the output parameters from the child bot flows?
Best regards
Hi @sc_chatbot ,
happy to help
Regarding,
1.) If you want to use a syntax condition only trigger for the child bot flow, you will need to define a logic what you want to return to the orchestration bot as relevance of this match. A syntax condition is either true or false, so a boolean situation, while the ML classifier shows a confidence score.
You can run _.getThisFlow(); in a global post-listener to access very interesting information around the trigger that has been activated in the child bot, such as the name and the order group. Maybe you can map relevant info into a score that you want to send over to the orchestration bot.
2.) That’s the beauty of this setup, you can completely customize this You can have one or several triggers inside the flow that handles the childbot inside the orchestration bot. You can match only against the confidence score, you can match against a list of intent names or against a single intent name and confidence score (as in the demo), all up to you.
3.) Yes, should be possible straightforward inside the demo solution. Just add an output parameter to the output node inside the child bot. And when you do a printline for the json you receive from the childbot inside the global listener of the orchestration bot, you should already see the output parameter ready to be parsed, in the same way as the rest of the information from this call.
within the printline of the json inside the Orchestration Bot:
Hope this helps!
/Benjamin