Class BasicEvaluationTest

java.lang.Object
org.springframework.ai.evaluation.BasicEvaluationTest

public class BasicEvaluationTest extends Object
  • Field Details

    • openAiChatClient

      @Autowired protected ChatClient openAiChatClient
    • qaEvaluatorAccurateAnswerResource

      @Value("classpath:/prompts/spring/test/evaluation/qa-evaluator-accurate-answer.st") protected org.springframework.core.io.Resource qaEvaluatorAccurateAnswerResource
    • qaEvaluatorNotRelatedResource

      @Value("classpath:/prompts/spring/test/evaluation/qa-evaluator-not-related-message.st") protected org.springframework.core.io.Resource qaEvaluatorNotRelatedResource
    • qaEvaluatorFactBasedAnswerResource

      @Value("classpath:/prompts/spring/test/evaluation/qa-evaluator-fact-based-answer.st") protected org.springframework.core.io.Resource qaEvaluatorFactBasedAnswerResource
    • userEvaluatorResource

      @Value("classpath:/prompts/spring/test/evaluation/user-evaluator-message.st") protected org.springframework.core.io.Resource userEvaluatorResource
  • Constructor Details

    • BasicEvaluationTest

      public BasicEvaluationTest()
  • Method Details

    • evaluateQuestionAndAnswer

      protected void evaluateQuestionAndAnswer(String question, ChatResponse response, boolean factBased)