Thus the inventor of a new machine or any other invention has the exclusive priviledge of making and vending that invention for the space of 14 years by the law of this country, as a reward for his ingenuity, and it is probable that this is as equall an one as could be fallen upon. For if the legislature should appoint pecuniary rewards for the inventors of new machines, etc., they would hardly ever be so precisely proportiond to the merit of the invention as this is. For here, if the invention be good and such as is profitable to mankind, he will probably make a fortune by it; but if it be of no value he also will reap no benefit.
HT@Timothy Taylor, who has an excellent discussion today of prizes versus patents as an incentive for innovation. Tim highlights B. Zorina Khan's "Inventing Prizes: A Historical Perspective on Innovation Awards and Technology Policy," Business History Review, Winter 2015 (89:4, pp. 631-660). As he writes, she "tosses some cold water on the prize perspective."
I have always considered patents preferable to prizes, for the reasons Smith gives above. I just hadn't known that, among the many issues on which he spoke clearly, this was one of them.
Essentially, the problem is a central planning problem. A government that gives prizes has to know what to give prizes for. It could give a big prize for something that matters little or a small prize for something that matters a lot. It's hard to know in advance. Patents, as Smith points out, solve that problem.
This is not to say that patents are trouble-free. See my "Patents" in the first edition of The Concise Encyclopedia of Economics.