Where are you having problems with rats? Are they coming indoors. Or are they only outdoors? The keys to limiting their activity is to get rid of the available food, also to destroy favorite habitats such as debris or brush piles.
If the rats are indoors, you’ll need to determine where they are coming in, then block their way.
If outdoors, common attractants are compost piles with food stuffs; fallen tree fruits; bird feeders; and pet food that’s left outdoors overnight.
Traps are helpful but, because rats are smart, they’ll soon realize what you’re up to. So, you’ll need to change your tactics and strategies from time to time. In general, it's best to avoid the use of poison baits.
You’ll find many useful insights in “Living with Wildlife: Rats.”