Time is money and the purpose of business is not to waste either commodity. Because it can cost money, courts don't like to waste time either, which is why Rule 11 of the Federal Rules of Civil Procedure exists.
That rule requires that before filing any civil action plaintiffs must be sure they have legitimate basis for making a claim. If they don't, the matter can be thrown out and the filer can face sanctions that the court might deems appropriate to curb similar activity in the future. What this means in the context of intellectual property litigation is that IP rights holders needs to be quite certain alleged infringement has occurred before advancing a case. Here, a skilled attorney's help is invaluable.
What must come first
Before filing any case, the court requires completion of an investigation into the facts and the specific laws that pertain to the issue. The process must be undertaken objectively and if the probe outcome is that the claim isn't reasonable, that bars further action.
And what is the court's definition of reasonable? It depends on the jurisdiction.
In some instances, the court might follow an either-or standard. Under this model, sanctions might be imposed if the court finds that either the prefiling investigation was unreasonable, or, in the event the prefiling probe was reasonable, the claim being made was baseless.
In other venues, a both-and standard might apply. That is, sanctions might be imposed only if both the prefiling investigation and the allegations are deemed meritless.
The obvious conclusion this leads to is that success in patent prosecution requires examining the merits of a case from the outset, and understanding the workings of the court that will consider the case. These are skills and experience attorneys develop through years of practice.