Unlocking AI's Potential for Government Employees with Prompt Engineering and RACE Framework

Use prompt engineering frameworks like RACE (Role, Action, Context, Example) to structure prompts effectively, experiment with variations, and always verify AI-generated content for accuracy and bias.

The use of AI tools begins with prompt engineering, the practice of crafting and refining input to achieve clear, useful responses. Prompt frameworks, such as the RACE model, offer structured guidance to streamline this process and improve results.

Key Insights

  • Prompt engineering involves iterating and refining how you phrase inputs to your AI assistant to improve the quality of output.
  • Frameworks like RACE, Role, Action, Context, and Example, act as templates that help users structure prompts for more accurate and efficient responses.
  • Experimentation is essential, as outputs can vary over time and across use cases; verifying results and trying different approaches ensures reliability and relevance.

This lesson is a preview from our AI Fundamentals for Government Employees Course. Enroll in a course for detailed lessons, live instructor support, and project-based training.

I want to talk now about prompt engineering and prompt frameworks. So first of all, prompt engineering is a term for how you write or iterate or wrestle, as I've said sometimes, with your prompt. So that's the act of engaging with your prompt.

It's the how. A prompt framework is a template, or like a blueprint, that guides you on how to do that prompt engineering. So it can be a really helpful tool to help you remember relevant details and get you better results faster.

So, an example of a common prompt framework is called race. You can remember it by race, like I want to race to get to my answer faster. And what that stands for is role, R for role, A for action, C for context or constraint, and E, for example, or I want you to execute on this thing, or here's what I expect.

And this is a useful thing to think about because imagine, for example, that you wanted to write a memo for your leadership. You could put that into your AI assistant and wrestle with it for a while and, well, no, this is too long. Make this shorter.

Oh, I need this heading as a, you know, and that's a totally fine way to work with your prompt or work with your AI assistant. But you could also use one of these prompt frameworks to help you get there or race there much, much faster. So, for example, you could say, "All right, I need to write this memo."

What role am I going to take on? Well, I'm a government staff member, and I'm preparing a note for my leadership. Okay, so that's the role I am asking my AI assistant to take. Okay, so imagine that you're that AI assistant.

Action. I want you to draft a summary memo, one page. Okay, so that's what, that's the output, or that's what you need it to do.

So, for some context, well, this is about a new public safety initiative. Leadership needs a summary of our goals and the expected impact that they'll have, and some recommended next steps. Oh, and, you know, by the way, the language should be really clear because we're going to, and diplomatic because we're going to, you know, share this internally and with the public if we need to.

And as an example or something I expect to see, I want it to include an overview, some key changes, what we introduced, what this means for departments and agencies, and I need each of those areas to be completely separate. I mean, if I'm the AI assistant, I certainly still have questions. You know, what are the safety initiatives, for example? And what is the expected community impact and things like that? And all of that is color that you can add to your initial prompt, or you can wrestle with later, as you know, you could plug this in even, you know, word for word and see what it does, and then say, you know, go in and fill in, you know, the details later, for example.

So these prompt frameworks and, you know, race is just one of them. There are dozens, hundreds, maybe even thousands by now. But race is a fairly common one, and I think it's, and I like it because it's really easy to remember, right? I want to get to my conclusion, you know, faster than I would if I, you know, started out really generally.

And I bring all this up to say, you know, a really key part of your work with an AI assistant is experimentation. You know, that's a theme of this course, in fact. See, to see what works best for your specific needs, play with it, you know, try different prompts, try, you know, rewording different things.

It may be an entirely different framework altogether, you know, depending on the nature of your jobs, of your job, that may be something, you know, worth looking up. You can ask your AI assistant, you know, is there a particular prompt framework that is ideal for, you know, HR professionals like me, or, you know, grants writers like me, or something like that. So play around with it and keep in mind that, you know, AI assistants can be different every single time.

So just like talking to a human, if you asked me, you know, what did I eat for lunch yesterday, and what did I do afterwards? I would tell you what I had for lunch and what I did after lunch. If you asked me an hour from now or a week from now or a month from now or a year from now, my answer is going to be a little bit different, right? Because my memory may have faded. New data has been introduced.

So we've had other conversations since then. So, you know, or maybe I've gotten just better at describing my day, and I started taking notes. So actually, ooh, I can tell you exactly, you know, so maybe a lot of things have changed.

And that's one of the reasons that we looked at that AI pipeline, right? There could be more data that comes on the front end. Maybe the processes have changed or improved, or, you know, because time has passed, it's had more time in its maintenance and optimization stages. So maybe it's just better at answering a question like that.

So try and try again, maybe, you know, give it a couple of days, ask it in a different way, you know, whatever you need to do. It's worth trying something multiple times with your AI assistant before making a decision on whether, you know, it really, really works or not. And I mentioned earlier, you know, that there was a key thing to keep in mind, which was that your AI assistant is resembling what it's seen before.

That's key, right? Because it's not always going to be perfect. It could, in fact, be flat out wrong. Like when you sign up for a ChatGPT account, a free one, even though it says, you know, make sure to check your facts.

It's in the terms and conditions. It's right down there by the prompt bar: on almost every AI assistant I've ever seen, it says, "Hey, this thing can make mistakes. So, you know, don't take my word for it necessarily.”

It can be wrong because it can also be biased, which we'll talk a little bit more about later on in the course. So it's always worth verifying your answers and your input, maybe even asking your AI assistant to cite sources. But we'll talk about a lot more things like that in our next module.

photo of Brian Simms

Brian Simms

Brian Simms teaches for Graduate School USA in the area of Artificial Intelligence, helping federal agencies build the knowledge and skills needed to adopt AI responsibly and effectively. An AI educator and author, he focuses on practical, mission-driven applications of AI for government leaders, program managers, and technical professionals.

More articles by Brian Simms

How to Learn AI

Build practical, career-focused skills in AI through hands-on training designed for beginners and professionals alike. Learn fundamental tools and workflows that prepare you for real-world projects or industry certification.