structured-extraction
Turn unstructured text into typed, validated JSON — sentiment, classification, entities, PII, invoices, summaries, addresses, and events. The flagship collection: every prompt ships a strict output schema and follows house conventions (reasoning-first, no hallucinated fields, uncalibrated confidence).
Structured Extraction
Turn unstructured text into typed, validated JSON — sentiment, classifications, entities, PII, invoices, summaries, addresses, and events. Every prompt ships a strict output schema, so the generated SDK gives you a real type and a parseOutput() you can trust, not a string you have to babysit.
This is the flagship Sufleur collection and a reference for the conventions we hold every official prompt to.
Prompts
| Prompt | What it does |
|---|---|
sentiment-analysis | Overall sentiment (positive / negative / neutral / mixed) with rationale + confidence. |
text-classification | Assign text to a caller-supplied label set, with an optional fallback. |
entity-extraction | NER for people, orgs, locations, dates, money, and more — each normalized. |
pii-detection | Detect and redact PII; returns typed spans plus a redacted copy. |
key-information-extraction | Generic "messy text → your fields" extractor. |
invoice-extraction | Strongly-typed invoice/receipt parsing (a specialization of the above). |
structured-summarization | {title, key_points, action_items, entities_mentioned} — not prose. |
address-parsing | Unstructured address string → structured components + confidence. |
date-event-extraction | Events with resolved ISO 8601 start/end times. |
House conventions
Every prompt in this collection follows the same rules — they're what make the output dependable:
- Reasoning before the verdict. Classification and scoring prompts put a
reasoning/rationalefield first and pin the key order in the system prompt. Reasoning that precedes the answer informs it; reasoning that follows just rationalizes it. - No hallucinated fields. Anything not present in the input comes back
nullor an empty array — never invented. This is stated explicitly in each prompt. - Confidence is uncalibrated. Where a
confidencescore is offered, the schema says plainly that LLM self-reported confidence is not a probability — use it as a rough signal for routing and review, nothing more. - Spans use matched-text + occurrence index. Span-based prompts (
entity-extraction,pii-detection) locate each hit by its exact text and a 1-based occurrence count, never character offsets — which models produce unreliably. - Strict schemas.
additionalProperties: false, completerequiredarrays, closedenums, and bounded numbers throughout. - Safe inputs. User content is injected with triple-mustache (so
&,<,"are never HTML-escaped) and wrapped in XML-style delimiters for clarity and injection-resistance. - Parameterized, not hardcoded. Every prompt exposes at least one meaningful variable beyond the raw input (a label set, a type filter, a reference date, a locale hint).
A note on runtime-defined outputs
A couple of prompts take their value set at runtime (text-classification's labels, key-information-extraction's fields). Because the output schema is fixed per version, parseOutput() can't verify that a returned label/field is one you asked for — add a one-line membership check in your code. Each such prompt's page calls this out.