> ChatGPT is not very good at that.
Mmm.. that's an awfully big generalization.
I'm going to go out here on a limb and say... maybe you're doing it wrong.
ChatGPT is very very good at what you're describing (integration between well defined interfaces and systems in code), especially GPT4.
If you get one bad result, does that mean it sucks? Or... does it mean you don't understand the tool you're using?
The power of AI is in automation.
What you need to do is take your requirements (however you get them) and generate 100s of solutions to the problem, then automatically pick the best solutions by like, checking if the code compiles, etc.
...
This is a probabilistic model.
You can't look at a single output and say 'this sucks'; you can only (confidently) say that if you look at a set of results and characterize the solution space the LLM is exploring as being incorrect.
...and in that case, the highest probability is that your prompt wasn't good enough to find the solution space you were looking for.
Like, I know this blows people's minds for some reason, but remember:
prompt + params + LLM != answer
prompt + params + LLM = (seed) => answer
You're evaluating the wrong thing if you only look at the answer. What you should be evaluating the is answer generator function, which can generate various results.
A good answering function generates many good solutions; but even a bad answering function can occasionally generate good solutions.
If you only sample once, you have no idea.
If you are generating code using chat-gpt and taking the first response it gives, you are not using anything remotely like the power offered to you by their model.
...
If you can't be bothered using the api (which is probably the most meaningful way of doing this), use that little 'Regenerate' button in the bottom right of the chat window and try a few times.
That's the power here; unlimited numbers of variations to a solution at your finger tips.
(and yes, the best way to explore this is via the api, and yes, you're absolutely correct that 'chatGPT' is rubbish at this, because it only offers a stupid chat interface that does its best to hide that functionality away from you; but the model, GPT4... hot damn! Do not fool yourself. It can do what you want. You just have to ask in a way that is meaningful)