Optimized question generation