Class EvalCreateParams.TestingCriterion.TextSimilarity
-
- All Implemented Interfaces:
public final class EvalCreateParams.TestingCriterion.TextSimilarity
A TextSimilarityGrader object which grades text based on similarity metrics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
EvalCreateParams.TestingCriterion.TextSimilarity.Builder
A builder for TextSimilarity.
-
Method Summary
-
-
Method Detail
-
toTextSimilarityGrader
final TextSimilarityGrader toTextSimilarityGrader()
-
evaluationMetric
final TextSimilarityGrader.EvaluationMetric evaluationMetric()
The evaluation metric to use. One of
fuzzy_match
,bleu
,gleu
,meteor
,rouge_1
,rouge_2
,rouge_3
,rouge_4
,rouge_5
, orrouge_l
.
-
_type
final JsonValue _type()
The type of grader.
Expected to always return the following:
JsonValue.from("text_similarity")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
passThreshold
final Double passThreshold()
The threshold for the score.
-
_evaluationMetric
final JsonField<TextSimilarityGrader.EvaluationMetric> _evaluationMetric()
Returns the raw JSON value of evaluationMetric.
Unlike evaluationMetric, this method doesn't throw if the JSON field has an unexpected type.
-
_input
final JsonField<String> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_reference
final JsonField<String> _reference()
Returns the raw JSON value of reference.
Unlike reference, this method doesn't throw if the JSON field has an unexpected type.
-
_passThreshold
final JsonField<Double> _passThreshold()
Returns the raw JSON value of passThreshold.
Unlike passThreshold, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final EvalCreateParams.TestingCriterion.TextSimilarity.Builder toBuilder()
-
validate
final EvalCreateParams.TestingCriterion.TextSimilarity validate()
-
builder
final static EvalCreateParams.TestingCriterion.TextSimilarity.Builder builder()
Returns a mutable builder for constructing an instance of TextSimilarity.
The following fields are required:
.evaluationMetric() .input() .name() .reference() .passThreshold()
-
-
-
-