A lawyer has every incentive to take a case on contingency, in the hopes that a few of them will strike gold. In doing so, the lawyer is incentivized to never turn down a case, no matter how frivolous.
To fix this, it ought not be the losing plantif who has to pay, but rather in frivolous cases, the losing lawyer ought to pay.
Frivolity can be determined by the judge or jury (perhaps only after unanimous verdicts)
This way, it is the responsibility of the lawyer to take on only cases which have real legal merit, and stop digging for gold.
Edit: I've held this idea for a while and don't see many shortcomings. I would love to see where it falls short if someone disagrees.