Am important thing to remember is just because someone lost it in your game with them doesn't mean they're like that always. We've all had games where we've been at our wits end and lashed out when shouldn't have and normally wouldn't have. The system realizes that, and as such gives some leniency, trying to look for trends rather than singular events. The exception to that is racist/homophobic/death threat comments, which get escalated pretty quickly.
For toxic language, there's a tiered punishment system.
- 10 game chat restriction
- 25 game chat restriction
- 14 day ban
- Permaban
Anything that gets you a chat restriction can get you permabanned if you keep it up. It generally goes from one punishment tier to the next, but can skip steps for the above mentioned behavior. It takes about 3 months of good behavior to drop down one punishment tier. So if you got a 14 day ban, and kept being toxic, you're permabanned, but if you cleaned up your behavior for 3 months your next punishment would be another 14 day ban.
Trolling/Intentional Feeding's detection system is a lot less "tried and true". As such, Riot's erroring on the side of not banning innocent players with it. Clear cut examples (running down mid with 6 tears) are easy for it to detect, and more prone to punishment. I believe (not certain) that manual reviews of this type of behavior are going on periodically to test the automatic system, making sure it's accurate and helping to teach it examples of what to look for.