"

46 How to Prompt AI Chatbots

Joel Gladd

Many of you are gamers or you’re familiar with video games. Imagine you’ve just unlocked the most powerful character in your favorite game but you have no idea which button combinations actually work. Spamming random buttons might get you somewhere but definitely won’t unlock the character’s true potential. That’s similar to what it’s like having access to AI chatbots without knowing how to “talk” to them effectively. By the end of this chapter, you should know how to get started with these digital assistants to help you in a variety of ways.

Note that this chapter offers a starter kit rather than a thorough introduction. We’re not going to provide you with a cheat sheet for how to complete the entire role-playing game, so to speak. These are just some tips for how to get started and how to think strategically about interacting with Generative AI (GenAI) chatbots like ChatGPT. There can be much, much more to prompting than this. The end of this chapter suggests ways to go further.

Understanding AI Chatbots: The Basics

When you open ChatGPT, Anthropic’s Claude, Google’s Gemini, or Microsoft Copilot, you’ll see what looks like a simple text box.

Screenshot of the ChatGPT input box.
Figure 1. Screenshot of the ChatGPT input area where users enter prompts.

Prompting a chatbot sometimes feels like having a very knowledgeable friend who has somehow memorized the entire internet but needs clear directions to be helpful.

Here’s an extremely basic overview of how this works:

  1. You type in what you want (your “prompt”).
  2. The AI processes your request as a series of tokens, first by filtering it through the platform’s instructions (keeping it safe, ethical, etc.) and then sending it to the trained model.
  3. After querying the model, the chatbot responds with its response.

Unlike Google Search, which treats each query like a stranger asking for directions, AI chatbots remember your chat history and can build upon previous exchanges. They can refer back to earlier parts of your conversation and build on them. They’ll also remember any documents you’ve shared, like class notes or assignments, at least until their memory (called a “context window”) gets full.

All this starts with a prompt.

The Three Core Elements of a Good Prompt

There are countless guides and frameworks to help with “prompt engineering”. In this chapter we’re going to provide a highly simplified starting point, but know that you can make this as sophisticated and complex as you’d like, depending on your use. Most of the strategies you’ll come across have three basic elements:

1. Context

Start by explaining your situation. This is the “You are here” part of the map.

2. Task

This is your destination—what you want to accomplish.

3. Instructions

These are the turn-by-turn directions for how you want the task done. Sometimes you might see “formatting” suggestions in this part.

Let’s look at some examples of how you can leverage these three elements to build successful prompts. Note that while these examples clearly label each element (context, task, instructions) the model will usually be able to pick out these things without specific labels. What matters is what you’re familiar with the strategies.

Healthcare Student Example

Context: I’m a first-semester nursing student preparing for my first clinical rotation next week.

Task: I need you to explain how to properly measure and interpret the four main vital signs.

Instructions: Please break down each vital sign (temperature, pulse, respiration, blood pressure) step by step. Include normal ranges and explain what abnormal readings might indicate. Use nursing terminology but remember I’m just starting out.

First Year Writing Student Example

Context: I’m a first-year student learning about persuasive appeals in my composition course. I understand the basic definitions but struggle to identify them in real writing.

Task: I want you to help me practice identifying and understanding how ethos, pathos, and logos work in actual arguments.

Instructions: Could you take a well-known speech (like Martin Luther King Jr.’s ‘I Have a Dream’) and break down specific examples of each appeal? Then give me another short speech to practice identifying these elements myself, and confirm whether I’ve identified them correctly.

Coffee Shop Owner

Context: I’m a new small business owner running a coffee shop in a college town. I have a $500 monthly marketing budget and I’m competing with two established coffee chains nearby.

Task: I need you to help me with a 3-month social media marketing plan for my coffee shop.

Instructions: Please include specific strategies for Instagram and Facebook, with suggested posting frequency, content types, and hashtag strategies. Break this down into weekly actionable steps that I can implement myself.

Usually the prompts above can be written without the context-task-instructions labels so they’ll sound more like natural language paragraphs, like this:

I’m a new small business owner running a coffee shop in a college town. I have a $500 monthly marketing budget and I’m competing with two established coffee chains nearby. I need you to help me with a 3-month social media marketing plan for my coffee shop. Please include specific strategies for Instagram and Facebook, with suggested posting frequency, content types, and hashtag strategies. Break this down into weekly actionable steps that I can implement myself.

On the other hand, you can use XML labels (below) to separate the elements very clearly for the LLM.

Advanced Prompting: Role-Based Prompts

