Datasets:
Tasks:
Document Question Answering
Size:
n<1K
Tags:
benchmark
document-ai
information-extraction
structured-extraction
key-information-extraction
ocr
License:
GPT (OpenAI)
- Runner:
scripts/run_gpt.py - Result set:
results/gpt/<doc_id>.json - Default model:
gpt-5.5(override withOPENAI_MODEL) - API: OpenAI Responses API (
/v1/responses) with Structured Outputs - Schema mode:
openai_strict_nullable_v1
Prompt
The user instruction is loaded from extraction_prompt.txt:
Extract the document into the supplied JSON schema. Use only information present in the
document. Return null for fields that are not printed or cannot be determined. Preserve
table rows as arrays and preserve the document language for values. Document id: {doc_id}.
The document is attached as an input_file (PDF / native files via the Files API), an
input_image (JPEG/PNG/WebP/GIF), or a sequence of PNG pages converted from multipage
TIFF.
Output constraint
The schema is sent as text.format of type json_schema with strict: true. The raw
benchmark schema is first normalized (normalize_output_schema) into OpenAI's strict
subset:
- drop
$schema,examples,default,title,format, and anyx_*keys - every object lists all properties in
requiredand setsadditionalProperties: false - objects and primitives are made nullable so a labeled
nullcan be returned - enum literals are sanitized and gain a
nullmember when nullable
Run knobs (environment)
OPENAI_API_KEY(required)OPENAI_MODEL,OPENAI_API_BASEOPENAI_MAX_OUTPUT_TOKENS,OPENAI_REASONING_EFFORTOPENAI_INPUT_USD_PER_1M,OPENAI_OUTPUT_USD_PER_1M(optional cost estimate)
Failure handling
API errors, refusals, empty output, invalid JSON, or schema-validation failures are
written as status: "failed" with data: {}, so the scorer counts every labeled field
as an error instead of silently dropping the document.