Class DecisionScoringModel.Builder
java.lang.Object
dev.langchain4j.model.scoring.DecisionScoringModel.Builder
- Enclosing class:
DecisionScoringModel
- Since:
- 1.21.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()decisionModel(DecisionModel decisionModel) Sets the decision model that scores the segments.maxSegmentsPerRequest(Integer maxSegmentsPerRequest) Sets the maximum number of segments sent in a single request to the decision model, so that the segments of a request do not exceed the input size accepted by the decision model.questionTemplate(PromptTemplate questionTemplate) Sets the template of the yes/no question asked for each segment, which must contain the{{document}}variable (the text of the segment).
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
decisionModel
Sets the decision model that scores the segments. Required. -
questionTemplate
Sets the template of the yes/no question asked for each segment, which must contain the{{document}}variable (the text of the segment). The score is the probability of "yes".Default value is
DecisionScoringModel.DEFAULT_QUESTION_TEMPLATE. -
maxSegmentsPerRequest
Sets the maximum number of segments sent in a single request to the decision model, so that the segments of a request do not exceed the input size accepted by the decision model.Default value is 20.
-
build
-