Skip to content
Practice tests · 28 items

Model API Foundations practice test

What the harness has to read, build and handle on every model call, before there is a loop at all: the four fields in a response and the stop reason the loop branches on, the message list and the pairing rule for tool results, sampling settings and why temperature zero is not determinism, streaming deltas and tool-call fragments, provider wire differences behind one adapter, rate limits and retries inside a run, per-step deadlines and max_tokens, choosing a model by agent-shaped probes, and the failure modes a capable model still has inside a loop. The pool for this topic holds 11 easy, 10 medium and 7 hard items. Each answer comes with its reasoning and a link to the question or concept page it was drawn from.

Configure a test
Topic
Difficulty
Questions
11 in this pool · about 7 min
Reveal answers
Sign in to startFree account required · retakes favour new items

Sample items with answers

easy · sample
A model response arrives with content set to null, no error, and a stop reason of tool_calls. What has the model done?
Returned a blank answer that the harness should retry with the same context and a firmer instruction
Hit the token limit before writing anything, so the output allowance must be raised
✓Requested one or more tools; the request sits in a separate field, not in the text
Refused the task on policy grounds and signalled that through the empty content field

On a tool turn many APIs leave the text content empty or null and put the request in a tool-calls field, with a stop reason that says so. A harness that tests content before the stop reason turns a correct tool request into a blank answer. Branch on the stop reason first.

easy · sample
Which field tells the harness that a reply was cut off by max_tokens, even when the text reads like a complete sentence?
✓The stop reason, with a value such as length or max_tokens
The usage object's output token count compared with the request's max_tokens value
A trailing ellipsis that providers append to any text they truncate
The HTTP status code, which providers set to 206 for partial content

Truncated prose has no marker in the text, and truncated JSON only fails loudly if nobody repairs it. The stop reason is the one reliable signal that generation ended because the output allowance ran out. Comparing output tokens with max_tokens sometimes works but misses providers that count hidden tokens differently.

After the test

Recognising a right option is not the same as producing the answer for a panel. For that, work through these: