Examples

Which date is earlier?

Open in playground →
  • String enum
  • Thinking: auto
  • Probabilities

Task

Say which of two dates comes first, one written out and one written as DD/MM/YYYY.

Challenges

  • Models tend to read xx/xx/yyyy as US month-first, so 07/06/2026 looks like July 6 and they pick June 8, 2026. Stating the format in the context is often not enough.
  • With "thinking": "auto", the field first gets a level of thinking for this call; this one gets some (thinking_effort reports it). The model then reads 07/06/2026 as day 7, month 6, puts both dates in the same form and compares them before it answers, and its reasoning comes back with the result.
  • return_probabilities works on enum and boolean fields, so the answer is a string enum of the two dates. It is always one of them, and each comes back with a probability.

Laying out…

Time 0.64 s · Cost $0.000055

Generation(
    result={
        'earlier': {
            'value': '07/06/2026',
            'probabilities': {
                'June 8, 2026': 0,
                '07/06/2026': 1,
            },
            'confidence': 0.999,
        },
    },
    thinking={
        'earlier': 'We need answer user\'s question. Need determine earlier date between June 8, 2026 and 07/06/2026 where xx/xx/yyyy is DD/MM/YYYY. 07/06/2026 = 7 June 2026. June 8 = 8 June 2026. Earlier is 7 June, label B. Need output JSON {"label":"B"}. Ensure no extra.',
    },
    usage=Usage(input_tokens=95, thinking_tokens=101),
    thinking_effort={
        'earlier': 'low',
    },
)