Is there some unifying trait to them - or can there be? Do they have a similar naming pattern or any other distinguishing attribute values? If so, the same documentation for setting up filtering rules can be used as a starting point to filter on other things as well.
If you can identify some way for AAD Connect to tell which groups should be allowed through and which should be filtered, I can help clarify any points about the rule configuration you aren't clear on.