Once you’re comfortable with the basics, you can level up or vary outputs by asking the AI to take on specific roles. This can be especially helpful in some scenarios, such as writing tasks, or when a particular expertise is associated with the information you’re looking for. Some research shows assigning a role to a chatbot can actually increase its accuracy and performance, but it really depends on the task, model, and other factors.

Here’s how our coffee shop owner might use this when planning their marketing strategy:

Coffee Shop Marketing Brainstorming

Context: I’m a new small business owner running a coffee shop in a college town with a $500 monthly marketing budget.

Role: Act as an experienced social media marketing manager who has successfully launched several coffee shops in college towns.

Task: Create a 3-month social media marketing plan for my shop.

Instructions: Drawing from your experience with similar businesses, outline specific strategies for Instagram and Facebook. Include posting frequency, content types, and hashtag strategies. Break this down into weekly actionable steps.

Conversation Steering

The prompt engineering tips covered above should help as a starting point, but it’s important to think of these chatbot less like vending machines (insert prompt, receive answer) and more like that one friend who read the entire textbook and really, really wants to tell you about it. Sometimes they’ll start explaining things like they’re giving a TED talk when you just wanted the basics. That’s where “conversation steering” comes in handy, rather than just relying on neat prompt engineering tricks. Most successful interactions with these models emerge from conversations rather than a single best prompting strategy. It takes patience and an awareness of what information (and prodding) the model requires. In fact many of you may have success by just carrying on a conversation.

Let’s take a look at an example of a nursing student asking a chatbot for help understanding diabetes. Notice how the initial question is rather broad, and the student gradually refines what they’re looking for (and in what format) as the conversation continues:

Initial Prompt: “Can you explain how diabetes affects the kidneys?”

AI Response: [Launches into a technical explanation that might as well be in Latin, sprinkled with words that look like someone fell asleep on their keyboard]

Student’s Follow-up: “Okay, wow, that’s overwhelming. Let’s pretend I’m a first-year nursing student who still thinks ‘glucose metabolism’ is a cool band name. Can you try speaking more at my level?”

AI Response: [Provides simpler explanation]

Student’s Refinement: “Much better! Now, what would I actually see in patients–maybe some real-world stuff that’s missing from the standard textbooks but should definitely know?”

AI Response: [Provides clinical applications]

Student’s Final Refinement: “Perfect! Last thing–could you put all this into a simple cause-and-effect chain? Like a ‘This happens, then this happens, then everything goes sideways’ kind of thing?”

Notice how each follow-up from the student:

  • adds context about skill level (from “help, what are words?” to “ah, now I get it!”)
  • gets increasingly specific
  • moves from theory to practical application
  • ends with something more tailored to the student’s task (instead of that broad, unrefined starting point)

Conversation steering like this can help refine any prompt. There are certainly situations where a chatbot isn’t suited to a task, but it’s often the case that poor or irrelevant results need more conversation. Chat is a way to guide the model towards the information that’s most relevant.

Going Further

This section is a grab-bag of things you can do to take things further or refine your prompting strategies.

XML Tags

If you need to be extremely precise about the different parts of your prompt, Anthropic (the company behind Claude.ai) and others recommend separating discrete elements with XML labels. Below is an example from Claude that shows how to include XML tags to clearly identify key elements. Notice how this sample prompt basically follows the context-task-instructions structure–and Claude is assigned a role at the beginning and given an example at the end. Normally you should be able to rely on natural language rather than labels like this, but more complex tasks may benefit from them.

<role>You are a patient biology tutor who specializes in making complex processes easy to understand.
</role>

<context> First-year biology student
– Understand basic concept of plants converting sunlight to energy
– Struggling with chemical processes
– Visual learner who benefits from analogies
</context>

<task>Help me understand the specific steps of photosynthesis, particularly:
– Light-dependent reactions
– Light-independent reactions
– How these processes connect
</task>

<instructions>
1. Use simple analogies for each step
2. Break down chemical processes into everyday terms
3. Include common misconceptions to avoid
4. Suggest simple at-home observations
5. Check understanding with questions
</instructions>

<format>
– Start with a simple overview
– Progress to detailed explanations
– End with comprehension check
</format>

Prompt Libraries

There are many prompting repositories. Here are some to try out:

Prompt Generators

You can also use AI to generate more sophisticated prompts based on your own early drafts.

  • Claude Prompt Generator (requires log-in)
  • Ask the chatbot! Another resource is the chatbot itself. You can simply ask something like “Can you help me better structure this prompt for an LLM chatbot?” and use conversation steering to refine it.

License

Icon for the Creative Commons Attribution 4.0 International License

Pathways to College Success Copyright © by CWI 101 Leaders is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.