From the course: Build AI Agents with GitHub Copilot by Microsoft Press

Unlock this course with a free trial

Join today to access over 25,800 courses taught by industry experts.

Create effective AI agent prompts

Create effective AI agent prompts

All right, well, now that we've created this GetGenAIResponse function that sort of abstracts away a lot of the details of interacting with a generative AI model, as I mentioned, the last thing that we have to do here in order to really allow generative AI to take the wheel and control this agent that we've set up is rewrite the developer and user prompts. All right, so here's what this is going to look like, and what I'm going to be doing here is I'm going to be following a fairly straightforward pattern, which I like to think of as the instructions and data pattern, right? Or you might think of this, uh, sort of as the generative AI analog to writing a program or creating a function and then actually passing in the arguments. You'll see what I mean here in just a minute, but, um, anyway, we'll start off here with the dev prompt and it's very important that you include certain instructions in the dev prompt, because as I've already mentioned, the dev prompt is given a higher priority…

Contents