Pick someone with stuns, instead of slows against Immune To Slows: The Champion.
Master Yi is predictable and a one-trick pony with literally one playstyle: run in and fight a dude. He has no CC, his true damage is timed, and he almost exclusively relies on basics and scoring a kill. Without a kill, his cooldowns pin him down; without a team he has no protections against stuns and his significant defenses are very protracted and easily stifled.
Champions with a stun, taunt, knockup/back, silence or fear alongside anything that isn't a slow but is still CC will pretty much drop him. You need to stop his movements first, and cut his heal short.
If he has no crit, he's relying on back to back autos; Ninja Tabi and Thornmail/Frozen Heart/Randuin's will go a long way in pushing his power down. Because he has virtually no room to build defense without choking out his damage in a bad way, managing a defensive edge and conscious play against him will pretty much force him to, at least, leave you the hell alone.
Yi flourishes against champions with little to no peel and similarly struggles badly against those who have more than one source.
As with any champion, know what you're up against. I cannot explain how tilted I get watching people fall for the same-ass trick all game. If Yi can run into you, vaporize you and run out, tailor your plays against that, not into it.
For where to start on countering Yi, try Jax. He lacks multiple CC but can mitigate a lot of Yi's damage away and is probably better suited to winning a duel.