Providing Examples to ChatGPT
Incrementally test driving small, unit behaviors into a system remains the best choice for humans. For an LLM, maybe not.
I first tried getting ChatGPT to consume all my requirements for the name normalizer at once. The code was a mess, and it didn’t work. I took the next-smaller step, which was to first give it a subset containing the four core cases it needed to cover. I helped ChatGPT focus on what I believe to be a proper design—one that, in general, is based on small classes and small methods. With such an improved design, I believe ChatGPT had a much better chance to correctly generate new increments.
One of the best ways to get good results from an LLM is to provide examples in your prompts. I followed that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access