Forty-five condensation products of furan-, pyrrole- and N-methyl pyrrole-alpha-carboaldehyde with N4-3- or N4-4-substituted phenyl semicarbazones and thiosemicarbazones were designed to optimize the antiulcer activity of a previously derived lead structure, formula II. Quantitative structure-activity relationships revealed that among the series of semicarbazones, increasing hydrophobicity and the introduction of electron-donating groups into the phenyl ring raise the antiulcer activity. Generally, semicarbazones are more active than the corresponding thiosemicarbazones. The wide gulf between the activity and toxicity of two derivatives (Compounds III and IV) necessitates further investigation of their pharmacological effects.