ragas icon indicating copy to clipboard operation
ragas copied to clipboard

Fixed the issue of changing to Unicode characters in the json.dumps

Open Youngrok123 opened this issue 1 year ago • 2 comments

When using json.dumps, if the character is not an ASCII character, it is converted to a Unicode character and output or passed to LLM. Due to this issue, LLM is unable to respond properly.

Added ensure_ascii=False option to output Unicode characters literally.

Youngrok123 avatar Sep 13 '24 05:09 Youngrok123

Fix ensure_ascii for json.dumps Since the code has not been merged, I am sending a PR by modifying the code in the current ragas version.

Youngrok123 avatar Sep 13 '24 05:09 Youngrok123

This is a great PR. Thanks @Youngrok123 .

If we want to evaluate in language that doesn't support ASCII like Japanese and Korean, ragas makes prompt with unicode-like strings as an attached image. This library is really great, so I hope that it can be applicable to all languages.

image

wildgeece96 avatar Sep 21 '24 00:09 wildgeece96

Thanks again @Youngrok123 for fixing this 🙂

jjmachan avatar Oct 16 '24 09:10 jjmachan