# ChoiceQuestion

    struct ChoiceQuestion: Sendable, Equatable

Configuration for evaluating a mutually exclusive categorical choice menu.
- `
  ### [init(choices:descriptions:temperature:instructions:scoringMode:normalizePrior:)](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV7choices12descriptions11temperature12instructions11scoringMode14normalizePriorACSaySSG_AJSgSfSSAA07ScoringL0OSbtcfc)

  `

  #### Declaration

  Swift

      init(choices: [String], descriptions: [String]? = nil, temperature: Float = 0.0, instructions: String = "", scoringMode: ScoringMode = .lengthNormalizedLogProb, normalizePrior: Bool = false)

- `
  ### [init(options:temperature:instructions:scoringMode:normalizePrior:)](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV7options11temperature12instructions11scoringMode14normalizePriorACSaySS3key_SS11descriptiontG_SfSSAA07ScoringK0OSbtcfc)

  ` Creates a `ChoiceQuestion` from an ordered list of `(key, description)` tuples.

  #### Declaration

  Swift

      init(options: [(key: String, description: String)], temperature: Float = 0.0, instructions: String = "", scoringMode: ScoringMode = .lengthNormalizedLogProb, normalizePrior: Bool = false)

- `
  ### [choices](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV7choicesSaySSGvp)

  ` Ordered list of option keys.

  #### Declaration

  Swift

      var choices: [String]

- `
  ### [descriptions](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV12descriptionsSaySSGSgvp)

  ` Optional descriptions corresponding 1:1 with `choices`.

  #### Declaration

  Swift

      var descriptions: [String]?

- `
  ### [instructions](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV12instructionsSSvp)

  ` Optional task instructions prepended to the choice prompt.

  #### Declaration

  Swift

      var instructions: String

- `
  ### [normalizePrior](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV14normalizePriorSbvp)

  ` Whether to normalize option log-probabilities against the empty-context prior.

  #### Declaration

  Swift

      var normalizePrior: Bool

- `
  ### [scoringMode](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV11scoringModeAA07ScoringH0Ovp)

  ` Multi-token log-probability aggregation strategy.

  #### Declaration

  Swift

      var scoringMode: ScoringMode

- `
  ### [temperature](https://developers.google.com/edge/api/mediapipe/swift/decision/Structs/ChoiceQuestion.md.txt#/s:22MediaPipeTasksDecision14ChoiceQuestionV11temperatureSfvp)

  ` Softmax temperature override (`0.0` uses the model's calibrated default).

  #### Declaration

  Swift

      var temperature: Float