Infer custom schema from document sample
Generate a reusable JSON Schema tailored to a specific document type, allowing for consistent extraction of custom fields across future documents of the same type.
How it works
Read-onlyData and analysis
The agent takes a representative text sample of a unique document type and sends it to the schema inference endpoint. It reviews the proposed fields and schema structure, then saves this schema for use in subsequent parsing tasks to ensure consistent output.
Prompt
Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.
Prompt for Infer custom schema from document sample
Infer a JSON schema from this lab report sample: 'LAB REPORT\nPatient: Jane Doe\nGlucose: 92 mg/dL'. Return the schema and fields.MCP servers it needs
Source
The vendor page this playbook is drawn from, and the passage that supports it.
Infer once, review it, then pass it as schema on parse a document or parse text across every document of that type for consistent output.Docs — AIDataParser API