Back to guide/General Productivity

Structured Data Extraction

DeepSeek follows strict output format instructions reliably. Specifying null for missing fields prevents hallucinated data. The 'return only valid JSON' instruction combined with a concrete schema produces output you can parse programmatically without cleanup.

deepseek-promptssourceTypesourceContenttargetSchema
Edit View
Prompt
Extract structured data from the following {{sourceType}}:

<source>
{{sourceContent}}
</source>

**Extract into this exact JSON structure:**
\`\`\`json
{{targetSchema}}
\`\`\`

**Extraction rules:**
- Use null for fields not found in the source (never invent data)
- Normalize dates to ISO 8601 format ({{dateTimezone}})
- Normalize {{fieldToNormalize}} to {{normalizationRule}}
- If a field has multiple possible values, use the most specific one
- For arrays, maintain the order they appear in the source

Return only valid JSON. No explanations, no markdown formatting around the JSON.

Variables to customize

{{sourceType}}{{sourceContent}}{{targetSchema}}{{dateTimezone}}{{fieldToNormalize}}{{normalizationRule}}

Why this prompt works

DeepSeek follows strict output format instructions reliably. Specifying null for missing fields prevents hallucinated data. The 'return only valid JSON' instruction combined with a concrete schema produces output you can parse programmatically without cleanup.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.