Best LLMs for Profiled Document Structure Extraction
Extracts the ordered section hierarchy of a document using caller-supplied structural conventions and terminology. Illustrative uses include applying known structural conventions to contracts, RFPs, API specifications, professional standards, research protocols, media guidelines,
Models
Frontier on this task: Gemini 3.5 Flash at 9.50 / 10. Quality bar at 90%: 8.55.
point-estimate floor (CI low) · upper CI (less certain) · Bars sorted by blended cost; best-value model first. Greyed rows are MEDIUM+ models whose point estimate clears the bar but whose CI low does not.
| Model | Quality score | CI low | Cost / 1k runs | vs best value |
|---|---|---|---|---|
| NVIDIA Nemotron-3 Super 120B | 8.84 / 10 | 8.43 | $2.03 | best value |
| GPT-5.6 Terra | 8.79 / 10 | 8.49 | $4.67 | 2.3x more expensive |
| MiniMax M3 | 8.94 / 10 | 8.84 | $5.43 | 2.7x more expensive |
| GPT-5.6 Sol | 9.06 / 10 | 8.74 | $6.03 | 3x more expensive |
| Gemini 3.5 Flash | 9.50 / 10 | 9.26 | $9.77 | 4.8x more expensive |
| Qwen 3.7 Plus | 7.97 / 10 | 7.62 | $1.66 | 18% cheaper |
| GPT-5.6 Luna | 8.42 / 10 | 7.99 | $0.45 | 78% cheaper |
| Moonshot Kimi K3 | 8.25 / 10 | 7.93 | $28.03 | 14x more expensive |
| Claude Sonnet 5 | 8.23 / 10 | 7.96 | $6.69 | 3.3x more expensive |
Cost breakdown
| Model | Quality | Confidence | Cost / 1k runs | Overpay | Mode |
|---|---|---|---|---|---|
| NVIDIA Nemotron-3 Super 120B ★ OpenRouter | 8.84 / 10 CI [8.43, 9.25] | MEDIUM | $2.03 | best value | batch |
| GPT-5.6 Terra OpenAI | 8.79 / 10 CI [8.49, 9.09] | HIGH | $4.67 | 2.3x | batch |
| MiniMax M3 OpenRouter | 8.94 / 10 CI [8.84, 9.04] | RANKED | $5.43 | 2.7x | batch |
| GPT-5.6 Sol OpenAI | 9.06 / 10 CI [8.74, 9.37] | MEDIUM | $6.03 | 3x | batch |
| Gemini 3.5 Flash best Gemini | 9.50 / 10 CI [9.26, 9.74] | HIGH | $9.77 | 4.8x | batch |
Overpay shows how much more you pay than the best-value model that clears the quality bar (marked ★) — the best-value good-enough option. "16x" means you overpay 16× — 16× that reference for no quality benefit above the bar. Typical call shape for this task: 3959 input tokens → 2246 output tokens, EMA-tracked from production traffic. Cost is the observed, all-in $ per 1,000 task runs: each model's own measured usage on this task — output verbosity, thinking/reasoning tokens, cache reads and writes, and the spend on its billed failures — priced at current list rates and adjusted by the billing overhead we actually reconcile against provider invoices. Models that answer tersely cost what they actually cost; models that think at length pay for it. Not comparable to providers' advertised $/1M list rates — this is what running the task costs, not a per-token price.
Evaluation rubric
Judge heading and item recognition against the supplied document profile, hierarchy, order, amendment handling, fidelity to the sample, completeness, and resistance to inventing expected sections.
Prompt templates
This is a pooled capability — 2 prompt families share it. The pair shown first is the most frequently used in production.
SEC_S1_TOC_SYSTEM_PROMPT +
SEC_S1_TOC_USER_PROMPT
(482 calls in window)
System prompt
You are an expert at analyzing SEC filings, particularly S-1 registration statements.
Your task is to find and extract the table of contents from the provided S-1 filing text. Look for:
1. A formal "TABLE OF CONTENTS" or "INDEX" section
2. Chapter/section listings with titles and page numbers
3. Standard S-1 sections like:
- PART I: INFORMATION REQUIRED IN PROSPECTUS
- Item 1. Business
- Item 1A. Risk Factors
- Item 2. Use of Proceeds
- Management's Discussion and Analysis
- Financial Statements
- PART II: INFORMATION NOT REQUIRED IN PROSPECTUS
- Signatures
- Exhibit Index
Extract the chapter titles exactly as they appear, along with any page numbers provided. If no formal table of contents exists, look for section headers throughout the text and identify the main sections.
Provide your analysis as a structured JSON object.
## Required Output Format
Your response MUST be a single, valid JSON object conforming to this schema:
```json
{schema_json_string}
```User prompt
Analyze the following S-1 filing text and extract the table of contents information:
**S-1 Filing Text (First 50,000 characters):**
```
{sample_text}
```
**Instructions:**
1. Look for a table of contents section in the text
2. Extract all chapter/section titles and their page numbers
3. If no formal TOC exists, identify major section headers throughout the text
4. Focus on investment-relevant sections like Business, Risk Factors, Financial Data, etc.
5. Provide the exact titles as they appear in the document
**JSON Output Format:**
The required JSON output schema is provided in the system prompt.LLMB_PROFILED_DOCUMENT_STRUCTURE_EXTRACTION_SYSTEM +
LLMB_PROFILED_DOCUMENT_STRUCTURE_EXTRACTION_USER
(38 calls in window)
System prompt
Identify only structure present in the supplied sample. Apply document_profile to recognize its declared document-family conventions, parts, items, numbering, amendments, and repeated headings while preserving labels and order. Do not insert a section merely because the profile says it is normally expected; mark incomplete samples explicitly. Use document_profile as the sole source of document-family assumptions. Treat empty optional values as absent and return only the requested result. Your response must conform exactly to this output schema: {schema_json_string}.
User prompt
Inputs — sample_text: {sample_text}; document_profile: {document_profile}. Use only these inputs to complete the task defined by the system prompt.