add constraint in ai