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

Text Formatting Issue in RelevancyEvaluator #2502

Open
qnnn opened this issue Mar 18, 2025 · 5 comments
Open

Text Formatting Issue in RelevancyEvaluator #2502

qnnn opened this issue Mar 18, 2025 · 5 comments

Comments

@qnnn
Copy link

qnnn commented Mar 18, 2025

The formatting of this text looks strange. Is there an issue?

private static final String DEFAULT_EVALUATION_PROMPT_TEXT = """
Your task is to evaluate if the response for the query
is in line with the context information provided.\\n
You have two options to answer. Either YES/ NO.\\n
Answer - YES, if the response for the query
is in line with context information otherwise NO.\\n
Query: \\n {query}\\n
Response: \\n {response}\\n
Context: \\n {context}\\n
Answer: "
""";

@dev-jonghoonpark
Copy link
Contributor

dev-jonghoonpark commented Mar 18, 2025

What parts of it look strange to you, and what you think has been improved?
Could you provide the expected code?

@qnnn
Copy link
Author

qnnn commented Mar 18, 2025

What parts of it look strange to you, and what you think has been improved? Could you provide the expected code?

As it uses JDK's Text Blocks syntax, and there's an extra " at the end. Is this the intended format?

private static final String DEFAULT_EVALUATION_PROMPT_TEXT = """
		Your task is to evaluate if the response for the query is in line with the context information provided.
		You have two options to answer. Either YES/ NO.
		Answer - YES, if the response for the query is in line with context information otherwise NO.
		Query: {query}
		Response: {response}
		Context: {context}
		Answer:
		""";

@dev-jonghoonpark
Copy link
Contributor

Now I can see what the issue is.
It does look strange to me too.

@dev-jonghoonpark
Copy link
Contributor

@qnnn Would you be interested in opening a PR to address this?

@qnnn
Copy link
Author

qnnn commented Mar 18, 2025

@dev-jonghoonpark Yes, I’ll open a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants