MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.52k stars 1.27k forks source link

Strange Skill regex behaviour #2294

Closed krisgesling closed 1 month ago

krisgesling commented 5 years ago

Interested in any comments or hypotheses on this one...

It was flagged that some utterances like "tell me about the royal bank of canada" were not receiving any response from Mycroft. So first stop was to investigate the Skill itself.

  1. With the existing Skills regex, the Article Title is extracted correctly and returns a confidence of 0.375 however the intent does not seem to be triggered.
  2. While playing around, adding an additional regex line: .*(wiki|for|about|wikipedia)(?! (for|about)) the (?P<ArticleTitle>.+) correctly triggered the intent despite it now returning a lower confidence of 0.1875.
    • Doing this as a one liner: .*(wiki|for|about|wikipedia)(?! (for|about))( the|) (?P<ArticleTitle>.+) extracted ArticleTitle as "the" instead of "royal bank of canada"
  3. Reverting the regex back to the original single line now matches the utterance and triggers the intent correctly.

So I'm presuming that it's something in the regex registration or caching, but thought I'd seek advice before diving too deep into the rabbit hole.

forslund commented 5 years ago

I think the issue is that we are detaching intents and not keywords.

In the beginning the keywords were shared across skills so I guess that's why they aren't removed. Nowadays we tag each keyword to be skill specific so we should be able to remove them as well...

forslund commented 1 month ago

Closing Issue since we're archiving the repo