Prompt Engineering Guide

A guide to support your work with LLMs.
In this Section

A Practical Guide to AI Communication

At Wisconsin’s Polytechnic University, we provide hands-on, applied learning that prepares students for real-world challenges. As artificial intelligence (AI) and generative artificial intelligence (GenAI) reshape industries, understanding how to effectively communicate with AI systems is a valuable skill that can enhance productivity, creativity, and problem-solving across disciplines.

Prompt engineering is the process of writing precise, structured inputs to guide AI models in generating useful and relevant responses. But it is also the process of effectively reviewing the AI's response and potentially revising your inputs for continued success. Whether you're a student, researcher, educator, or industry professional, learning how to engage with AI effectively can accelerate your work, enhance critical thinking, and open new opportunities for innovation.

This guide provides a practical approach to prompt engineering, helping you build confidence in working with AI and its capabilities to support your goals.

What is Prompt Engineering?

Prompt engineering is the skill of designing clear, structured inputs that enable AI tools to generate accurate, useful, and relevant outputs. As previously noted, prompt engineering is also the act of reviewing the output from the AI to guide further communication. AI models, such as ChatGPT, don’t think like humans; they generate responses based on patterns in vast amounts of data. Your ability to communicate effectively with AI technology determines the quality of the responses you receive.

 

How to Write Effective Prompts

A well-written prompt typically consists of four key elements: role, context, instruction, and example.

  1. Role. The tone, style, or personality the AI should adopt in its response. Would you like your AI to act as a "helpful assistant" or a "confident consultant".
  2. Context. Provide the necessary background and information. What situation or task is your AI engaging or supporting?
  3. Instruction. The directive of the prompt. The instruction specifies the task you want the AI to perform. Clarity is important here to avoid ambiguity.
  4. Examples. Offer the AI examples when the task is complex or requires specific formatting. Examples afford the AI a model to follow, which can help support the output matching your expectations.

By combining these elements, you can engineer prompts that are clear, targeted, and capable of extracting precise responses from the AI.

 

What is the Prompting Cycle?

The prompting cycle refers to the iterative process of engaging with an AI to ensure continuous improvements of the output. The cycle involves four key steps:

  1. Input. This is the initial prompt you provide to the AI.
  2. Output. The AI generates a response based on your input.
  3. Review. Critically evaluate the AI's response.
  4. Revise. Refine your original prompt to improve the next output.

Types of Prompts and Their Applications

Prompt TypeDescriptionExample
Zero-shotAsking AI a direct question with no examples.“What are the key principles of sustainable design?”
One-shotProviding a single example to guide AI’s response.“Write a press release about a new product launch. Example: [insert sample].”
Few-shotGiving multiple examples to establish a pattern.“Create five social media captions for a travel blog. Here are three examples: [list examples].”
Chain-of-ThoughtEncouraging step-by-step reasoning for complex problems.“Solve this physics problem by explaining each step before giving the final answer.”

Artificial Intelligence

All Artificial Intelligence News
Schools are harnessing artificial intelligence to revolutionize courses in hospitality management Featured Image

Schools are harnessing artificial intelligence to revolutionize courses in hospitality management

Professor Betsy Pudliner details how AI is fueling a course in UW-Stout's B.S. Hotel, Restaurant & Tourism Management program.
AI, fully integrated: UW-Stout’s 360-degree approach to artificial intelligence embeds skills across all programs Featured Image

AI, fully integrated: UW-Stout’s 360-degree approach to artificial intelligence embeds skills across all programs

‘Equipping students from every major with AI skills is not only important but necessary.’
Marriage and family therapy professor awarded for advancing AI integration with therapy Featured Image

Marriage and family therapy professor awarded for advancing AI integration with therapy

Hessel receives Carl Whitaker Award from state professional association