
Generative AI & Prompt Engineering: Case Studies in Practice, Ethics, and Design
The rise of generative artificial intelligence (AI), particularly large language models (LLMs) and diffusion-based image generators, has transformed creative, technical, and professional practices across a range of domains. Central to harnessing the capabilities of these models is the discipline of prompt engineering—the art and science of crafting effective instructions to guide AI outputs. As generative AI becomes embedded in sectors as diverse as requirements engineering, web automation, education, and creative arts, prompt engineering emerges not only as a technical skill but also as a site of ethical, social, and design negotiation.
This article examines the interplay between generative AI and prompt engineering through a series of interconnected case studies. Drawing exclusively on recent academic contributions, the discussion explores (1) domain-specific guidelines for prompt engineering in requirements engineering, (2) frameworks for responsible and reflexive prompt crafting, (3) empirical evaluations of prompt strategies in web crawling automation, (4) educational interventions for youth engagement with generative AI, and (5) design research reframing prompt engineering as “prompt craft.” Through these cases, the article interrogates not only the efficacy of prompt engineering techniques, but also their broader implications for ethics, accessibility, and human creativity.
Prompt Engineering in Requirements Engineering: Guidelines and Gaps
The application of generative AI to software requirements engineering (RE) is a rapidly emerging field, promising to streamline complex tasks such as requirements classification, prioritization, and traceability. However, the quality and reliability of LLM-generated outputs are highly sensitive to the design of prompts. In their systematic review and expert study, Ronanki et al. (2025) identify critical gaps in domain-specific guidance for prompt engineering within RE, mapping out both the opportunities and limitations of current practices.
Ronanki et al. (2025) observe that, although natural language processing (NLP) and deep learning have advanced RE tasks, existing approaches often require large amounts of labeled data and remain focused on classification and analysis rather than generation. With the advent of powerful LLMs, prompt engineering becomes a crucial lever for leveraging pre-trained models in RE without extensive retraining. The authors’ systematic review identifies 36 prompt engineering guidelines, clustered into nine themes: context, persona, templates, disambiguation, reasoning, analysis, keywords, wording, and few-shot prompting. Of these, “context,” “reasoning,” and “wording” emerge as particularly influential in shaping LLM responses (Ronanki et al., 2025).
Expert interviews conducted as part of the study reveal both the promise and the challenges of applying these guidelines to RE activities. Advantages include increased efficiency, reduced need for labeled data, and improved consistency in requirements documentation. However, limitations persist around ambiguity, domain specificity, and the risk of hallucinated or inconsistent outputs. Ronanki et al. (2025) emphasize that, while generic prompt engineering patterns (such as few-shot prompting or chain-of-thought reasoning) can improve LLM performance, their effectiveness often hinges on careful adaptation to the unique language and logic of RE.
The authors conclude with a call for future research into standardized, domain-sensitive prompt engineering frameworks for RE—a need echoed across other fields exploring generative AI integration (Ronanki et al., 2025).
Responsible and Reflexive Prompt Engineering: Ethics, Accountability, and Governance
As generative AI systems become more powerful and widely deployed, prompt engineering also takes on ethical and governance dimensions. Djeffal (2025) articulates a comprehensive framework for responsible prompt engineering, positioning it as a critical interface between technical system behavior and societal values. The author argues that prompt engineering is not merely about optimizing outputs, but about embedding principles of fairness, accountability, and transparency directly into AI interactions.
Djeffal (2025) proposes a five-component model for responsible prompt engineering: (1) prompt design, (2) system selection, (3) system configuration, (4) performance evaluation, and (5) prompt management. This framework is grounded in a review of both academic literature and real-world incidents, such as the controversies around Google’s Gemini AI image generator, which produced historically inaccurate and biased outputs due to prompt design flaws. Such cases underscore the profound societal impact of prompt choices, and the need for systematic oversight.
Prompt design, in this framework, includes the crafting of instructions that maximize desired outputs while minimizing risks, such as bias or inaccuracy. System selection and configuration involve choosing appropriate models and adjusting parameters (e.g., temperature settings) to align with intended use cases. Performance evaluation requires both quantitative metrics and human-in-the-loop assessments to ensure outputs meet ethical and functional standards. Finally, prompt management advocates for rigorous documentation, version control, and iterative refinement—practices that support accountability and traceability (Djeffal, 2025).
Crucially, Djeffal (2025) contends that responsible prompt engineering must move beyond technical optimization to actively consider legal, ethical, and social implications. This includes designing prompts to prevent discriminatory outcomes, ensuring accessibility, and promoting inclusive representation. The framework aligns with the broader “Responsibility by Design” movement, embedding ethical considerations throughout the AI deployment lifecycle rather than treating them as afterthoughts. In doing so, prompt engineering becomes not only a technical discipline but also an instrument of AI governance.
Empirical Evaluation: Prompt Engineering and Generative AI in Web Crawling Automation
The practical efficacy of prompt engineering is further illuminated in the context of automated web crawling—a domain characterized by the need for adaptability, robustness, and code quality. Huang (2024) compares the performance of two leading generative AI tools, Claude AI and ChatGPT-4.0, in generating Python scripts for web scraping tasks, using two distinct prompt types: general inference and element-specific targeting.
Huang (2024) finds that prompt specificity significantly affects the quality and adaptability of AI-generated code. PROMPT I (general inference) instructs the AI in broad terms, relying on its ability to deduce the structure of a webpage, while PROMPT II (element-specific) provides explicit instructions about which HTML elements to extract. The study demonstrates that Claude AI consistently outperforms ChatGPT-4.0 in script modularity, readability, and robustness, especially when prompts are highly specific (Huang, 2024).
The evaluation employs metrics such as code functionality, modularity, error handling, and adaptability to changes in webpage structure. PROMPT II, which specifies exact HTML elements, yields scripts with higher precision and reliability—albeit requiring more prior knowledge from the user. PROMPT I, in contrast, offers greater flexibility for exploratory tasks but may produce less precise or error-prone outputs. The results highlight the trade-offs inherent in prompt engineering: balancing ease of use, adaptability, and specificity to match task requirements (Huang, 2024).
Moreover, the study underscores the role of prompt engineering in democratizing access to technical workflows. By enabling users to generate functional scripts through natural language instructions, generative AI tools lower barriers for non-specialists while enhancing productivity for experienced developers. Huang (2024) ultimately illustrates that effective prompt engineering is central to unlocking the full potential of generative AI in practical automation scenarios.
Pedagogical Case Study: Generative AI, Prompt Engineering, and Youth Education
The societal impact of generative AI and prompt engineering extends into education, where these technologies offer new avenues for creative expression, technical learning, and ethical reflection. Ali et al. (2023) present an educational intervention—“Dreaming with AI”—in which high school students use text-to-image generative tools to visualize their imagined future identities. This workshop not only introduces students to the technical workings of generative AI but also engages them in critical discussions about its societal benefits and harms.
Ali et al. (2023) observe that students achieve creative learning objectives by iteratively refining their prompts to better match their envisioned outputs, thereby developing practical skills in prompt engineering. Technical objectives include understanding the abilities and limitations of text-to-image generation algorithms, mapping visual features to prompt components, and recognizing the influence of training data on outputs. Ethically, students identify risks such as algorithmic bias, misinformation, privacy concerns, and the potential for generative AI to reinforce harmful stereotypes or infringe on creative ownership (Ali et al., 2023).
The workshop leverages a constructionist approach, emphasizing hands-on creation, self-expression, and peer sharing. Students reflect not only on the technical aspects of prompt engineering (e.g., how wording and specificity affect image generation) but also on broader policy questions regarding AI’s role in classrooms. Ali et al. (2023) demonstrate that prompt engineering is both a site of creative agency and a locus for developing critical AI literacy among youth. This case underscores the necessity of integrating technical, creative, and ethical education as generative AI becomes ubiquitous in society.
From Prompt Engineering to Prompt Craft: Design Research, Embodiment, and Materiality
While much of the literature conceptualizes prompt engineering as a technical or procedural activity, Lindley and Whitham (2024) propose a reframing toward “prompt craft”—an embodied, iterative, and material practice. Through a series of design research projects with diffusion-based image generators (e.g., Stable Diffusion), the authors explore how tangible, collaborative, and playful interactions can shape both the process and experience of prompt engineering.
Lindley and Whitham (2024) report on projects such as Shadowplay (an art installation using body shadows as input for AI image generation) and Cardshark (a workshop tool employing physical prompt fragment cards to collaboratively construct meta-prompts). These interventions highlight the “materiality” of generative AI—the ways in which physical interaction, sensory feedback, and the affordances of the tools mediate the crafting of prompts and the negotiation of meaning.
The authors argue that prompt craft is characterized by oscillation between systematic experimentation (e.g., testing prompt fragments, adjusting model parameters) and creative improvisation (e.g., playful exploration, spontaneous adjustment of input modalities). The process is inherently iterative and responsive, embracing uncertainty and leveraging serendipity as a source of discovery. Notably, prompt craft foregrounds the user’s embodied engagement with the AI system, transforming prompt engineering from a purely linguistic activity to a multisensory, collaborative, and social experience (Lindley & Whitham, 2024).
This design-oriented perspective expands the conceptual and practical horizons of prompt engineering, suggesting new directions for interface design, accessibility, and the democratization of generative AI. It also raises critical questions around authorship, ownership, and the agency of both human and machine in creative production.
Conclusion
Across professional, educational, and creative contexts, prompt engineering stands as a linchpin in the effective, ethical, and imaginative use of generative AI. The case studies examined in this article reveal that prompt engineering is not a monolithic technical procedure, but a complex practice encompassing domain-specific adaptation, ethical reflection, empirical evaluation, creative expression, and embodied design.
In requirements engineering, the need for standardized, context-sensitive prompt guidelines is acute, as generic strategies often fall short in specialized domains (Ronanki et al., 2025). Responsible prompt engineering frameworks emphasize the integration of ethical, legal, and societal values at every stage of AI deployment, moving beyond narrow optimization toward broader governance (Djeffal, 2025). Empirical studies in automation demonstrate that prompt specificity and adaptability are key to maximizing the utility of generative AI tools (Huang, 2024). Educational interventions reveal that prompt engineering can foster both technical proficiency and critical digital literacy among youth (Ali et al., 2023). Finally, design research points to the potential of “prompt craft” as an embodied, social, and material practice, opening new pathways for human-AI collaboration (Lindley & Whitham, 2024).
As generative AI continues to evolve, the stakes of prompt engineering—in terms of both opportunities and responsibilities—will only grow. Future research and practice must therefore attend not only to technical efficacy, but also to the ethical, social, and creative dimensions of this emerging field.
References
Ali, S., DiPaola, D., Williams, R., Ravi, P., & Breazeal, C. (2023). Constructing Dreams using Generative AI. Retrieved from http://arxiv.org/pdf/2305.12013v1
Djeffal, C. (2025). Reflexive Prompt Engineering: A Framework for Responsible Prompt Engineering and Interaction Design. Retrieved from http://arxiv.org/pdf/2504.16204v1
Huang, C.-J. (2024). The Synergy of Automated Pipelines with Prompt Engineering and Generative AI in Web Crawling. Retrieved from http://arxiv.org/pdf/2502.15691v1
Lindley, J., & Whitham, R. (2024). From Prompt Engineering to Prompt Craft. Retrieved from http://arxiv.org/pdf/2411.13422v1
Ronanki, K., Arvidsson, S., & Axell, J. (2025). Prompt Engineering Guidelines for Using Large Language Models in Requirements Engineering. Retrieved from http://arxiv.org/pdf/2507.03405v1