Several ways to do this.
Copy the action and in the relevance section add your own criteria. You don’t need to write this relevance from scratch yourself as you can do it with the drop down filters. You may want to create the relevance with the drop down and then add it to the list of other relevance clauses as you don’t want to loose those.
Or add the relevance when your taking the action (in the Applicability tab).
For reference, this is an example of relevance you need:
(not (exists true whose (if true then (member of group 182 of site "actionsite") else false)))
Computer groups are defined by a number, which you can find by going to a computer group and looking at the Group Description and look under the Details section (group ID). You don’t need the ‘00-’ just the number. Also, be aware of the site the group is in.
An alternative would be to use the relevance the you have defined for group a and group b directly in the action. But if they are manual groups, it might be easier to use option 1.