Skip to content

non-asii characters support in faithfulness #1396

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ragas/metrics/_faithfulness.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _create_nli_prompt(self, row: t.Dict, statements: t.List[str]) -> PromptValu
contexts = row["retrieved_contexts"]
# check if the statements are support in the contexts
contexts_str: str = "\n".join(contexts)
statements_str: str = json.dumps(statements)
statements_str: str = json.dumps(statements, ensure_ascii=False)
prompt_value = self.nli_statements_message.format(
context=contexts_str, statements=statements_str
)
Expand Down
2 changes: 1 addition & 1 deletion src/ragas/metrics/_noise_sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __post_init__(self):
def _create_nli_prompt(self, contexts: str, statements: t.List[str]) -> PromptValue:
assert self.llm is not None, "llm must be set to compute score"

statements_str: str = json.dumps(statements)
statements_str: str = json.dumps(statements, ensure_ascii=False)
prompt_value = self.nli_statements_message.format(
context=contexts, statements=statements_str
)
Expand Down
Loading