What Prompt Engineering Teaches Us About Requirements Gathering for Software
Everyone that has ever been involved with the Software Development LifeCycle (SDLC), has been through requirements gathering. We've all heard "garbage in, garbage out", "you get out what you put in", and my favorite: "the computer doesn't know what you meant" (less true every day, but still funny).
Prompt Engineering, the process of defining and refining prompts (questions) for AI (ChatGpt, CoPilot, etc.) is the same way!
There are several parallels between good prompt engineering in AI and good requirements definition in the Software Development Life Cycle (SDLC). Both processes are foundational to success and share core principles. Here are key parallels:
1. Clarity and Precision:
? In prompt engineering, the clearer and more specific the prompt, the more accurate and relevant the AI output (Brown et al., 2020). Similarly, in requirements definition, clear and precise requirements lead to software that better meets the stakeholders’ needs (Wiegers & Beatty, 2013).
2. Understanding the Context and Goals:
? Good prompt engineering requires understanding the context and goal of the AI interaction. What is the user seeking to achieve? Similarly, in SDLC, defining the requirements starts with understanding the project’s objectives, user needs, and business goals (Sommerville, 2016).
3. Iteration and Refinement:
? Often, prompt engineering involves testing and refining prompts based on the output to improve results. This is similar to how requirements evolve during the SDLC. Requirements are frequently revisited and refined as more is learned during the project, especially in agile or iterative methodologies (Wiegers & Beatty, 2013).
4. Anticipating Edge Cases:
? In prompt engineering, you need to anticipate how the AI might misinterpret ambiguous or vague prompts and account for it. In SDLC requirements definition, identifying potential exceptions, edge cases, or scenarios that may not be immediately obvious is critical for robust design and development (Brown et al., 2020).
5. User-Centric Focus:
? Effective prompt engineering is about designing prompts that align with the user’s expectations to get the best results. In SDLC, gathering and defining requirements is centered around the end user’s needs, ensuring the final product serves its intended purpose effectively (Sommerville, 2016).
领英推荐
6. Leveraging Constraints:
? Constraints (e.g., time, scope) guide both prompt engineering and requirements definition. In prompt engineering, constraints narrow the focus for better results. In SDLC, they help define the scope and boundaries of the project to ensure feasibility (Wiegers & Beatty, 2013).
7. Ambiguity Minimization:
? Minimizing ambiguity is essential in both cases. A vague prompt may lead to irrelevant AI responses, just as vague requirements can lead to software that misses the mark or is misinterpreted by developers (Brown et al., 2020).
8. Communication and Collaboration:
? Prompt engineering, like requirements gathering, is an interactive process that often requires back-and-forth communication to refine. Similarly, successful requirements definition involves collaboration between stakeholders, developers, and users to ensure accuracy and feasibility (Sommerville, 2016).
Both prompt engineering and requirements definition act as the foundation for their respective processes, dictating the quality of the final output—whether that’s an AI response or a software product.
References
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., … & Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 33, 1877-1901.
Sommerville, I. (2016). Software engineering (10th ed.). Pearson.
Wiegers, K., & Beatty, J. (2013). Software requirements (3rd ed.). Microsoft Press..
Founder, NeuroCIO - Building agent libraries for leaders
1 个月I think people are more open to clearly defining prompts than requirements sessions. I wonder how we could combine the two to make them more productive and effective? Executives are excited about learning prompt engineering (gross generalization, I know).