-
Book Overview & Buying
-
Table Of Contents
Supercharged Coding with GenAI
By :
In this chapter, we explored how to achieve high-quality GenAI outputs by focusing on the three pillars: model mastery for handling a specific topic, evaluation metrics, and precise prompts. We examined how imprecise prompts can lead to risky outcomes, such as CLI commands exposing secret keys, and demonstrated how following best practices can produce far better and more reliable model outputs.
We also learned about the five S’s of prompt precision best practices for coding-related tasks: keeping a structured prompt, providing surrounding context, maintaining a single task per prompt to best leverage model mastery and evaluation capabilities, ensuring that prompts are specific rather than general and vague, and keeping the input as short as possible by removing irrelevant information and fluff.
With two interactive labs, we explored how to implement those best practices in ChatGPT. With an OpenAI example of a good prompt to a bug fix, we saw that even good prompts...