It is difficult to do beforehand, but it can be easily measured after the fact. There are various indicators for measuring the quality of patents. The first is the number of claims on the patent. That shows the scope of the various applications of the patent.
To find out the number of citations of a patent, you have to wait until other patents have quoted it. That can take five or ten years, which is already too late in a number of sectors. When a patent is renewed after four, eight or twelve years, that is when you can measure whether it is really useful. The decision to maintain a patent is made by the company or the person who decides the usefulness and whether to keep the property. So it is really difficult to tell good patents from bad ones at the time they are issued.
Your second question was about funding, but I don't know what you had in mind.