---
title: "Choice"
description: "Pick one option from a closed set."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/typesafe/choice"
---
# Choice

> Pick one option from a closed set.

<block-meta block="Yes" channels="Any" folder="typesafe" group="TypeSafe" groupTo="/build/workflows/blocks/typesafe" icon="i-lucide-list" pipe="Value" scope="Any" tool="Yes" type="typesafe.choice">



</block-meta>

**Choice** picks one option from a list you write. Use it to route a ticket, classify a document, or name a category. The winning key is the one with the highest probability. **Confidence** tells you how clearly that option won. A split across options lowers confidence.

Add an option whose key is `other` when the list might not cover every input.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Model
      </strong>
    </td>
    
    <td>
      <code>
        jev-latest
      </code>
      
       (default), <code>
        jev-preview
      </code>
      
      , or <code>
        jev-1.13.0
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        State
      </strong>
    </td>
    
    <td>
      The text or JSON to judge
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Instructions
      </strong>
    </td>
    
    <td>
      What to decide. One specific question.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Options
      </strong>
    </td>
    
    <td>
      1 to 255 rows. <strong>
        Key
      </strong>
      
       is the value later blocks read. <strong>
        Description
      </strong>
      
       separates that option from the others. Leave the description empty when the key is already clear.
    </td>
  </tr>
</tbody>
</table>

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues after the answer returns
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

The next block reads this on the data pipe (`pipe.value`).

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        choice
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Key of the winning option
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        probabilities
      </code>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      Every option key and its probability. The values add up to 1.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        confidence
      </code>
    </td>
    
    <td>
      number
    </td>
    
    <td>
      0 to 1. How peaked the probabilities are.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        model
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      The Jev version that answered
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        usage
      </code>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <code>
        input_tokens
      </code>
      
       and <code>
        output_tokens
      </code>
    </td>
  </tr>
</tbody>
</table>

## Use case

- Send a support message to billing, technical, or sales, and hand low confidence to a person.
- Prefer [Evaluate](https://docs.vettero.com/build/workflows/blocks/typesafe/evaluate) when you also need a score or a yes/no on the same message.


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
