AIFormatterNodeEditor Documentation
Purpose
The AIFormatterNodeEditor component is designed for use in the Vantage analytics and data platform, specifically within a workflow where data needs to be formatted and processed by an AI engine. This component allows users to specify how data is transformed into various output formats utilizing artificial intelligence, catering to different communication needs like emails, reports, chat messages, and more.
Settings
The AIFormatterNodeEditor offers several configurable settings that control its behavior and appearance. Below is a detailed breakdown of each setting:
1. Output Mode
- Name:
outputMode - Input Type: Dropdown
- Description: Specifies the format in which the data should be transformed. Users can choose from options like "Email", "Chat Message", "Report", "Executive Brief", "Bullet Points", "JSON Structure", and "Custom". Changing this will modify the structure of the output according to the selected format.
- Default Value: 'email'
2. Tone
- Name:
tone - Input Type: Dropdown
- Description: Defines the tone in which the output should be generated, influencing the language style. Available options include "Professional", "Friendly", "Urgent", and "Formal". The chosen tone adjusts the AI output's style to better fit the intended audience.
- Default Value: 'professional'
3. Prompt Template
- Name:
promptTemplate - Input Type: String (multiline text area)
- Description: A customizable input that allows users to specify the prompt given to the AI for transformation. Users can use placeholders such as
{{data}}to reference the incoming data and{{row_count}},{{columns}}for further customization. Resetting this option will revert it to the default prompt corresponding to the selected output mode. - Default Value: Varies by selected
outputMode(e.g., for 'email': "Transform the following data into a professional email...").
4. Max Rows
- Name:
maxRows - Input Type: Numeric (slider)
- Description: Limits the maximum number of rows that will be included from the input dataset for AI processing. A higher number of rows can provide richer context but may impact performance and billing. The user can slide this value between 50 and 500.
- Default Value: 200
5. Upstream Columns
- Name:
upstreamColumns - Input Type: List (display only)
- Description: Displays the columns of data available for processing upstream. This setting is read-only and is used to inform users of the data structure being passed into the AI transformation.
6. Output Fields
- Name:
outputFields - Input Type: List (display only)
- Description: Displays the potential outputs based on the selected
outputMode. This helps users understand what fields they can expect as results from the AI formatting process.
How It Works
When the AIFormatterNodeEditor is initialized, it reads the provided configuration for output mode, tone, prompt template, and maximum rows. The output mode determines the formatting rules applied to the incoming data, while the tone sets the intended style. Users can interact with the dropdowns and text area to update these settings.
Upon selection of the output mode, the component updates the prompt template to the default for that format, unless the user has modified it. When the component renders, it collects data from upstream columns, informing users about the available data that can be sent for formatting.
Changes made in the settings (like selecting a different tone or updating the maximum rows) alter the state of the component, which uses event handlers to trigger updates to its parent component through functions like updateField and updateFields.
AI Integrations
The AIFormatterNodeEditor is integrated with AI services that interpret and process text data. It acts as the intermediary, formatting data appropriately based on user configuration before it's sent to the AI engine. The quality of AI-generated outputs can be impacted by the maxRows setting due to the richness of the context provided to the AI.
Billing Impact
Utilizing the AIFormatterNodeEditor, especially with larger maxRows values, could impact billing depending on the pricing model of the AI service being utilized. Typically, processing more data may incur higher costs, thus users should be cognizant of the balance between context richness and operational expenses when configuring this node.
Use Cases & Examples
Use Case 1: Automated Reporting
Scenario: A business wants to generate weekly performance reports automatically.
Configuration:
- Output Mode: Report
- Tone: Professional
- Max Rows: 200
- Prompt Template: Uses the default report template.
Use Case 2: Customer Communication
Scenario: A customer support team requires concise messages for chat applications to quickly communicate issue resolutions.
Configuration:
- Output Mode: Message
- Tone: Friendly
- Max Rows: 100
- Prompt Template: Customizes prompt to better suit common inquiries and responses.
Detailed Example for Use Case 1: Automated Reporting
For generating automatic performance reports, the following configuration might be set:
{
"outputMode": "report",
"tone": "professional",
"promptTemplate": "Transform the following data into a structured report with sections.\n\nData:\n{{data}}",
"maxRows": 200
}This configuration allows the AI engine to summarize the specified data into a cohesive report, maintaining a professional tone suitable for internal stakeholders. The maxRows setting pulls relevant information efficiently without unnecessary overhead.
In this way, the AIFormatterNodeEditor streamlines data formatting tasks, enhancing productivity and decision-making within organizations.