Helping mycroft to choose the correct skill

How does Mycroft currently choose which skill will be called when the user inputs a sentence? As I understood by now, the sentence is matched against the regular expressions provided by the skills.

But sometimes the skill to use is very much dependent on the object the user is talking about. Take for example
"Where is Paul"
“Where is Cambodia”

By sentence structure those match perfectly both home assistant tracker intents and Wikipedia/ OpenStreetMap intents. But it would be rather easy to first forward the information to all matching skills to a special method that returns how well this fits.

For example home assistant could check whether there art any users called “Cambodia” and OpenStreetMap how close “Paul” gets to any known places. They would return some certainty that the user intended to activate exactly them as a skill and the highest certainty will win. Or for performance reasons the first skill to return a 75% plus certainty. Or this could be entirely binary and the first to return “yes this works for me” would be chosen.

Also fallbacks would be only considered if no skill delivered 50% plus certainty.

Yet all skills could be asked parallel and maybe even prepare executing the intended action. That way performance wouldn’t be too bad.

What do you think of this idea? Is anything of the likes already implemented? Are there any contras?

some of that is planned

1 Like