Ai Engineering Core / LLM Ecosystem & Integrations

GPT-5 Models with Reasoning

🧩 Testing Models with Puzzles

These puzzles aren't just for fun β€” they're a chance to get hands-on with GPT-5 models and see firsthand how same models think, reason, and arrive at different outputs for the exact same question.


βš–οΈ Inference-Time vs Training-Time Scaling

Before the puzzles, a quick reminder of two ways to make a model "smarter":

Approach

How

Training-time scaling

Use a bigger model

Inference-time scaling

Increase reasoning effort at runtime

Both work independently β€” and today's puzzles demonstrate this beautifully.


πŸͺ™ Puzzle 1: The Two Coins (Easy)

The Question

▢️ Create a new code cell and run it: ( Level2 β†’ part1.ipynb )

easy_puzzle = [
    {"role": "user", "content": 
        "You toss 2 coins. One of them is heads. What's the probability the other is tails? Answer with the probability only."},
]

The Trick

We didn't say which coin was heads β€” just that one of them is. This changes the sample space entirely.

Possible outcomes when at least one is heads

  • Heads, Heads

  • Heads, Tails

  • Tails, Heads

▢️ Create a new code cell and run it: ( model: gpt-5-nano , reasoning: minimal )

response = openai.chat.completions.create(model="gpt-5-nano", messages=easy_puzzle, reasoning_effort="minimal")
display(Markdown(response.choices[0].message.content))

βœ… Output : 1/3

▢️ Create a new code cell and run it: ( model: gpt-5-nano , reasoning: low )

response = openai.chat.completions.create(model="gpt-5-nano", messages=easy_puzzle, reasoning_effort="low")
display(Markdown(response.choices[0].message.content))

βœ… Output : 2/3

▢️ Create a new code cell and run it: ( model: gpt-5-mini , reasoning: minimal )

response = openai.chat.completions.create(model="gpt-5-mini", messages=easy_puzzle, reasoning_effort="minimal")
display(Markdown(response.choices[0].message.content))

βœ… Output : 2/3

In 2 out of 3 cases, the other coin is tails. So the answer is 2/3, not 1/2.


πŸ“Š Model Results

Model

Reasoning Effort

Answer

Correct?

GPT-5 Nano

Minimal

1/3

❌

GPT-5 Nano

Low

2/3

βœ…

GPT-5 Mini

Minimal

2/3

βœ…


πŸ” What This Shows

Small model + no reasoning   β†’  Wrong
Small model + more reasoning β†’  Right
Bigger model + no reasoning  β†’  Right

You can reach the correct answer by scaling either the model size or the reasoning effort β€” they're independent levers.


πŸ“š Puzzle 2: The Bookshelf Worm (Hard)

The Question

▢️ Create a new code cell and run it: ( Level2 β†’ part1.ipynb )

hard = """
On a bookshelf, two volumes of Pushkin stand side by side: the first and the second.
The pages of each volume together have a thickness of 2 cm, and each cover is 2 mm thick.
A worm chewed/ate (perpendicular to the pages) from the first page of the first volume to the last page of the second volume.
What distance did it chewed/ate through?
"""
hard_puzzle = [
    {"role": "user", "content": hard}
]

Testing Different Models

▢️ Create a new code cell and run it: ( model: gpt-5-nano , reasoning: minimal )

response = openai.chat.completions.create(model="gpt-5-nano", messages=hard_puzzle, reasoning_effort="minimal")
display(Markdown(response.choices[0].message.content))

βœ… Output : 4.4 cm

▢️ Create a new code cell and run it: ( model: claude-sonnet-4 , reasoning: N/A )

response = anthropic.chat.completions.create(model="claude-sonnet-4-6", messages=hard_puzzle)
display(Markdown(response.choices[0].message.content))

βœ… Output : 4 mm

▢️ Create a new code cell and run it: ( model: gpt-5 , reasoning: N/A )

response = openai.chat.completions.create(model="gpt-5", messages=hard_puzzle)
display(Markdown(response.choices[0].message.content))

βœ… Output : 4 mm

▢️ Create a new code cell and run it: ( model: gemini-2.5-pro , reasoning: N/A )

response = gemini.chat.completions.create(model="gemini-2.5-pro", messages=hard_puzzle)
display(Markdown(response.choices[0].message.content))

βœ… Output : 4 mm


βœ… Results & Takeaway

The correct answer is 4 mm.

Almost every frontier model got this right β€” the only exception was GPT-5 Nano, which is expected given its smaller size.

πŸ” What This Tells Us

Model Size

Accuracy on Hard Puzzles

🟒 Large frontier models

Solve these easily today

🟑 Smaller models

May struggle or get it wrong

πŸ”΄ Older models

Often fail on these types of questions

πŸ’‘ Today's leading frontier models have become remarkably capable at complex reasoning tasks. But the moment you step down to an older or smaller model, these cracks start to show β€” making puzzles like this a great way to benchmark reasoning ability across models.