Skip to main content

AI Write Data

Controlled node

Overview

AI Write Data generates structured JSON data using a large language model based on a provided prompt and schema. Unlike the standard AI Write node which produces free-form text, this node constrains the AI output to match a specific JSON Schema structure, making it ideal for extracting structured information, generating data objects, or creating API-compatible outputs.

By default, the output is locked to a seed (1) for reproducibility. Select "Randomize Output" to generate different results on each run. If inputs remain unchanged and randomization is disabled, results are cached for faster development.

Model options

Intellectible provides several models optimized for structured data generation:

ModelDescriptionContext Size
standardState of the art instruction tuned model suitable for most data generation tasks128000
advanced reasoning 2Excellent for complex reasoning tasks and structured data extraction; nearly 10x more expensive than standard128000
large contextVery large context window model for processing extensive inputs10000000
Do not exceed the context window

Your AI Write Data operation will fail if the combined token count of your prompt, schema, and expected output exceeds the model's context window. Use the Token Count node to verify token counts before running.

Schema support

The node accepts a Schema input that defines the structure of the generated data. This can be:

  • A valid JSON Schema object
  • An example object (automatically converted to JSON Schema)

The AI will attempt to generate output conforming to this schema. Missing fields in the generated output are populated with default values defined in the schema.

Inputs

InputTypeDescriptionDefault
ModelEnumThe model to use for data generation.standard
PromptTextInstructions describing what data to generate or extract.-
SchemaSchemaJSON Schema or example object defining the output structure.-
Max TokensNumberMaximum number of tokens to generate.5000
TemperatureNumberControls creativity/randomness (0.0-1.0). Lower values produce more deterministic outputs.0.7
SeedNumberRandom seed for reproducible results.1
Randomize OutputBooleanIf checked, ignores seed and produces different outputs each run.-
RunEventTriggers the node to execute.-

Outputs

OutputTypeDescription
OutputDataThe generated structured data (parsed JSON object).
DoneEventFires when generation completes successfully.

Runtime behavior and defaults

When triggered, the node:

  1. Validates the schema input (converts to JSON Schema if necessary)
  2. Checks the cache for identical inputs (unless Randomize Output is enabled)
  3. Sends the prompt and schema to the selected AI model with JSON output constraints
  4. Parses the returned JSON and applies default values for any missing schema fields
  5. Outputs the resulting data object

Default values:

  • Model: standard
  • Max Tokens: 5000
  • Temperature: 0.7
  • Seed: 1

Example

Scenario: Extract structured contact information from unstructured text.

  1. Create a Schema node (or use a Dictionary node) defining the expected structure:

    {
    "name": "string",
    "email": "string",
    "phone": "string"
    }
  2. Connect the Schema output to the AI Write Data node's schema input.

  3. Connect a Text node containing unstructured data to the prompt input:

    Extract contact info from: "John Doe can be reached at john@example.com or 555-0123"
  4. Trigger the Run event.

  5. The Output will contain:

    {
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "555-0123"
    }

Tip: For complex data extraction, use the advanced reasoning 2 model to improve accuracy with nested objects and conditional fields.