A Tensor API Lab collection

Prompt design.

Good prompt design makes the task easier to evaluate. This collection treats instructions, examples and output requirements as an application contract, with explicit handling for missing information and invalid responses.

The starting point is a precise decision: what should the model produce, and what evidence should support it? From there, define the permitted fields, the label vocabulary and the behavior for inputs that do not fit. A short example can communicate the intended structure, but it should not replace validation.

Read the structured-output guide alongside the prompt topic page. The guide explains how to inspect a returned object, while the topic page gives a compact recipe for assembling a prompt. Bring a small set of representative and awkward examples to both. Those cases help reveal when an instruction is underspecified, when a schema is too permissive, or when a fluent answer has quietly changed the task.

1 article in this collection

Articles in this collection