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

[Feature] Obtain F score directly from the chat engine #291

Open
2 tasks done
NB-123 opened this issue Feb 13, 2024 · 1 comment
Open
2 tasks done

[Feature] Obtain F score directly from the chat engine #291

NB-123 opened this issue Feb 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@NB-123
Copy link

NB-123 commented Feb 13, 2024

Is this your first time submitting a feature request?

  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing functionality

Describe the feature

I am able to get the F score using the knowledge base query object:
query_result = knowledge_base.query([Query(text=query)]) f_score = f"{query_result[0].documents[0].score * 100:.2f}%"
However, I cannot do the same when I use the chat engine directly because the following response object has no score component.
response = chat_engine.chat( messages=[UserMessage(content=query)], )
Would appreciate it if we could get the F score in the response body of the chat engine as well.

Describe alternatives you've considered

The alternative is to go directly to the knowledge base query method, but that misses out on the benefits that the context engine and chat engine provide.

Who will this benefit?

Everyone who wants to understand the F score of their query to benchmark performance and approximate confidence level in the output.

Are you interested in contributing this feature?

Sure, but would appreciate guidance (pair programming maybe?)

Anything else?

No response

@NB-123 NB-123 added the enhancement New feature or request label Feb 13, 2024
@miararoy
Copy link
Contributor

hi @NB-123

How do you see the score represented? when you are using knowledge base directly, you basically have the documents the returned from the search, hence you get score for each, with the "chat" you are getting the model response, then what should the score be representing? is it the score of the documents that returned? or the ones the model used (assuming we know exactly which)

what would be ideal request -> response in your mind?

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

No branches or pull requests

2 participants