-
Notifications
You must be signed in to change notification settings - Fork 40
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
Minimize requirements for user data for OPEA ragas #136
Conversation
Signed-off-by: aasavari <[email protected]>
Signed-off-by: Yingchun Guo <[email protected]> Signed-off-by: aasavari <[email protected]>
Co-authored-by: root <[email protected]> Signed-off-by: aasavari <[email protected]>
Signed-off-by: aasavari <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: aasavari <[email protected]>
Signed-off-by: ZePan110 <[email protected]> Signed-off-by: aasavari <[email protected]>
Hi @XinyuYe-Intel, the error is - "AttributeError: 'AnswerRelevancy' object has no attribute '_required_columns'". But, latest version of ragas has The testing environment uses ragas 0.1.16 but latest version is 0.1.20. Ragas continually adds and deletes metrics. So, should we pull latest version of ragas for the testing environment? Please share your insights. Thank you. |
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.
LGTM. Please make sure the unit test pass.
LGTM. please make sure the ut https://github.com/opea-project/GenAIEval/blob/main/tests/test_ragas.py pass. you can test the ut locally. |
Signed-off-by: aasavari <[email protected]>
for more information, see https://pre-commit.ci
Thank you for reviewing. The issue was coming from older versions of ragas. I added support for them and now the code passes all checks. Thanks! |
Description
Purpose of this PR to minimize requirements on user data and improve flexibility and coverage of use-cases.
Prior to this PR, we required all 4 fields (question, answer, ground truth and contexts). But, this PR ensures we only require minimum input fields for a given list of metrics. E.g., "faithfulness" does not require ground _truth field, so it will not be asked from the user.
This PR grabs list of required fields for each metric from ragas and sets their union as the final required fields for a given list of metrics. We use this final list of required fields to be present in input data.
Issues
n/a
.Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
None.
Tests
This PR was tested for OpenAI (ragas uses GPT-4o by default) and HF endpoint (Llama 3.1 70b on Gaudi2 machine).