The magic sauce in intelligence is context-awareness. If a prompt is somewhat general ("make me a calculator") an AI should either ask questions, or make reasonable assumptions, or both.
IME LLMs often make reasonable assumptions, but sometimes they don't and you have to backtrack and say "No, what I meant was..."
When the process works it's almost magical because the LLM successfully anticipates your needs, and implements your request in a much fuller way than you might have done yourself.
When it doesn't it makes a mess you have to clean up.
But generally I've been impressed by how well the leading LLMs will Do The Thing from a brief description, interpolating useful and correct details without being told to.
Compilers don't work like that. They're translators, not (entry level) inventors with independent agency.
Some compilers can do that, but only in a very controlled way. For example Haskell's deriving or inference of the correct method called on typeclass. Or the Prolog/Datalog/SQL - they will also fill in many details on how to arrive at an answer.