← All models · Llama 3.2 1B

use case · practical

Practical: text → structured JSON

The most shippable LLM trick: extract clean, typed data from messy human text. Paste a note, email, or message and the model returns strict JSON matching a schema — using WebLLM's JSON mode so the output always parses. All on-device, so the source text (often sensitive) never leaves.

The JSON result streams here.

How this stays reliable

We pass response_format: { type: "json_object" } to WebLLM, which constrains decoding so the tokens can only ever form valid JSON — no regex clean-up, no "sometimes it adds prose" failure mode. The field list becomes part of the prompt; the model fills each key or uses null when the text doesn't say. Combined with a low temperature, that's a dependable extraction pipeline with zero server calls.

← Basics · Llama 3.2 1B · Next: Wild →