How will AI Impact Software Engineering?
Victor Dibia, PhD
Principal RDSE at Microsoft Research (Generative AI, Agents) | Carnegie Mellon Alumnus
How will software engineering change in the age of strong AI models that can write code and what should individual engineers and teams do to adapt?
An earlier version of this post is available on here.
Generative AI models can now write code. There is an uptick in AI-Assisted software engineering with tools like GitHub Copilot showing a 180% year-over-year adoption increase and revenue run rate of $2 billion over the last 2 years. From simple functions that an LLM can directly generate (reverse a string), to medium complexity apps that are now achievable via multi-agent systems (see Devin, GitHub Copilot workspace, AutoGen).
As a result of the seemingly expanding scope of what these systems can now do, many questions arise - Will AI replace software engineers? Will software engineering degrees still be relevant? How will the software engineering profession change?
This post will try address these questions by covering:
I have also discussed some of the ideas below in a video podcast with Arstechnica and MongoDB in Jan 2024 - AI and the Evolution of Developer Experience [2]
What Can Generative AI Do?
Today's capable Generative AI models (e.g., OpenAI GPT-3.5+, Google Gemini, Anthropic Claude 3.5) can interpret complex problem descriptions (prompts) and generate code solutions. However, due to their probabilistic nature, these models exhibit varying levels of proficiency across different tasks. To understand their capabilities, it's useful to view them along a spectrum of reliability:
High Reliability (today):
Medium/Low Reliability (today)
Note: While AI models themselves fall short in the ways described above, early results indicate a multi-agent approach could address these issues. Frameworks like AutoGen simplify the development of these systems and tools like Devin and GitHub Copilot workspaces illustrate what is possible today.
How Will Software Engineering Change?
In my opinion, the question "How will software engineering change with advances in AI?" is perhaps one of the more consequential matters for our profession. I think we can expect two main types of changes. First, we'll see technical changes directly affecting the core aspects of software development. In addition to Software 1.0 (code, rules), Software 2.0 (ML algorithms learning from data), we will see more advanced Software 3.0+ paradigms (prompting and agents). Second, we'll likely see non-technical changes throughout the software engineering ecosystem. These include shifts in developer roles and required skill sets, adaptations in software development processes (focus on integration of, verification, benchmarking of AI generated code), changes in documentation practices to improve AI-generated code, AI models influencing technological choices, the potential emergence of AI model marketplaces, etc.
From Software 1.0 (writing code to solve problems) to Software 3.0+ (defining agents that address tasks)
Advances in machine learning and generative AI have introduced potentially new ways to create software that solves user problems. In my upcoming book, "Multi-Agent Systems with AutoGen," I describe this change across three phases:
Importantly, there are reliability tradeoffs introduced with probabilistic AI/ML models. As systems become capable of independently addressing tasks (reducing developer or user effort), the complexity and probabilistic nature of models introduce reliability issues. It is likely that future software systems will work best with a careful combination of approaches from Software 1.0, 2.0, and 3.0.
A Shifting Focus to Verification, Benchmarking, Red Teaming:
The cornerstone of software development has long been the pursuit of reliable, bug-free code. This goal has spawned entire sub-industries and processes, including code peer review, software testing, and CI/CD pipelines. Many of these processes are deeply human-centric, built around interpersonal interactions and reputation systems. As AI and generative models become potential contributors to the development process, we will need to adapt these reliability processes to verify reliability of automatically generated code.
This necessitates the development of new verification methods which may take the form of direct correctness checks tailored for AI outputs; AI reputation systems; Human-in-the-loop integration, as demonstrated by GitHub Copilot workspaces etc.
A considerable amount of energy will be spent on systems to verify AI output, benchmark performance (e.g., HuggingFace LLM leaderboards and ScaleAI SEAL benchmarks) and red teaming (see the Microsoft PyRIT tool for finding risks in models) to understand scenarios where models fail or can result in catastrophic errors.
The term red teaming has historically described systematic adversarial attacks for testing security vulnerabilities. With the rise of LLMs, the term has extended beyond traditional cybersecurity and evolved in common usage to describe many kinds of probing, testing, and attacking of AI systems. With LLMs, both benign and adversarial usage can produce potentially harmful outputs, which can take many forms, including harmful content such as hate speech, incitement or glorification of violence, or sexual content. Microsoft Learn - What is Red teaming
Writing Design Docs for Humans AND Machines:
Traditionally, design documents have been written for human developers. However, with the rise of Generative AI (GenAI), we now need to consider both human and AI audiences.
In the Software 3.0 paradigm, it is plausible that humans describe systems they are interesting in within design documents that agents consume these documents to build these systems.
For GenAI to address complex problems effectively, it must understand context and follow specifications laid out in design documents. This presents a challenge due to subtle differences between human communication and effective AI prompts. For example, current Large Language Models (LLMs) can be sensitive to information position within documents. Important instructions may need specific placement or emphasis for AI processing, unlike human-oriented documentation where key information can be spread throughout.
To bridge this gap, we should explore:
IMO, in addition to existing research on automated prompting (e.g. DSPy, etc), more research is needed to understand how best to craft design documents that work well for both humans and AI models/agents.
Developer Habits Driven by Generative AI
As developers increasingly adopt generative AI, it's likely to influence coding habits and technology choices. This is in fact similar to how recommender algorithms are altering social dynamics (who we follow on Twitter, information we are exposed to etc) [3]. This trend is driven by two key factors:
This bias towards established technologies can be problematic, as it may hinder the adoption of newer, potentially superior solutions.
Model and Data Marketplaces
To address the challenge of Generative AI models “"favoring” established libraries/tools, we can envision the emergence of marketplaces aimed at enhancing AI models' performance for specific products. Two primary approaches are likely:
These marketplaces would enable interested parties to contribute artifacts that optimize AI models for their products. This could help level the playing field for newer or niche technologies, ensuring they receive fair consideration in AI-assisted development environments.
Junior Engineer Jobs Will Evolve
Our previous observations on what AI can do today suggest that AI excels at small, compact tasks with high reliability—tasks typically assigned to junior engineers. Consequently, we may see junior roles pivot towards AI integration, verification, benchmarking, and red teaming as discussed earlier.
However, this shift presents a conundrum. If junior engineers aren't writing code or building systems from the ground up, it may interfere with the traditional learning path that develops them into senior engineers. In addition, this hands-on expertise is crucial for effectively creating the verification and benchmarking systems needed in an AI-augmented development environment.
As the industry adapts to these changes, finding new ways to cultivate deep technical understanding and problem-solving skills in early-career developers will be critical. This may involve reimagining software engineering education and creating novel on-the-job training approaches that blend AI-assisted development with foundational coding experiences.
What Should You Do About it?
Given all the changes that might occur, what can individual engineers, engineering teams and organizations do?
Individual Engineers
With AI, we can expect a rise in superficially appealing but low-quality content. But that doesn’t mean there’s no place for craftsmanship.
Engineering Teams
Engineering teams face both challenges and opportunities in the era of AI-assisted software development. To navigate this landscape effectively, teams should consider the following strategies:
By implementing these strategies, engineering teams can harness the power of AI while maintaining high standards of code quality, fostering innovation, and ensuring the continuous growth of human expertise.
Conclusion
Generative AI is rapidly changing the landscape of software engineering, but it's not likely to fully replace human engineers in the near future. While AI can reliably handle many coding tasks, from writing simple functions to generating medium-complexity applications, it still struggles with niche problems, complex end-to-end systems, and tasks requiring deep contextual understanding.
I tend to get the question “is a software engineering degree still worth it”. My answer is - what engineers do will likely change, but the degree and learning will remain valuable!
In my opinion, the software engineering profession will evolve rather than become obsolete, with a shift towards higher-level design, system architecture, and AI supervision. Software engineering degrees will remain relevant, but their focus may change to include AI literacy and integration skills.
The future of software engineering will likely involve a blend of traditional coding (Software 1.0), machine learning (Software 2.0), and AI-driven development including agents (Software 3.0+).
Engineers (especially junior engineers) will be well-served by focusing on critical thinking, problem-solving, and effective communication of designs and requirements to AI systems. They'll also need to develop skills in AI prompt engineering, verification, and benchmarking.
However, this shift raises potential issues, such as the risk of deskilling junior engineers as AI takes over more basic coding tasks. There's a concern about how future senior engineers will develop if they don't have the opportunity to start as juniors writing code from scratch.
References
freelancer
3 个月ebooksbyai.com AI fixes this Advances in AI code-writing discussed.
Research Scientist @ Texas A&M University | AgriLife Research | AI, Machine Learning, Deep Learning
6 个月Insightful post and much needed in these times!
Engineering Manager (Machine Learning)
6 个月Thanks for sharing your insights on this very pertinent topic. I wonder what impact it will have on the capability of fresh grads to make the leap to senior on the traditional path if their learning was AI assisted. I think the traditional path will need to fully evolve. Very likely we will have trusted AI foundational models and frameworks like we have for certain libraries and development frameworks used in many languages and domains today and the next gen developer will just build on top of them, while only a small number of people iterate on the next leap of these models and frameworks.
AI, art & design
6 个月A very well written post, Victor Dibia, PhD! I highly recommend this for anyone studying, entering or working in the software engineer field.
Staff AI Engineer at LendingTree
6 个月I think this is the most clear-eyed imagining of how software engineering will change, worth the read