From the course: Test-Driven Development in an AI World
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Structuring AI prompts for TDD
From the course: Test-Driven Development in an AI World
Structuring AI prompts for TDD
- [Instructor] When two people run the same prompt at the same time, even using the same model and version, they probably still get different results. So if you want more consistent and useful results, it really helps to write better prompts. Let me show you how to do this using AI itself. Right now, I have a file open with the system instructions for GitHub Copilot. You can find it on ".github/copilot/instructions.md". This file tells the AI how to behave when I send a prompt in Copilot. And as you can see, I included some settings like mentioning that the system need to implement these driven development principles and using the red-green refactor system. Even with all of that, the responses aren't always predictable. Let me show you. Here, I have this component and I want to implement a list of destinations. So I send this prompt to Copilot, requesting this, hit enter, and in this case, we have no explanation on what's going on here. And the system just show how to implement the…