Skip to content

ai.extract

Operation: ai.extract
Category: ai
Tags: text, extraction, structured-data

Extract structured data from text using an AI provider

Type: AI Provider (routed via provider registry)
Timeout: 300s
Retries: 3 (ExponentialWithJitter)

NameTypeRequiredDefaultDescription
textStringNoText to extract data from
NameTypeDescription
extractedJSONExtracted structured data
raw_responseStringRaw provider response
{
"output_schema": {}
}
import { WorkflowBuilder } from "@fabric-platform/sdk";
const workflow = new WorkflowBuilder("my-workflow")
.node("ai-extract", "ai_invoke", (n) =>
n.config({
operation: "ai.extract",
// ... node-specific config
})
)
.build();
{
"key": "extract-metadata",
"operation": "ai.extract",
"config": {
"output_schema": { "title": "string", "topics": ["string"] },
"prompt_template": "Extract metadata from: {{context.transcript}}"
},
"inputs": [{ "name": "text", "path": "$context.transcript" }],
"outputs": [{ "name": "extracted", "path": "$context.metadata" }]
}

Extraction returned raw text instead of JSON

Section titled “Extraction returned raw text instead of JSON”

Cause: The AI provider response was not valid JSON matching the output_schema

Fix: Ensure output_schema is well-defined. The result will be wrapped as {“raw”: ”…”} if parsing fails