Skip to content
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

Any way to apply logic to show the confidence in search results? #125

Open
maximama opened this issue Jun 7, 2018 · 3 comments
Open

Any way to apply logic to show the confidence in search results? #125

maximama opened this issue Jun 7, 2018 · 3 comments

Comments

@maximama
Copy link

maximama commented Jun 7, 2018

Great work on this project, works beautifully most of the time. Quick question, not an issue, more of an enhancement.
Do you think it would be possible to add a feature that shows the confidence for each method? Method 2 never works for me, but 1 and 3 works great. So typically I'm seeing that they give the same responses, but especially in later questions they give different responses. And if I had more than 3 seconds to read and interpret the scores I could see this bot being 95% accurate.

For example, I don't know if this makes sense, you could calculate confidence like this:
Method 1:
Answer 1 score: 35, answer 2 score: 0, answer 3 score: 40
Let's say question does not include 'NOT'. so method 1 would return answer 3

Method 3:
Answer 1 score: 3, answer 2 score: 0, answer 3 score: 1
So this would return answer 1.

Now, confidence:
Take the top 2 answers, calculate the percentage between them
Hi: 40 Lo: 35 so 40-35/40=13% difference, so give it a confidence score of 13%
Hi: 3 Lo: 1 so 3-1/3=66% difference, so give it a confidence score of 66%
If the second largest score is a 0, it would return a score of 100%

I know there is a better way to calculate this, but I would go with method 3 as my answer, and I feel it gives me a better chance than the 50% chance I have right now to pick either one or the other.

@maximama
Copy link
Author

maximama commented Jun 7, 2018

Here's a real life example:
Q: What is the inner most planet in our solar system
A: Jupiter, B: Mercury, C: Saturn
M1: A:13, B:322, C:11
Best answer: B: Mercury (322-13)/322=96% Confidence
M3: A:284, B:239, C: 161
Best answer A: Jupiter (284-239)/284=16% Confidence

Two different answers but I would definitely pick the 96% confidence answer, which happens to actually be the correct answer.

@Mineleague
Copy link

I would suggest using Beautiful Soup to return the number of results in each search, and assign them to a printed variable.

@DEEVANSHU1
Copy link

pl help me i am unable to install it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants