I had an idea about that the other day!
What if you could write something like:
@implement_this
def prime_sieve(n: int) -> list[int]:
pass
And the decorator reads the function name and optional docstring, runs it through an LLM and replaces the function with one implementing the desired behavior (hopefully correctly). I remember there was something like this for StackOverflow.