Prebuilt Schema
ConceptsPrebuilt schemas are ready-to-use schema definitions for common document types. They define fields and instructions so you can start extraction without building a schema from scratch. Use them as-is or customize (add fields, modify instructions) for your use case.
Available Prebuilt Schemas
| Category | Schemas |
|---|---|
| Invoice | Invoice, Receipt, Purchase Order |
| Contract | Contract, NDA, Agreement |
| Resume | Resume, CV |
| Financial | Bank Statement, Tax Form |
| Form | W-9, W-4, 1099 |
Each prebuilt schema includes field definitions (names, types, required flags) and instructions that guide the LLM for zero-shot extraction.
Using Prebuilt Schemas
Create and use schemas via the v1 API (base URL: https://docld.com/api/v1). List your schemas with GET /v1/schemas; run extraction with POST /v1/extractions and a schema_id or inline fields / description. See Schemas and Extractions.
# List your schemas curl "https://docld.com/api/v1/schemas" -H "Authorization: Bearer docld_..." # Run extraction with a schema POST /v1/extractions { "document_id": "...", "schema_id": "s1a2b3c4-..." }
Prebuilt schema templates are available in the dashboard; use them as-is or copy and customize. Customization includes adding fields, modifying instructions, or changing field types.
Form Detection
DocLD can auto-detect document type and suggest a schema. In the dashboard, use the suggested-schema flow for mixed document types. Via API, use POST /v1/extractions with a description (10+ characters) to extract without a predefined schema; the API infers fields from the description.
Customization Flow
| Step | Description |
|---|---|
| Fetch | Retrieve a prebuilt schema via API |
| Copy | Create a copy for customization |
| Modify | Add fields, change instructions, adjust types |
| Save | Save as a custom schema |
| Use | Use the custom schema for extraction |
Instructions help the AI handle edge cases (e.g., "If tax is shown separately, extract as its own field"). Refine instructions based on extraction quality and ground truth feedback.
Best Practices
- Start with prebuilt — Use prebuilt schemas for common types before building custom
- Customize for edge cases — Add instructions for document variants (e.g., different invoice formats)
- Validate with ground truth — Use ground truth to measure accuracy of prebuilt vs custom schemas
Related Concepts
Prebuilt schemas are ready-made schemas for extraction. Zero-shot extraction works with prebuilt schemas without training. Ground truth measures extraction accuracy.