Uses of Class
dev.langchain4j.test.judge.JudgedTextAssert
Packages that use JudgedTextAssert
-
Uses of JudgedTextAssert in dev.langchain4j.test.judge
Subclasses with type arguments of type JudgedTextAssert in dev.langchain4j.test.judgeMethods in dev.langchain4j.test.judge that return JudgedTextAssertModifier and TypeMethodDescriptiondefault JudgedTextAssertJudge.assertThat(String text) Starts assertions on the given text, for example the response of an AI Service.Gives the judge the sources the text should be based on, for example retrieved documents, so that it can check criteria such as "contains only claims that are stated in the sources".JudgedTextAssert.basedOn(Collection<String> sources) Gives the judge the sources the text should be based on, for example retrieved documents, so that it can check criteria such as "contains only claims that are stated in the sources".JudgedTextAssert.basedOnContents(Collection<? extends Content> sources) Gives the judge the sources the text should be based on, for example the sources retrieved by an AI Service (result.sources()), so that it can check criteria such as "contains only claims that are stated in the sources".Gives the judge the text of the user message that the text responds to (for exampleuserMessage.singleText()), so that it understands criteria that refer to the question.JudgedTextAssert.given(List<? extends ChatMessage> conversation) Gives the judge the conversation that the text answers, so that it understands criteria that refer to it, for example "uses only facts from the tool results".JudgedTextAssert.satisfies(JudgeCriterion... criteria) Asserts that the text satisfies every given criterion, according to the judge.Asserts that the text satisfies every given criterion, according to the judge.