-
Notifications
You must be signed in to change notification settings - Fork 660
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
Bugfix Summarization Score #1164
Bugfix Summarization Score #1164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emreds thanks a lot for pushing this PR and helping us Improve Ragas. I was however not sure if an assertion here is the best flow.
it will break the user code right if the assertions fail? Ideally the behaviour we want is to use logger.error()
to print out an explainable error and then return a Nan value (or throw and exception since executor should catch it).
what do you think?
@jjmachan sure, makes more sense. I will update it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
math.nan to np.nan.
I've changed one, do change the others too?
just to keep things consistent throughout the codebase 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet! thanks a lot @emreds ❤️
@emreds I made some small changes for fixing the type error but now it still returns an empty list. This is so that the types make sense. but I'm not sure if it logically correct |
I think it looks good, as you have mentioned it doesn't break the code but throws the error to understand the context. |
Hi! I was experimenting with Summarization Score and found an issue that when there are no questions generated by the LLM, it throws division by zero error due to 0 generated answers. ## Notable Changes - Added an assertion to keyphrases, questions and answers generation functions. - Changed the llm response variable name `answer` to `response` to prevent possible confusion with score related `answer`. Please let me know if there is something I can add. Cheers! --------- Co-authored-by: jjmachan <jamesjithin97@gmail.com>
Hi!
I was experimenting with Summarization Score and found an issue that when there are no questions generated by the LLM, it throws division by zero error due to 0 generated answers.
Notable Changes
answer
toresponse
to prevent possible confusion with score relatedanswer
.Please let me know if there is something I can add.
Cheers!