← IBM Granite 3.0 2B Instruct

Practical · text-generation · on-device

Enterprise document → structured JSON

The task Granite was tuned for: read a business record — an invoice, a contract clause, a support ticket — and emit clean, schema-shaped JSON your ERP, CRM or workflow can consume, with nothing leaving the device. Pick a document type, paste your own, and extract it. The page then parses the JSON to prove it's real, machine-readable output. This is on-device document processing for data that can't go to a third-party API.

Run it

Target schema

Changes with the document type — the system prompt fixes the exact keys.

Raw model output

The model's JSON appears here as it streams.

Parsed JSON.parse() result

If the output is valid JSON, the parsed object shows here.

Why this pattern works

A system prompt fixes the exact schema for each document type and demands "JSON only, no prose"; greedy decoding keeps the output deterministic — important for a governed pipeline. The page strips any stray code fences and runs JSON.parse() — the honest test of whether the model produced machine-readable output. Granite's enterprise tuning shows up here as reliable adherence to the requested keys. In production you'd validate against a real JSON Schema and re-prompt on a miss; the shape is the same.

Next rung: Wild — the synthetic data factory →