-
Book Overview & Buying
-
Table Of Contents
Supercharged Coding with GenAI
By :
In this chapter, we expanded our focus beyond .py files and explored how GenAI can help us understand entire code bases. Using GitHub Copilot, we applied the /explain command in its plain form as well as with more tailored instructions to grasp the role of the get_manhattan_distance function. We also applied this command to understand non-project files such as requirements.txt and Dockerfile.
Next, we used ChatGPT to craft prompts that offered useful explanations about edge cases and argument types. We then moved on to OpenAI API to generate a script that programmatically provided multiple explanations with one call.
We concluded by generating sample values that are useful for interacting with our code through the debugger. This approach is especially helpful when dealing with more complex implementations.
In the next chapter, we will dive into prompt engineering techniques to improve the quality of our generated code. Through few-shot learning, also known as in...