Examples

Roll a fair die

Open in playground →
  • Probabilities
  • Permutations

Task

Predict a roll of a fair six-sided die, with a probability for each face.

Challenges

  • Every face is equally likely, with a probability of 1/6 (about 0.167).
  • Compared with Jev and the OpenAI Decisions API, TypeLLM gives the probabilities closest to the true distribution.
Probability error on a fair die, as KL divergence from 1/6 per face (lower is better): TypeLLM 0.02, OpenAI Decisions 0.36, Jev 1.12.

Laying out…

Time 0.16 s · Cost $0.000006

Generation(
    result={
        'roll': {
            'value': 'one',
            'probabilities': {
                'one': 0.277,
                'two': 0.15,
                'three': 0.124,
                'four': 0.114,
                'five': 0.127,
                'six': 0.207,
            },
            'confidence': 0.133,
        },
    },
    thinking={},
    usage=Usage(input_tokens=120, thinking_tokens=0),
)