It's called "prompt engineering", and there's lots of resources on the web about it if you're looking to go deep on it