New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common query framework #1900

Merged
merged 2 commits into from Dec 5, 2018

Conversation

Projects
None yet
3 participants
@forslund
Copy link
Member

forslund commented Dec 4, 2018

Description

A system similar to the common play for negotiating for finding the best answer for questions. Currently three levels of CQSMatchLevel Exist:
EXACT: If the query could be identified exactly and a response is returned.
Example: The cockail skill could find a cocktail in the query that exists in
it's database.

CATEGORY: A category of questions the skill handles could be identified.
Example: The wiki-data skill can identify that the question is regarding
A date of birth and finds an answer.

GENERAL: A general question and answer service could parse the question.
Example: The wolfram alpha skill got a match for "How tall is Abraham
Lincoln".

The skill can also return the CQSVisualMatchLevel indicating that they have visual media to go with the skill, on visual devices such as a Mark-2 a bonus is given to these matches.

The skill-query will send the response for the best match to the TTS but will also invoke the CQS_action() where additional handling may occur, showing of visual info or in the case of wolfram alpha preparing to send the sources via e-mail.

How to test

install https://github.com/mycroftai/skill-query and switch the branch on wolfram and duck-duck-go to feature/common-qa.

Make sure the questions still works.

Contributor license agreement signed?

CLA [ Yes ]

forslund added some commits Dec 1, 2018

Add CommonQuerySkill class
Adds support for negotiating best answer for a questions

Currently three levels of confidence are defined

EXACT: If the query could be identified exactly and a response is returned.
    Example: The cockail skill could find a cocktail in the query that exists in
             it's database.

CATEGORY: A category of questions the skill handles could be identified.
    Example: The wiki-data skill can identify that the question is regarding
             A date of birth and finds an answer.

GENERAL: A general question and answer service could parse the question.
    Example: The wolfram alpha skill got a match for "How tall is Abraham
             Lincoln".
Add posibility to give bonus for visual skills
CQSVisualMatchLevel can be returned and if the device is a mark-2 a bonus will be given to the skill.

@forslund forslund added the CLA: Yes label Dec 4, 2018

@forslund forslund requested a review from LearnedVector Dec 4, 2018

@pep8speaks

This comment has been minimized.

Copy link

pep8speaks commented Dec 4, 2018

Hello @forslund! Thanks for submitting the PR.

@LearnedVector
Copy link
Member

LearnedVector left a comment

LGTM!

@LearnedVector LearnedVector merged commit 3bb15bc into MycroftAI:dev Dec 5, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.2%) to 47.363%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment