Overview

The Generate Questions Block uses AI capabilities to create a specified number of questions based on an input prompt and value. This block is particularly useful for expanding research activities, breaking down complex topics into manageable parts, or creating comprehensive question sets for various purposes.

Inputs

systemPrompt
string

The system prompt to send to the model. Optional. Used to provide high-level guidance to the AI model.

context
string | chat-message | chat-message[] | array

The context to generate related questions from. Optional. Can be a string, chat message, array of chat messages, or other array types that can be coerced to strings.

instruction
string

Available when using the “Blank” template. The instruction for generating questions.

question
string

Available when using the “Research Questions” template. The question to generate research queries for.

Outputs

questions
string[]

An array of generated questions based on the input context and prompts.

duration
number

The time in milliseconds that the block took to execute.

Editor Settings

AI Model
string
default:"default"

The AI model to use for generating questions. Available models are dynamically populated based on the LLM provider configuration. Only models supporting function calls are shown.

From Template
string
default:"Research Questions"

Choose from predefined templates:

  • Blank: A simple template with custom instruction
  • Research Questions: Template for generating Google search queries
Number of Questions
number
default:3

The number of questions to generate. Must be between 1 and 10.

Temperature
number
default:0.5

Controls randomness in the output. Lower values make the output more focused and deterministic.

Prompt Text
code

The prompt template text. Supports interpolation using variable syntax. Uses custom prompt interpolation highlighting.

Error Handling

The block will retry failed attempts up to 3 times with exponential backoff:

  • Minimum retry delay: 500ms
  • Maximum retry delay: 5000ms
  • Retry factor: 2.5x
  • Includes randomization
  • Maximum retry time: 5 minutes

Error messages will be logged for:

  • Invalid number of questions (must be 1-10)
  • Empty or invalid responses
  • API rate limits (will retry)
  • API timeouts (will retry)
  • Other API errors

Always review the generated questions for relevance and appropriateness, especially when using them for critical research or decision-making processes.

FAQ

See Also