ragas
ragas copied to clipboard
Answer_relevance value negative issue.
[ O ] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug The answer_relevance value is coming out negative. ex. -0.001454476865077159
Ragas version: 0.2.15 Python version: 3.11.11
Code to Reproduce It probably won’t be necessary. In ragas/ragas/src/ragas/metrics/_answer_relevance.py → the ResponseRelevancePrompt class may have produced a negative value via the LLM. It looks like you need to add post-processing logic or strengthen the prompt.
Error trace
Expected behavior The answer_relevance value should always output only 0 or 1.