Skip to main content

How to Define JSON Structure Output for Your AI Assistant

Welcome to the guide on configuring JSON structure output for your AI Assistant! This feature allows you to customize how your assistant delivers structured responses, ensuring the output always meets your specific needs.


πŸš€ Why Define a JSON Structure?​

By defining a JSON structure, you can organize the AI Assistant's responses into a clear and consistent format. This is useful for:

  • Generating structured data for APIs, reports, or content creation.
  • Automating workflows that need specific data formats.
  • Extracting information from unstructured data, like documents or research papers.

Example:

If you're building a blog content generator, your AI Assistant can provide results like:

{
"blog_type": "informational",
"blog_titles": ["Top 10 Marketing Trends", "How to Boost Sales"],
"blog_headings": ["Introduction", "Trend Analysis", "Conclusion"],
"keywords": [
{"name": "digital marketing", "description": "Focus on marketing strategies"},
{"name": "SEO", "description": "Include SEO tips"}
]
}

πŸ€– Auto-Configure Parameters with AI​

Setting up your AI Assistant's JSON response structure has never been easier! With the Auto-Configure Parameters feature, you can let the AI handle the setup for you. Simply describe how you want the AI Assistant to respond, or provide a JSON example, and the system will automatically generate the necessary parameters.


Why Use Auto-Configure?​

Manually defining parameters one by one can be time-consuming, especially if you need a complex structure. With this feature, you can:

  • Quickly generate a structured response format by just describing it.
  • Easily convert a JSON example into a complete parameter setup.
  • Save time and avoid manual configuration errors.

How to Use Auto-Configure​

Step 1: Open the Auto-Configure Tool​

  1. In the JSON Structure Response section, look for the ✨ Auto-Configure Button next to the βž• Add Parameter button.
  2. Click the ✨ Auto-Configure Button to open the configuration modal.

Step 2: Describe Your Desired Output or Provide a JSON Example​

  1. In the modal, you'll see an input box
  2. You can describe the response format in natural language or paste a JSON example. Examples:
    • "The AI Assistant must always return me a list of blog titles, blog headings, and keywords to focus on in my blog post."
    • "It must return the product URL, product name, price, and description."
    • "It has to respond with a JSON based on this example: {"fruit": "Apple", "size": "Large", "color": "Red"}*
  3. Click the "Configure Output Format" button to proceed.

Step 3: Review and Edit the Generated Parameters​

  1. After the AI finishes, your parameter list will be overwritten with the newly generated structure. ⚠️ Important: If you already had parameters defined, they will be replaced.
    • Tip: Review the changes carefully before saving.
    • If you save the AI Assistant with these new parameters, your previous setup will be lost.
  2. Review the auto-generated parameters and make any necessary edits.
    • You can reorder, modify, or delete fields as needed.
    • Add or adjust nested parameters for more complex structures.
  3. Once satisfied, save the updated configuration.

Example Walkthrough​

User Input:​

"I need the AI to provide the product name, price, availability, and product details (like size and color)."

AI-Generated Parameters:​

{
"product_name": "Wireless Headphones",
"price": 59.99,
"availability": true,
"product_details": {
"size": "Medium",
"color": "Black"
}
}

How the AI Configured It:​

  1. product_name β†’ Text
    • Instructions to AI (may differ): "Provide the product name."
  2. price β†’ Decimal
    • Instructions to AI (may differ): "Provide the product price."
  3. availability β†’ Boolean
    • Instructions to AI (may differ): "Is the product available?"
  4. product_details β†’ Object
    • Nested Parameters:
      • size β†’ Text ("Provide the product size."(may differ))
      • color β†’ Text ("Provide the product color."(may differ))

Important Notes​

  • Overwriting Warning: Once the AI auto-generates the parameters, your existing configuration will be overwritten. ⚠️ Be cautious! If you save without reviewing, your previous setup will be lost.
  • Manual Edits Recommended: After auto-configuration, always review and adjust the generated parameters to make sure they fit your exact needs.
  • No Coding Required: Just describe what you needβ€”the AI takes care of the rest!

πŸ“ Step-by-Step Guide to Configuring JSON Output Manually​

1. Add a New Parameter​

  • Click the βž• button to add a new parameter.
  • Set the Parameter Name (e.g., blog_type).
  • Choose the Parameter Type (e.g., Text, Number, Object).
  • In the Advanced tab you will find options like:
    • Is Optional - if checked the parameter may be skipped
    • Default Value - if defined and the parameter is skipped, it will be populated with this value
    • Enum Options - available for Text, Number and Decimal types, enables your AI Assistant to pick one value from these options

πŸ“Œ Tip: Use simple, clear names in lowercase with underscores (e.g., product_name).


2. Select the Parameter Type​

Here’s a breakdown of the available parameter types:

Parameter TypeDescriptionExample
TextPlain text"blog_type": "informational"
NumberWhole numbers"quantity": 10
DecimalNumbers with decimals"price": 19.99
BooleanYes/No, True/False values"is_active": true
ObjectA group of nested parameters"author": {"name": "Alex"}
DictionaryFlexible key-value pairs"details": {"color": "red"}
List Of TextsA list of text items"tags": ["AI", "Tech"]
List Of NumbersA list of numbers"ratings": [5, 4, 3]
List Of ObjectsA list of structured objectsSeeNested Parametersbelow

3. Guide the AI Assistant​

  • Instructions to AI Assistant: Explain how the AI should complete this parameter. Example: "Choose between informational, educational, or transactional."
  • Default Value: Set a value that the AI will use if no input is provided.
  • Is Optional?:
    • If checked, the AI may provide a value or skip it.
    • If a default value is set and the AI skips it, the default will be used.
    • If unchecked (required), the AI will always provide a value.
  • Autofill by AI Assistant:
    • If checked, the AI can automatically fill this parameter.
    • If unchecked, the parameter will not be filled by the AI, and the default value will always be used.

4. Use Enum Options for Fixed Choices​

If you want the AI to choose from specific values, you can define Enum Options.

πŸ”§ Example Setup:

  • Parameter Name:blog_type
  • Type: Text
  • Enum Options:
    • Informational
    • Educational
    • Transactional

Now, the AI will only choose from these options.


5. Configure Nested Parameters for Objects & Lists​

For Object or List Of Objects types, you can define nested parameters.

πŸ“Œ Example: Adding Keywords with Descriptions

  • Parameter Name:keywords
  • Type: Object
  • Nested Parameters:
    • name (Text): The keyword.
    • description (Text): Why this keyword is important.

AI Response:

"keywords": [
{"name": "AI tools", "description": "Focus on AI automation"},
{"name": "workflow", "description": "Discuss optimizing workflows"}
]

🎯 Real-Life Example: Extracting Research Paper Details in JSON Format​

In this guide, you'll learn how to configure your AI Assistant to search for research papers online, scrape key information, and return the data in a structured JSON format.

To achieve this, we'll connect the AI Assistant to the Web Browser and Web Scraper tools, enabling it to search for research papers and extract the necessary information.


Target JSON Structure​

Here’s the final JSON output we want the AI Assistant to generate:

{
"title": "Application of Quantum Algorithms in Interstellar Navigation: A New Frontier",
"authors": [
"Dr. Stella Voyager",
"Dr. Nova Star",
"Dr. Lyra Hunter"
],
"abstract": "This paper investigates the utilization of quantum algorithms to improve interstellar navigation systems. By leveraging quantum superposition and entanglement, our proposed navigation system can calculate optimal travel paths through space-time anomalies more efficiently than classical methods. Experimental simulations suggest a significant reduction in travel time and fuel consumption for interstellar missions.",
"keywords": [
"Quantum algorithms",
"interstellar navigation",
"space-time anomalies",
"quantum superposition",
"quantum entanglement",
"space travel"
],
"publication_info": {
"journal_name": "Astrophysics and Quantum Mechanics Journal",
"year": 2024,
"doi": "10.1234/aqmj.2024.56789"
}
}

Step-by-Step Guide to Configure This JSON Output​

Step 1: Add the Root Parameters​

We'll start by defining the main fields in the JSON structure.

  1. Title
    • Parameter Name:title
    • Type: Text
    • Instructions to AI Assistant: "Extract the title of the research paper."
  2. Authors
    • Parameter Name:authors
    • Type: List of Texts
    • Instructions to AI Assistant: "List all authors of the research paper."
  3. Abstract
    • Parameter Name:abstract
    • Type: Text
    • Instructions to AI Assistant: "Extract the abstract section of the research paper."
  4. Keywords
    • Parameter Name:keywords
    • Type: List of Texts
    • Instructions to AI Assistant: "Extract relevant keywords from the research paper."

