Class BasicEvaluationTest

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

public class BasicEvaluationTest extends Object
  • Field Details

    • openAiChatModel

      @Autowired protected ChatModel openAiChatModel
    • 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, String answer, boolean factBased)