본문으로 건너뛰기
AI 도감

구조화 출력

정해진 스키마대로 JSON을 내놓게 한다

데이터와 문서입문 #39
입력텍스트표

이 페이지의 본문은 영어로 제공됩니다. 제목과 요약은 한국어로 번역되었습니다.

이 능력이 뜻하는 것

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.

기술적으로 구현하는 방법

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.

대표 제품

5

관련 기관

대표적 용도

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

성능을 평가하는 방법

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

경계와 난점

  • 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

뒤에 있는 개념