Extract Data AI
The Extract Data AI component extends the Generic LLM component by allowing the model to output multiple distinct responses through different output handles. This is particularly useful for tasks that require breaking down information, making decisions between options, or creating structured multi-part responses.
Credit Cost
Same as Generic LLM.
Usage
The Extract Data AI component inherits all functionality from the Generic LLM component but adds the ability to configure multiple output splits. Each split creates a dedicated output handle that can carry different parts of the model's response based on your configuration.
Common use cases include:
- Breaking down complex data into structured parts
- Decision making between multiple options
- Creating step-by-step plans with separate outputs
- Categorizing or routing information differently based on content
- Extracting specific aspects from a larger context
Variable Handling
Identical to Generic LLM.
Properties
Inherits all properties from Generic LLM and adds:
System Prompt
- Type: text
- Description: Where you provide the instructions for the LLM on how to process and split the data. You should refer to the splits as "fields" in your instructions for better LLM understanding. Supports {{variable}} syntax for dynamic content.
Data
- Type: text
- Description: The actual content that needs to be processed and split according to the system prompt instructions. Supports {{variable}} syntax for dynamic content.
Splits
- Type: list of objects
- Description: Configure multiple output paths for the LLM's response
- Fields per split:
- Name: The identifier for the split, used to reference it in the system prompt
- Required: Whether this split must always output data
- Description: Explains what kind of data should be output through this split and under what conditions
Examples
Decision Making
{
"system_prompt": "You are a content classifier. Analyze the input text and route it to the appropriate fields. Use the 'urgent' field only for time-sensitive matters that require immediate attention. Use the 'normal' field for standard business matters. Use the 'archive' field for reference materials or non-actionable content.",
"data": "{{input_text}}",
"splits": [
{
"name": "urgent",
"required": false,
"description": "Output the content here if it requires immediate attention or has urgent deadlines"
},
{
"name": "normal",
"required": false,
"description": "Output the content here if it's a standard business matter"
},
{
"name": "archive",
"required": false,
"description": "Output the content here if it's for reference or doesn't require action"
}
]
}
Data Dissection
{
"system_prompt": "You are a resume analyzer. Break down the following resume into the specified fields. Each field should contain the relevant information from the resume.",
"data": "{{resume_text}}",
"splits": [
{
"name": "personal_info",
"required": true,
"description": "Extract and output contact information and personal details"
},
{
"name": "experience",
"required": true,
"description": "Extract and output work experience entries"
},
{
"name": "education",
"required": true,
"description": "Extract and output educational background"
},
{
"name": "skills",
"required": true,
"description": "Extract and output technical and soft skills"
}
]
}
Step-by-Step Planning
{
"system_prompt": "You are a project planner. Break down the following project description into three fields representing different phases. Each field should contain detailed and actionable steps.",
"data": "{{project_description}}",
"splits": [
{
"name": "phase_1",
"required": true,
"description": "Output the initial phase steps and requirements"
},
{
"name": "phase_2",
"required": true,
"description": "Output the intermediate phase steps and dependencies"
},
{
"name": "phase_3",
"required": true,
"description": "Output the final phase steps and completion criteria"
}
]
}
Important Notes
- Split names should be descriptive and guide the LLM's understanding of their purpose
- Required splits must always output data
- Non-required splits can output empty data when not applicable
- When writing the system prompt, refer to splits as "fields" for better LLM understanding (e.g., "Output to the 'summary' field" instead of "Output to the 'summary' split")
- Each split's description should be specific about what kind of data it expects