Class JudgeResponse
java.lang.Object
dev.langchain4j.test.judge.JudgeResponse
The response of a
Judge to a JudgeRequest: one JudgeVerdict per criterion, in the order of
the criteria, and the tokens the judge model used. Returned by Judge.evaluate(JudgeRequest).
Implementations of Judge create it with from(List) or builder().-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JudgeResponse.Builderbuilder()Returns a builder for a response, for example in aJudgeimplementation.booleanstatic JudgeResponsefrom(List<JudgeVerdict> verdicts) Creates a response with the given verdicts and without token usage, for example in aJudgeimplementation.inthashCode()The tokens the judge model used for this evaluation, added up over all requests the judge sent.toString()verdicts()One verdict per criterion of the request, in the order of the criteria.
-
Method Details
-
from
Creates a response with the given verdicts and without token usage, for example in aJudgeimplementation.- Parameters:
verdicts- one verdict per criterion, in the order of the criteria
-
builder
Returns a builder for a response, for example in aJudgeimplementation. -
verdicts
One verdict per criterion of the request, in the order of the criteria. -
tokenUsage
The tokens the judge model used for this evaluation, added up over all requests the judge sent. A count that a response did not report is left out of the sum, asTokenUsage.add(TokenUsage)does.nullif the judge model did not report token usage for any request. -
equals
-
hashCode
-
toString
-