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

Sherpa does not accurately extract numeric values from search results #80

Closed
YujingYang666777 opened this issue Aug 10, 2023 · 8 comments · Fixed by #277
Closed

Sherpa does not accurately extract numeric values from search results #80

YujingYang666777 opened this issue Aug 10, 2023 · 8 comments · Fixed by #277
Assignees
Labels
bug Something isn't working theme-qa Quality assurance work

Comments

@YujingYang666777
Copy link
Contributor

YujingYang666777 commented Aug 10, 2023

Description: when searching for the annual salary for several jobs, the results given by the LLM are exactly the same. Probably the searched result can be more accurate regarding the specific question.

For example:
User: @sherpa What is the annual salary for an entry level software engineer in Canada?
Sherpa:
The average annual salary for an entry-level software engineer in Canada ranges from $68,207 to $110,963. Source: Levels.fyi

However, when clicking into the URL, the number display on the website is 5.07 - 11.13 instead of the number claimed by Sherpa.

@amirfz amirfz changed the title Does not use the search result accutely Sherpa does not use the search result accurately Aug 10, 2023
@amirfz
Copy link
Contributor

amirfz commented Aug 10, 2023

@YujingYang666777 could you add some examples to the description?

@amirfz
Copy link
Contributor

amirfz commented Aug 10, 2023

@YujingYang666777 talk to @johnnykfeng because he had to solve this issue in a different project

@20001LastOrder 20001LastOrder added the bug Something isn't working label Nov 14, 2023
@oshoma
Copy link
Collaborator

oshoma commented Dec 5, 2023

@YujingYang666777 @johnnykfeng is this issue still occurring? Any comments to add?

@oshoma
Copy link
Collaborator

oshoma commented Dec 5, 2023

I just tried this again. It's still happening.

Osh: https://github.com/sherpa What is the annual salary for an entry level software engineer in Canada?
Sherpa: The annual salary for an entry level software engineer in Canada can vary. According to Glassdoor, the median pay for entry level software engineers in Canada is CA$104,203 [1]. Another source, Levels.fyi, states that the average salary range for entry level software engineers in Canada is from CA$67,576 to CA$107,680 [2]. It's important to note that salaries can also depend on factors such as location and experience.

The $104,203 number does not appear anywhere on the 1st URL page.
For the 2nd URL, the actual range on the web page is $84K - $130K/yr.

@oshoma oshoma changed the title Sherpa does not use the search result accurately Sherpa does not accurately extract numeric values from search results Dec 5, 2023
@amirfz
Copy link
Contributor

amirfz commented Dec 5, 2023 via email

@amirfz
Copy link
Contributor

amirfz commented Dec 7, 2023

ok, to add more concrete details. this is also related and can probably borrow implementation ideas from #241

  • create a critic agent for the QA agent @20001LastOrder
  • extract numbers from the response (regex?) @Eyobyb
  • check if those numbers exist exactly as they are in the references then accept the answer and send it to the user @Eyobyb
  • if not, then respond back to the QA agent with something like "the numbers presented in your answer do not appear in the references. please try again responding and including the correct numbers"

ps. this can be also done for entities that are important.
pps. this doesn't solve the problem of a number existing but not being what the user actually wanted, but this would be a good baseline for obvious errors

@oshoma
Copy link
Collaborator

oshoma commented Dec 12, 2023

@Eyobyb is working on #260 in relation to this.

@oshoma oshoma added the theme-qa Quality assurance work label Dec 12, 2023
@Eyobyb Eyobyb self-assigned this Dec 18, 2023
@20001LastOrder 20001LastOrder linked a pull request Apr 4, 2024 that will close this issue
@20001LastOrder
Copy link
Collaborator

Closed by #277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working theme-qa Quality assurance work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants