> For the complete documentation index, see [llms.txt](https://help.metaforms.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.metaforms.ai/best-practices/ai-question-generation-batch-size-guide-confirmit.md).

# AI Question Generation - Batch Size Guide (Confirmit)

This document explains the recommended workflow for AI-assisted question generation on Metaforms — a co-programming platform where you and the AI build the survey together. It covers three generation tiers — 5-question batches for standard work, 3-question batches for moderate complexity, and single-question generation for complex setups — plus conditions for using 10-question batches responsibly. It includes a prompt guide with good and bad examples, and outlines common pitfalls. The goal is to maximize AI output accuracy and minimize rework.

## Metaforms Is a Co-Programming Platform

Before getting into batch sizes, it's important to understand what Metaforms is — and what it isn't.

Metaforms is a **co-programming platform**, not a full automation solution. The AI is your programming partner: it dramatically accelerates scripting, but you remain the programmer. Your survey knowledge, your review, and your judgment are part of the workflow — not optional extras on top of it. The AI cannot replace survey knowledge, especially when key logic, sample requirements, or programming instructions are not explicitly documented in the questionnaire.

This is why the entire workflow in this guide is built around a **Generate → Verify → Fix → Next batch** cycle rather than a single generate-everything step. The batch sizes, the prompt guidance, and the pitfalls below all exist to make the collaboration between you and the AI as effective as possible:

* **You bring** the survey knowledge, the questionnaire context, the coding standards, and the final review.
* **The AI brings** speed — generating in minutes what takes hours manually.
* **Together**, the result is faster delivery than manual programming, with quality controlled by you at every step.

Users who treat Metaforms as a hands-off automation tool — generating entire surveys in one prompt and expecting finished output — consistently see more errors, more rework, and less benefit from the platform. Users who work with it as a co-programmer consistently see the biggest efficiency gains.

## 1. Why 5 Questions Is the Recommended Standard

Generating a maximum of 5 questions per batch is the cornerstone of the Metaforms workflow for standard question types. Throughout this document, question complexity is referred to in tiers:

* L1–L2: Standard setups — single-select, multi-select, radio buttons, text inputs, grids, basic piping, standard logic, and quotas.
* L3 and above: Complex types requiring specialized handling — JavaScript, 3D grids, Complex masking and loops, Patient Charts, and Custom Validation.

The 5-question batch applies to L1–L2 questions and balances three things: error minimization, limiting how much generation time is lost if a batch fails partway through, and focused code review with fixes if needed.

### 1.1 Why small batches work better

Every generation — regardless of batch size — is a **starting point for your review, not a finished product**. Across projects, the AI consistently produces a strong foundation, with most edits being targeted refinements rather than logic rewrites. But that foundation still needs a programmer's eyes on it. The batch size question is really about how much output you can review effectively at once.

As batch size grows, the AI must hold more context simultaneously — question types, answer options, precodes, logic conditions, piping variables, and formatting standards. The likelihood of errors (wrong IDs, mismatched question text, misapplied logic, inconsistent formatting, phantom questions) increases with each additional question, and errors tend to cascade: a wrong pattern in question 3 of a 10-question batch often repeats through questions 4–10.

Smaller batches also limit how much you lose when something goes wrong. Generation takes time, and if an unexpected error occurs partway through a batch, the remaining questions in that batch get cancelled — you lose the generation time spent on the whole batch, not just the question that failed. A 5-question batch that fails costs a fraction of the time a 10-question batch would. Smaller batches also let each question's type, precodes, logic, and formatting be verified before moving on, and naturally support the recommended **Generate → Verify → Fix → Next batch** cycle. This is co-programming in practice: the AI generates fast, you validate and correct, and you catch problems before they compound across a large batch.

## 2. Quick Reference: Batch Size Matrix

| **Batch Size** | **When to Use**                          | **Question Types**                                                         |
| -------------- | ---------------------------------------- | -------------------------------------------------------------------------- |
| 5 questions    | Standard workflow (L1–L2 complexity)     | Single/multi-select, radio, text input, grids, piping, basic logic, quotas |
| 3 questions    | Mixed complexity or dense logic sections | Moderate piping, nested conditions, multi-language setups                  |
| 1 question     | Complex / advanced setups                | Hybrid, Complex Loops, 3D grids, Patient Charts, Custom Validation         |

## 3. Recommended Workflow Steps

This is a co-programming cycle — the AI generates, you review and validate, and each iteration makes the next one better. The review step is not an optional checkpoint; it is where your expertise as a programmer drives the quality of the final survey.

| **Step** | **Description**                                                                                                                                                                                                                                                                               |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1        | Study the questionnaire and identify sections by complexity level. This is programmer judgment the AI relies on — the batch size decisions in Section 2 depend on your read of the questionnaire.                                                                                             |
| 2        | Select the correct AI specialization(s) for the question type.                                                                                                                                                                                                                                |
| 3        | Generate in the appropriate batch size — 5 for standard, 3 for moderate complexity, 1 for complex. Use prompts like 'Generate Q1–Q5' or 'Generate next 5 questions.'                                                                                                                          |
| 4        | **Review the generated code — this is your most important step.** The AI's output is a starting point for your review, not a finished product. Check precodes, logic, formatting, and question types against the questionnaire. Only you know whether the output matches the research intent. |
| 5        | Fix issues using 'Edit with AI' or manually where faster — apply corrections per your standards before moving to the next batch.                                                                                                                                                              |
| 6        | Repeat until the full questionnaire is programmed.                                                                                                                                                                                                                                            |

## 4. Prompt Guide: Good vs. Bad Prompts

Prompt quality is one of the biggest factors in AI output accuracy. A clear, specific prompt is the difference between a clean generation and hours of rework.

### 4.1 Edit with AI: Answer Validation

Write your prompt in the Edit with AI box and provide the necessary details. Mention only the specific question that needs validation, then describe the exact rule — conditions, ranges, and error messages.

| ✅ **Good Prompt**                                                                                                                                         | ❌ **Bad Prompt**                  |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| "Add validation to Q5: require exactly 3 selections from the checkbox list. Error message: Please select exactly 3 options."                              | "Add validation to Q5"            |
| "Add range validation to Q8: numeric input must be between 18 and 99. Display error if outside range: Please enter a valid age between 18 and 99."        | "Fix the validation on Q8"        |
| "Make options 98 (Don't know) and 99 (Prefer not to say) mutually exclusive with all other options in Q12. If 98 or 99 is selected, deselect all others." | "Add exclusive options to Q12"    |
| "Add sum validation to Q15 grid: all row values must sum to exactly 100. Error message: Your responses must total 100%."                                  | "Validate Q15"                    |
| "Add cross-question validation: if Q3 answer is 1 (Yes), then Q4 must have at least one selection. Error: Please answer Q4 since you selected Yes in Q3." | "Fix the logic between Q3 and Q4" |

### 4.2 Edit with AI: Custom Questions (3D grid with different question types)

Generate custom questions one at a time. When editing, describe the exact column structure, which columns are checkboxes vs. radio buttons, and what cross-column validation rules apply.

| ✅ **Good Prompt**                                                                                                                                                                                     | ❌ **Bad Prompt**                       |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| "Convert Q10 to a custom question: columns 1–3 should be checkboxes (select all that apply), column 4 should be a radio button (single select). Add validation: if 4 is selected, 1–3 must be empty." | "Make Q10 a hybrid question"           |
| "Add cross-column validation to Q18: if any checkbox in column 1 (Awareness) is selected, the corresponding radio in column 2 (Preference) must also be answered for that row."                       | "Add validation to Q18 columns"        |
| "Update Q22 custom setup: move the 'None of the above' row (99) so it is mutually exclusive with all other rows. When 99 is checked in any column, deselect all other rows in that column."           | "Fix the None option in Q22"           |
| "Create Q14 as a 3D grid: rows are brands (1–8), column 1 is a checkbox for 'Heard of', column 2 is a radio for 'Most preferred'. Only brands checked in 1 should be selectable in 2."                | "Create a 3D grid for Q14 with brands" |

## 5. When 10-Question Batches Can Work

The platform supports more than 5-question generation (to generate more, you need to prompt in the chat box), but the standard recommendation remains 5. Even under ideal conditions, 10-question batches carry higher risk: code review is harder, error cascade is more likely, and an unexpected failure partway through cancels more pending generations — wasting more of the generation time already spent. This section documents the conditions under which 10-question batches can be used responsibly.

### 5.1 All of these conditions must be true

* L1–L2 complexity only — standard single-select, multi-select, radio, text, or number inputs. No logic, piping, validation, loops, JavaScript, or hybrid types.
* Same question type pattern — for example, 10 consecutive single-select Yes/No questions. The more uniform the block, the better the AI performs.
* No logic, piping, or conditional show/hide within the block.
* You can review all 10 questions carefully. If not, use a 5-question batch instead. Remember: 10 questions of output means 10 questions of review — the generation is only as good as the verification behind it.

### 5.2 Example: when it works

Scenario: Q6–Q15 are all single-select 'Have you heard of \[Brand X]?' with Yes/No options. No piping, no logic, no conditions.

Good prompt: "Generate Q6 through Q15. All are single-select Yes/No brand awareness questions. No logic or piping between them. Precodes: 1=Yes, 2=No."

Why this works: Uniform question type, explicit precode format, no interdependencies, clear range specified.

### 5.3 Example: when it fails

Scenario: Q6 is a multi-select brand list, Q7 pipes from Q6, Q8–Q10 have show/hide logic based on Q6, Q11 is a text input, Q12–Q13 are grids with different column headers, Q14 has answer validation, Q15 is a ranking question.

Why this fails: Mixed question types, piping dependencies, conditional logic, and validation rules. This should be split into at least 3 separate batches (Q6–Q7, Q8–Q10, Q11–Q15) or smaller if individual questions need specialized handling.

### 5.4 Post-generation review checklist

* All 10 question IDs match the questionnaire (no skipped or duplicated IDs).
* Question type is correct for every question.
* Precodes follow the expected format across all 10 questions.
* No extra or phantom questions generated beyond the requested range.
* Formatting is consistent (font, style, spacing) across all 10 questions.
* Fix any issues immediately using 'Edit with AI' or manually.

## 6. Common Pitfalls to Avoid

The patterns below consistently lead to problems and are listed roughly in order of how often they occur. Most of them share a root cause: treating Metaforms as a hands-off automation tool instead of a co-programming workflow. Generation without review, and expecting finished output from a single prompt, work against how the platform is designed to be used.

* Generating full surveys or large sections in a single prompt — prompts like 'generate everything', 'finish the survey', or 'generate till end' are the most common issue. They produce inconsistent output, make errors hard to isolate, and skip the review cycle that co-programming depends on.
* Proceeding to the next batch without reviewing the current one — generation without review defeats the purpose of batching. Each batch should be reviewed and verified before generating the next.
* Confusing 'Generate with AI' and 'Edit with AI' — using 'Generate with AI' to modify existing questions creates extra and incorrect code. Use 'Edit with AI' for modifications; 'Generate with AI' only for new content.
* Using prompts for changes the platform handles better — 'Update Question Type' and 'Update Styling' are faster and more reliable than prompts for attribute-level changes.
* Relying on AI for quick manual fixes — small syntax corrections and quick formatting changes are often faster done manually. Co-programming means using your own judgment on when the AI is the right tool and when your hands on the code are faster.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.metaforms.ai/best-practices/ai-question-generation-batch-size-guide-confirmit.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
