¿Qué es un esquema de salida?
¿Qué es?
Un esquema de salida es un JSON Schema que describe exactamente la forma de la respuesta: qué campos, de qué tipo y cuáles son obligatorios. Los modelos recientes saben respetarlo.
Cuándo usarlo
- Extract data from text (invoice, CV, email) in a reliable format.
- Plug a model's answer straight into a program.
Campos de la página
| JSON Schema | The schema, of type object. |
|---|---|
| Instructions | What the model should do with the text. |
| Example | A valid output. |
Cómo usarlo
The Python example passes the schema to the Anthropic API; the OpenAI format is provided too.