-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Bug description
method evaluate of RelevancyEvaluator always returns passing false
Problem is with Git commit caed4b3 of @remeio
https://github.com/spring-projects/spring-ai/commit/caed4b3705126ed8dfd2077c3177c9c7c2b8a963
specifically with this condition:
if ("yes".equalsIgnoreCase(evaluationResponse))
Because LLM response is "YES\n", due to DEFAULT_PROMPT_TEMPLATE:
"Answer YES, if the response for the query is in line with context information otherwise NO."
And the condition fails because of the line break after "YES" (because the using of "equals" instead of "contains")
Environment
Spring AI version 1.1.0