Rats are extremely clever and will investigate any possibility for food. They can tunnel and climb and have powers of deduction, and can learn your routines and habits. They can also work out how to access things you think are not in their reach. Their teeth are harder than most substances they will need to eat through to get at food. It is not good to have them living in the same space as you because they carry disease fatal to humans and you have to outwit them if you won't out and out kill them. Once here, they dug a 20' tunnel network which came up inside a concrete stable building under a galvanised steel feed bin. They ate through the bottom of the bin and smuggled carrots out of the bin for several weeks before anyone realised the carrots were going down a bit faster than usual and we emptied the bin to see what was going on!
Rats are motivated by food and shelter. You will need to stop providing them with ANYTHING to eat. Stop feeding the birds, don't make compost outside, keep rubbish in metal dustbins if it's outside, don't leave crumbs or food on the ground if you eat outside. If you are lucky, and they can find other sources of more accessible food, then the majority of them will probably relocate if they can, although there is no guarantee that they won't live in your garden and just commute.
We have a lot of rats here on the farm where we live. They come from the neighbouring farm which has stores of animal feed and open feeders for sheep in the fields. There is an element of accepting the rat worldview, and tolerating their equal right to existence as other-than-human beings. And then there is the need not to be exposed to nasty diseases, harrassment and invasion.
It's a difficult balance to strike, and we have tried many approaches over the years. But at the end of the day, while I respect their rat-ness, I want them to be rats elsewhere! It is no less spiritual to confront your natural enemies, and drive them out if they bring harm. We don't use poison because of the risk to other animals on the farm, especially the cats here, who have no spiritual dilemmas about killing rats, thank goodness!