TokenToSeaPrompt Hub
中文 Console

Schema-Based JSON Extraction

Data Analysis·Template

Use in Chat

Extracts fields from unstructured text according to a given JSON Schema, outputting only valid JSON and using null for missing fields.

Fill in variables

The prompt below and the copied text update as you type.

# Task
Extract information from the text below and output JSON that strictly conforms to the JSON Schema.

# JSON Schema
{{schema}}

# Text
"""
{{text}}
"""

# Rules
1. Output only JSON: no explanations, prefixes, suffixes or Markdown code fences.
2. Field names, types and enum values must match the schema exactly.
3. Use null for fields not found in the text; use [] for array fields not found.
4. Do not infer or fill in information that is not in the text.
5. Where the schema does not specify a format, write dates as YYYY-MM-DD and numbers without thousands separators.
6. When there are multiple entities, output them in the order they appear in the text.