structured-extraction

Public

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).

9 prompts
README

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

PromptWhat it does
sentiment-analysisOverall sentiment (positive / negative / neutral / mixed) with rationale + confidence.
text-classificationAssign text to a caller-supplied label set, with an optional fallback.
entity-extractionNER for people, orgs, locations, dates, money, and more — each normalized.
pii-detectionDetect and redact PII; returns typed spans plus a redacted copy.
key-information-extractionGeneric "messy text → your fields" extractor.
invoice-extractionStrongly-typed invoice/receipt parsing (a specialization of the above).
structured-summarization{title, key_points, action_items, entities_mentioned} — not prose.
address-parsingUnstructured address string → structured components + confidence.
date-event-extractionEvents 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:

  1. Reasoning before the verdict. Classification and scoring prompts put a reasoning/rationale field first and pin the key order in the system prompt. Reasoning that precedes the answer informs it; reasoning that follows just rationalizes it.
  2. No hallucinated fields. Anything not present in the input comes back null or an empty array — never invented. This is stated explicitly in each prompt.
  3. Confidence is uncalibrated. Where a confidence score 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.
  4. 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.
  5. Strict schemas. additionalProperties: false, complete required arrays, closed enums, and bounded numbers throughout.
  6. 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.
  7. 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.

Prompts9 prompts
@sufleurstructured-extraction