JSON Generate Node Documentation
The JSON Generate node is used to produce structured JSON outputs from language model (LLM) prompts. It allows users to define a specific output schema, ensuring consistency and precision in data formatting for various applications.
The node is part of a larger workflow system, enabling seamless integration with other processes and providing a streamlined setup experience for developers. This functionality is particularly useful in contexts where structured data is needed from natural language inputs, such as generating recipes or other content where specific data fields are required.
Features
Key Functionalities
-
Generative Model Selection: Allows users to select credentials for their preferred generative model, ensuring flexibility and compatibility with various LLMs.
-
Customizable Prompts: Features a field for creating prompt templates, enabling tailored input for specific use cases.
-
System Prompt Definition: Includes an option to define a system-level prompt to guide the AI’s behavior, ensuring context-aware and role-specific responses.
-
Additional Properties Management: Offers expandable sections for configuring advanced properties to fine-tune AI-generated outputs.
Benefits
-
Flexibility: Supports integration with multiple LLMs, allowing users to utilize different models based on their specific needs and use cases.
-
User-Centric Design: Provides intuitive interfaces for prompt customization and system prompt definition, making it accessible to both beginners and advanced users.
-
Enhanced Control: Enables precise control over the AI’s behavior and output quality through customizable prompts and system configurations.
-
Scalability: Facilitates the creation of reusable prompt templates for diverse workflows, ensuring consistency across projects.
What can I build?
- Create AI-driven applications that require structured data output from natural language inputs.
- Develop automated systems for generating specific data formats for use in analytics and reporting.
- Build interactive tools that convert conversational inputs into structured JSON for use in various applications.
- Design workflows for content generation that require consistency in data formatting across different platforms.
Setup
Select the JSON Generate Node
- Fill in the required parameters.
- Build the desired flow
- Deploy the Project
- Click Setup on the workflow editor to get the automatically generated instruction and add it in your application.
Configuration Reference
Parameter | Description | Example Value |
---|---|---|
Generative Model Name | Select the model to generate text based on the prompt. | Gemini Model |
Prompt Template | Define the instructions for generating the text output.Define the instructions for generating the text output. | Tell me something about Bali |
System Prompt | System prompt to guide the LLM | You are Travel Planner |
Low-Code Example
nodes:
- nodeId: InstructorLLMNode_774
nodeType: InstructorLLMNode
nodeName: JSON Generator
values:
schema: |-
{
"type": "object",
"properties": {
"output": {
"type": "string"
}
}
}
promptTemplate: tell me something about ${{triggerNode_1.output.topic}}
attachments: '[]'
messages: '[]'
generativeModelName:
provider_name: mistral
type: generator/text
credential_name: Mistral API
credentialId: 32bf5e3b-a8fc-4697-b95a-b1af3dcf7498
model_name: mistral/mistral-large-2402
needs:
- triggerNode_1
Troubleshooting
Common Issues
Problem | Solution |
---|---|
Invalid API Key | Ensure the API key is correct and has not expired. |
Dynamic Content Not Loaded | Increase the Wait for Page Load time in the configuration. |
Debugging
- Check Lamatic Flow logs for error details.
- Verify API Key.