RatingQuestionSpec

@ApiStatus.Experimental
class RatingQuestionSpec : Question<RatingResult>

A question that asks the model to rate something on an ordered scale of levels. The first level has index 0 and the last has index levels.size - 1.

Types

Link copied to clipboard
@ApiStatus.Experimental
class Builder

Collects the definition of one rating question. Levels are added from lowest to highest. Each call to build returns a new question, and later changes to the builder do not affect questions it already built. A builder is not safe for use from several threads at once.

Properties

Link copied to clipboard
open override val instructions: String

The text that tells the model what to decide.

Link copied to clipboard
open override val kind: QuestionKind

The kind of the question, which matches its result type.

Link copied to clipboard

The levels from lowest to highest. The list cannot be modified. Level ids are unique.

Link copied to clipboard
open override val name: String

The caller-owned name of the question. It is unique within a spec and names the answer in a response.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Checks that a result fits this question's scale and returns it unchanged. A selected level must be one of the levels. A distribution must cover exactly the levels, in any order. A score must not exceed the index of the last level. Results without evidence always fit.