Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Supercharged Coding with GenAI

You're reading from   Supercharged Coding with GenAI From vibe coding to best practices using GitHub Copilot, ChatGPT, and OpenAI

Arrow left icon
Product type Paperback
Published in Aug 2025
Publisher Packt
ISBN-13 9781836645290
Length 460 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Hila Paz Herszfang Hila Paz Herszfang
Author Profile Icon Hila Paz Herszfang
Hila Paz Herszfang
Peter V. Henstock Peter V. Henstock
Author Profile Icon Peter V. Henstock
Peter V. Henstock
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Foundations for Coding with GenAI
2. From Automation to Full Software Development Life Cycle: The Current Opportunity for GenAI FREE CHAPTER 3. Your Quickstart Guide to OpenAI API 4. A Guide to GitHub Copilot with PyCharm, VS Code, and Jupyter Notebook 5. Best Practices for Prompting with ChatGPT 6. Best Practices for Prompting with OpenAI API and GitHub Copilot 7. Basics to Advanced LLM Prompting for GenAI Coding
8. Behind the Scenes: How ChatGPT, GitHub Copilot, and Other LLMs Work 9. Reading and Understanding Code Bases with GenAI 10. An Introduction to Prompt Engineering 11. Advanced Prompt Engineering for Coding-Related Tasks 12. Refactoring Code with GenAI 13. Fine-Tuning Models with OpenAI 14. From Code to Production with GenAI
15. Documenting Code with GenAI 16. Writing and Maintaining Unit Tests 17. GenAI for Runtime and Memory Management 18. Going Live with GenAI: Logging, Monitoring, and Errors 19. Architecture, Design, and the Future 20. Other Books You May Enjoy 21. Index
Appendix

An Introduction to Prompt Engineering

In this chapter, we will introduce the practice of prompt engineering, a field of study that started in 2020, which offers advanced techniques for refining prompts to achieve more reliable, predictable, and desirable outcomes in large language model (LLM)-based applications.

We will focus on an effective prompt engineering technique for code generation with GenAI: few-shot learning, also known as in-context learning. This approach, when used in the context of code-related tasks, guides the model toward producing outputs that align with a specific coding style or objective.

We will focus on how the few-shot learning technique can enhance the model’s output for more accurate and style-consistent code generation. While there are many different uses of few-shot learning in code-related tasks, the focus on style is a useful example for maintaining consistency in a repository. This includes enforcing type hints, adding docstrings, or...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Supercharged Coding with GenAI
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon