--- spec: openflange.org/pipe/v0.1 id: llm-extract version: 0.1.0 title: LLM structured extraction, validated description: Extracts rating, topic and e-mail address from feedback text with a language model and validates every result against a JSON Schema. Ships with a deterministic mock provider. license: Apache-2.0 keywords: [llm, ai, extraction, structured-output, json-schema, validation, composite, mock, example] maturity: experimental scope: record inputs: feedback: description: 'Feedback records: {"id", "text"}.' outputs: extracted: description: 'Results that match the schema: {"id", "rating" (1–5), "topic", "email"}.' schema: format: json-schema definition: type: object required: [id, rating, topic, email] additionalProperties: false properties: id: {} rating: {type: integer, minimum: 1, maximum: 5} topic: {enum: [delivery, billing, support, other]} email: {type: [string, "null"]} rejected: required: false description: 'Model results that do not match the schema, as {"item", "errors"}. If not connected, the first invalid result fails the run.' implementation: type: pipeline path: pipeline.yaml permissions: subprocess: true --- # LLM structured extraction, validated Implements the [OpenFlange](https://openflange.org/) specification. A model's "structured output" is a promise, not a guarantee. This composite puts `std:validate-schema` directly behind the model, so that downstream pipes only ever see records that match the schema. See [../README.md](../README.md). - Results that match go to `extracted`. - Results that do not (no rating in the text, a rating of 9, …) go to the optional output `rejected` as `{"item", "errors"}`. If `rejected` is not connected, the first invalid result **fails the run** — it is never dropped. - The provider is a **mock** (deterministic, offline, free; not a real model). Permissions: `subprocess`, for the model node only.