Brainstorming
Brainstorming helps improve research quality by generating clarifying questions before executing a query. This is useful when a query is ambiguous or could be interpreted multiple ways.
When to use brainstorming
- The query is broad (e.g., “best practices for authentication”)
- Multiple interpretations are possible (e.g., “compare React frameworks”)
- You want more targeted, relevant results
How it works
- Submit your query to the brainstorm endpoint
- Receive 2-7 clarifying questions with multiple-choice options
- Collect answers from the user (or skip questions that aren’t relevant)
- Submit the research request with the brainstorm session and answers
- The research runs with the additional context, producing more focused results
Step 1: Generate clarifying questions
Response:
Step 2: Submit research with answers
Using selected options (0-indexed)
Using custom text (overrides predefined options)
When the predefined options don’t fit your needs, use custom_text to provide a free-form answer:
Skipping questions
To skip a question, simply omit it from the answers array. Only include answers for questions you want to influence the research:
In this example, only q1 is answered. Question q2 is skipped and won’t influence the research context.
Answer format
Each answer requires:
question_id(required): The ID of the question being answeredselected_option(optional): 0-based index into the options arraycustom_text(optional): Free-form text that overridesselected_option
You must provide either selected_option or custom_text (not both empty). If both are provided, custom_text takes precedence.
Notes
A brainstorm session can only be used once. After submitting research with a session, its status changes to “used” and cannot be reused.
If you provide a brainstorm session but skip all questions (empty answers array), the research will proceed but you’ll receive a warning in the response.
Optional usage: Brainstorming is entirely optional. You can always call POST /research directly without a brainstorm session.
No questions needed: If your query is already specific enough, the brainstorm response may return an empty questions array. In this case, proceed directly to research without a session.