A Tutorial on Prompt Engineering: From Messy Thoughts to AI Workflows
Erfan Loweimi, Hadi Daneshvar, Samira Loveymi, Samir Ouelha, Zhengjun Yue, Hajar Mozaffar, Saturnino Luz
Abstract
This paper treats prompt engineering as a discipline for turning informal human intent into structured AI work specifications. It develops the practice as a sequence of reusable design moves: define the work, construct only the context the answer depends on, choose a role, or a moderated panel of roles, as an attention lens, and state affirmative quality targets, reserving prohibitions for hard boundaries. To keep prompts lean, it adapts two classical principles, Occam's razor and Chekhov's gun, so that every instruction earns its place. For consequential tasks, it adds structured critique through steelmanning and premortems, followed by verification and, where tools or multi-step actions are involved, agentic operating loops with explicit boundaries and escalation. Aimed at a general readership, this tutorial is not a benchmarking study; it offers a practical, technically grounded path from casual prompting to disciplined AI workflow design, illustrated by a worked example that carries one task from a weak prompt to a strong specification. The framework is presented as principles and checklists that remain useful as models and tools change. The strongest prompt is rarely the longest prompt; it is the one that makes desired behaviour, required sources and checks, and success criteria unmistakable.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.HC
Related papers
MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding Variance
Shared title terminologycs.CLTruong Phan, Ngoc-Quan Pham, Dat Quoc Nguyen
Lightweight Reasoning Transfer via Chain-of-Thought Vector Projection
Shared title terminologycs.CLYulin Qi, Shuo Xu, Shuxia Lin et al.
Reliable User Simulation in Complex Multi-Step Workflows
Shared title terminologycs.CLPusala Pavan Teja, Jayasimha Talur, Saab Mansour et al.
Evaluating Ukrainian Grammatical Competence in Language Models: Probability Versus Prompting
Shared title terminologycs.CLDmytro Babarytskyi, Oleksandr Babarytskyi, Vadym Savanevych
Residual Cross-Model Narrative Convergence under Shared Prompts: Auditing Prompt Controls and Narrative Measurement
Shared title terminologycs.CLMehdy Sedaghat Payam
When Victorian Becomes a Prompt: Literary Periodization as a Generative Constraint in 100 AI-Generated Novels
Shared title terminologycs.CLMehdy Sedaghat Payam