Class ScaleQuestion
java.lang.Object
dev.langchain4j.model.decision.request.ScaleQuestion
- All Implemented Interfaces:
Question
A question that places the input on an ordered scale, answered with the mean level and the probability of each level
(see
ScaleAnswer).
Levels are described with text and ordered from lowest to highest; a level's number is its index, starting at 0:
ScaleQuestion frustration = ScaleQuestion.builder()
.text("How frustrated is the customer?")
.level("Calm") // 0
.level("Frustrated") // 1
.level("Angry") // 2
.build();
- Since:
- 1.21.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ScaleQuestion.Builderbuilder()booleaninthashCode()levels()The levels, from lowest (index 0) to highest.static ScaleQuestionCreates a scale question with the given text and levels, ordered from lowest to highest.text()What the model should evaluate, for example "Which team should handle this ticket?".toString()
-
Method Details
-
text
-
levels
-
of
Creates a scale question with the given text and levels, ordered from lowest to highest. -
builder
-
equals
-
hashCode
-
toString
-