Step 2: Configure the Nested Object – publication_info​

Now, let's configure the nested object to include publication details like the journal name, publication year, and DOI.

  1. Parameter Name:publication_info
    • Type: Object
    • Instructions to AI Assistant: "Provide publication details for the research paper."
  2. Nested Parameters:
    • journal_name
      • Type: Text
      • Instructions to AI Assistant: "Extract the name of the journal where the paper was published."
    • year
      • Type: Number
      • Instructions to AI Assistant: "Extract the publication year of the research paper."
    • doi
      • Type: Text
      • Instructions to AI Assistant: "Extract the DOI (Digital Object Identifier) of the research paper."

Step 3: Enable the Web Browser and Web Scraper Tools​

To allow the AI Assistant to search for and extract research paper data, you need to connect the Web Browser and Web Scraper tools.

  1. Open the AI Assistant Tools tab.

  2. Add Tools:

    • Configure Web Browser to let the AI search for research papers online.
    • Configure Web Scraper to allow the AI to extract structured data from research paper websites.

πŸ”Ž How It Works:

  • The Web Browser will search for relevant research papers.
  • The Web Scraper will extract the required information and structure it according to your JSON setup.

Step 4: Final Check & Save​

  1. Review all parameters to ensure they are correctly configured.
  2. Use the up/down arrows to organize the parameter order. ⚠️ Note: Once saved, the order of existing parameters cannot be changed.
  3. Save the AI Assistant.

Detailed Parameter Configuration Summary​

Parameter NameTypeInstructions to AI Assistant
titleTextExtract the title of the research paper.
authorsList of TextsList all authors of the research paper.
abstractTextExtract the abstract section of the research paper.
keywordsList of TextsExtract relevant keywords from the research paper.
publication_infoObjectProvide publication details for the research paper.
└──journal_nameTextExtract the journal name.
└──yearNumberExtract the publication year.
└──doiTextExtract the DOI (Digital Object Identifier).

Final AI Response Example​

Once everything is set up, the AI Assistant will generate structured responses like this:

{
"title": "Application of Quantum Algorithms in Interstellar Navigation: A New Frontier",
"authors": [
"Dr. Stella Voyager",
"Dr. Nova Star",
"Dr. Lyra Hunter"
],
"abstract": "This paper investigates the utilization of quantum algorithms to improve interstellar navigation systems. By leveraging quantum superposition and entanglement, our proposed navigation system can calculate optimal travel paths through space-time anomalies more efficiently than classical methods. Experimental simulations suggest a significant reduction in travel time and fuel consumption for interstellar missions.",
"keywords": [
"Quantum algorithms",
"interstellar navigation",
"space-time anomalies",
"quantum superposition",
"quantum entanglement",
"space travel"
],
"publication_info": {
"journal_name": "Astrophysics and Quantum Mechanics Journal",
"year": 2024,
"doi": "10.1234/aqmj.2024.56789"
}
}

🧐 Common Questions Answered​

❓ Do I need coding skills to use this feature? πŸ‘‰ No! It's all done through a user-friendly interface with dropdowns and text fields.

❓ What happens if I don’t configure a parameter? πŸ‘‰

  • If the parameter is optional, the AI may provide a value or skip it.
  • If a default value is set and the AI skips it, the default will be used.
  • If the parameter is required, the AI will always provide a value.

❓ Can I change the order of the parameters? πŸ‘‰ Yes! Use the up/down arrows next to each parameter to reorder them before saving. ⚠️ Once saved, the order cannot be changed for existing parametersβ€”only for newly added ones.

πŸ”‘ Key Takeaways​

  • Customizable: Define exactly how your AI Assistant structures its responses.
  • User-Friendly: Set up parameters without any coding.
  • Consistent Output: Get reliable, structured data every time.

Ready to create your structured AI responses? Start defining your JSON output now!


πŸ’‘ Need help? If you have any questions, reach out to our support team. We're here to assist you!