Saltar al contenido

Salida estructurada

Hacer que el modelo emita JSON que cumpla un esquema

Datos y documentosPrincipiante#39
entradaTextoTabla

El texto completo se presenta en inglés; el título y el resumen están traducidos.

Qué significa esta capacidad

Takes natural language plus a target structure — field names, types, required flags — and outputs text that strictly conforms, such as JSON, XML or a table. Unlike information extraction the structure is supplied by the caller rather than inferred from the text; unlike tool use it produces the data itself, not a request to invoke some interface.

Cómo se consigue técnicamente

The basic approach puts the schema and examples in the prompt and asks the model to fill them; more reliable is constrained decoding, which at each step allows only tokens that keep the structure valid, ruling out syntax errors during generation. Fine-tuning on many text-to-structure pairs familiarises the model with common field naming and type conventions. Large schemas can be split across several calls or filled in layers.

Productos representativos

5

OpenAI

GPT-4o

Un modelo general nativamente multimodal: texto, imagen y audio por una misma puerta

4Capac.
Modelo Cerrado
TextoImagenAudioTextoAudio
2024

Anthropic

Claude

Un modelo de chat general conocido por su contexto largo y su alineación de seguridad

4Capac.
Modelo Cerrado
TextoImagenTexto
2023

Google DeepMind

Gemini

Un modelo general nativamente multimodal, pensado para contextos muy largos

4Capac.
Modelo Cerrado
TextoImagenAudioVídeoTexto
2023

Alibaba (Qwen)

Qwen

Una familia de pesos abiertos con muchos tamaños y versiones multimodales

4Capac.
Modelo Pesos abiertos
TextoImagenTexto
2023

Tencent (Hunyuan)

Hunyuan

La familia de modelos generales de Tencent, con versiones de pesos abiertos

4Capac.
Modelo Pesos abiertos
TextoImagenTexto
2023

Organizaciones relacionadas

Usos típicos

  • Converting natural language into API payloads
  • Auto-filling forms and order fields
  • Data cleaning and normalisation pipelines
  • Passing structured messages between agents

Cómo se evalúa

Schema validity rate
Share of outputs that parse and satisfy the schema
Field exact match
Share of field values matching the reference
Value-level F1
Scores elements in lists and nested structures

Límites y dificultades

  • With many fields or long enums it drops fields, picks the wrong value or invents new ones
  • Deep nesting and complex types such as unions or nullable arrays produce type errors
  • Tight format constraints squeeze reasoning, and the same model reasons less well under them

Conceptos detrás

PLN y grandes modelos de lenguaje

Arquitectura TransformerIntermedio

Sustituir el relé palabra a palabra por una sala donde todos hablan a la vez, para que las dependencias lejanas estén a un salto

4Vínculos
Figuras 2 · Datos 2

Ingeniería, seguridad y ética de la IA

Agentes y uso de herramientasIntermedio

Que un modelo no solo responda: consulte, llame APIs, ejecute código — y decida el siguiente paso según el resultado

4Vínculos
Figuras 1 · Datos 1