Using AI to create event contracts