Tinker Structured outputs

by Samy (Kondasamy Jayaraman)

Loading Larkspur mini

Larkspur mini · no schemaThe prompt: “Order 1042 status as JSON:”

Chapter 1 of 7

Asking nicely

Larkspur’s order system reads the assistant’s answers with a program, not a person. The team starts simple: ask Larkspur mini, the tiny model from Transformers.

This chapter: Does asking a model for JSON get you JSON?

About this chapter

You will learn

  • Why a request in the prompt is not a guarantee of format
  • What a model writes when it has never seen the format you ask for

Words you’ll meet

JSON
A plain text format for data: curly braces around fields, each a quoted name, a colon and a value, like {"status":"delayed"}. Programs read it without guessing.
Structured output
An answer in a fixed, machine-readable shape (usually JSON) instead of free prose.
Schema
A written description of the shape an answer must have: its fields, each one’s type, and the values allowed. Larkspur uses the same rules for it (part of JSON Schema) as Tool calling.
Window
The most tokens a model can hold at once, prompt and answer together. Larkspur mini’s is tiny; big provider models hold far more.

Step 1 of 4

Larkspur mini runs in your browser, trained only on Larkspur’s documents. The system wants a : a program can read.

Ask for JSON.

Loading Larkspur mini…