The description of the spell says:
The new form can be any beast whose challenge rating is equal to or
less than the target’s.
Beast is a defined type of creature within the game, as per page 6 of the Monster Manual:
Beasts are nonhumanoid creatures that are a natural part of the fantasy ecology. Some of them have magical powers, but most are unintelligent and lack any society or language. Beasts include all varieties of ordinary animals, dinosaurs, and giant versions of animals.
A reasonable interpretation is that the PC needs to have knowledge of the beast.
But how much knowledge? It seems reasonable that the caster can turn the target into a frog, even if the caster is not a frog expert. The caster may not even know much about frogs at all, except maybe that they hop. To my mind, it seems reasonable that the magic fills in the gaps. That if frogs say ribbet, then the transformed creature probably says ribbet, too, even if the caster doesn't know that frogs say ribbet.
Regarding your question about a little information in an old book, that is an interesting question. What if the old book is wrong? Old books are often filled with creatures which never actually existed. What if it is a new book? What if the book is fiction? What if the book is fiction and the caster wrote it? What if the book is fiction and the caster wrote it just now?
In the end, it is up to the players, particularly the GM to determine whether what the caster intends fits within the definition of "any beast".
As a GM, I would tell the player, that's an interesting idea, I suppose you could give it a try if you wanted. I would let the player use any source of in-game information, including the character's own imagination. I would also expect the character to be able to hold the concept of the target creature in its mind and that the player be able to state the target fairly succinctly. After all, it has a casting time of one action. If the intended results were out of balance with the power of the spell, I would modify those results. "I transform the big bad wolf into a cute kittycat", might work pretty well, at least the kittycat part. "I transform the big bad wolf into a piggy" would probably work. "I transform the big bad wolf into a flying piggy" might even work. Of course, if it were a chaotic evil wolf inclined to eat first and ask questions later, then the kitten, piggy, and flying piggy, would all be chaotic evil inclined to eat first and ask questions later, too. Having a face full of avian wild boar might not have been what the caster intended. The more absurd the caster's intention, the more absurd the results would be. That seems like rules-as-fun.