VS Team with full squishies :
->
->
->
, sell jungler item if hard cc you can't dodge :
else 
If you are really full build :
(for cdr ms and some hp, or a black cleaver).
Vs tanky teams :

You can also build full lethality, but it's really not as good as these 2 others builds in late game.
The key with yi is to get 3 items and your boots, and then you can probably 1v2 quite easily, then you proceed to just splitpush and flank the teamfights.
If they come for you when splitpushing, based on how fed you are and their cd/cc available, you might want to fight, or run away. If they come one by one you can penta quite easily, if they are 3 or more, it's going to be hard. If they are 2, instant the carry and it should be okay. (R - red smite - Q - E - W to reset)