-
Notifications
You must be signed in to change notification settings - Fork 828
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
Answer relevancy metric is worse in languages other than English #1829
Comments
hey there Jean 👋🏽 Have you tried adapting the metrics into chineese? is it still doing down for that? |
Not yet, I'm new to ragas and don't know about the feature, I'll have a try soon, thanks for your reply. 8-) |
I would like to follow up on the questions raised by this author.
|
ragas 0.2.11, Class not found:
Throws exception:
It's not mentioned in metrics. |
As to the answer relevancy metric, I write this code sinppet:
It's O.K. to get the prompt in English:
But failed to call LLM to transform it into Chinese:
Is there anything worng in my code snippet? |
Well, I make it run out at last:
The prompt adapted:
The result:
|
hey @icejean just wanted to check if you found the solution for the issue you were facing? |
Yes, it's addressed with the code snippet above, as mentioned in the document: Adapting metrics to target language. |
awsome - great to hear that 🙂 |
I just try ragas to evaluate my GraphRAG app in Chinese, and find that the metric answer relevancy is worse for every question. And I find out that the cause is the question generated is in English, so the embedding of the original question and the generated question is quite different. To address this issue, I modify the function in ~/ragas/prompt/pydantic_prompt.py to demand LLM to output the generated question in Chinese, and it does work.
But I know the function is called not only for this metric, and a solution is needed to support all languages, so I write down the issue here.
Best regards
Jean from China
The text was updated successfully, but these errors were encountered: