A published question type can now check each question the AI generates before it's added to a test. Add a function to your question type with addValidator() — it receives { question }, returns { valid, error }, can be async, and runs in your app's sandbox alongside your other hooks.
When a validator returns valid: false the question is dropped and your error goes back to the model, so a specific message like "Provide at least two options." helps it try again. Return anything else and the question is kept as is. See generating questions for a full example.