Tinker Structured outputs

by Samy (Kondasamy Jayaraman)

Loading Larkspur mini

Larkspur miniThe schema asks for order, a whole number.

Chapter 6 of 7

Valid isn’t right

Every answer now passes the check. Larkspur’s team is ready to ship, until someone reads what the answers say.

This chapter: If every answer fits the schema, is every answer right?

About this chapter

You will learn

  • That the mask forces a value even when the model doesn’t know one
  • How a well-formed answer can be wrong
  • What refusals and cut-off answers do to a schema

Words you’ll meet

Valid
Fits the schema: the right fields, types and values. Says nothing about whether it is true.
Cut-off
An answer that stopped before it finished, because it ran out of room (a token limit). A cut-off JSON answer doesn’t parse.
Refusal
An answer in which the model declines the request. Providers return it in a way that may not follow your schema.

Step 1 of 4

Every answer passes the check now. The team adds a field, the order number, so answers match orders. The prompt even names it.

Predict first.

The schema asks for one field, order, a whole number. The prompt is “Where is order 1042?”. What will Larkspur mini write?