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

fix: Update error handling in Faithfulness metric to return 0.0 instead of np.nan on failure #1773

Conversation

iamarunbrahma
Copy link

This PR fixes a KeyError: 0 issue that occurs when running RAG evaluation metrics, specifically in the faithfulness metric computation.

Fixes #1770

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 19, 2024
@shahules786
Copy link
Member

Hi, we have made it return nan by design. Zero here means no hallucinations and NaN means undetermined. Here the case the latter and not the former. While processing the results, the user may fill the NaNs in the results according to his/her best judgement. Please close the PR if this explanation makes sense to you. @iamarunbrahma

@iamarunbrahma
Copy link
Author

Thanks for the explanation, @shahules786. That makes sense. Closing this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError: 0 by following the Get Started "Run ragas metrics for evaluating RAG"
2 participants