Skip to content

Revolutionizing Software Architecture with LLMs: A Concept Paper (and potential my next Open Source Project)

K. C. Ramakrishna edited this page Oct 15, 2024 · 2 revisions

Revolutionizing Software Architecture with LLMs

Introduction

Software Architects (especially ones focused on Open Source) are constantly navigating a maze of choices. The proliferation of tools, frameworks, and libraries across ecosystems (Java, Node/npm, Apache, GNU, corporate backed - RedHat, Linux Foundation, containerisation, individual passion projects...)presents both opportunities and challenges.

The task of selecting the right components is not only critical but also time-consuming, often spanning weeks or even months.

Reflecting on experiences with projects like UDAN, the complexities become evident:

  • Effort involved in selecting IAM: Selecting Keycloak for its open-source robustness.
  • Database Choice: Opting for MariaDB over PostgreSQL due to team familiarity.
  • Backend Framework: Adopting Java Quarkus for its performance and scalability.
  • Frontend Development: Choosing React with TypeScript to balance popularity, learning curve, and type safety.
  • Additional Services: Utilizing NestJS with TypeScript for rapid development of lightweight web services.

Here are the discussions. You can see that a big chunk of our discussions are around selecting the right tools. You can also see that these discussions took place over months. We used search Engines initially and then slowly started using LLMs/genAI to research individual components.

This meticulous(and laborious) process involved extensive research, evaluation, and prototyping, highlighting significant challenges:

  • Overwhelming Options: Keeping up with new packages and components is daunting for an individual or even a small group of individuals.
  • Intensive Evaluation: Reading documentation, assessing popularity, and conducting proofs of concept require substantial effort.
  • Complex Decision Factors: Considerations include interoperability, future-proofing, risk management, team learning curves, compliance, and more.
  • Feverishly Second Guessing ourselves: We were always paranoid that we were missing something important in the considerations which might lead us to select the wrong component and we will end up spending weeks to replace it somewhere down the line.

This lead us to wonder on how to Harness LLMs for this task.

Here is our initial 15 mins of exploration "o1 preview": https://poe.com/s/zwFAtlSBMmA3vD098GGL We can imagine the potential of a fine tuned model or a collection of fine tuned Agents. It can ask questions on skills of current team (even ask for uploading resumes for summary), preferences in technology i.e. React vs. Angular, JS vs. TS, RDBMS vs. noSQL etc and spit out a well-reasoned architecture in mins.

Some approaches that I can think of:

  1. Unmodified LLM with just prompting
  2. Fine tuned LLMs (or LLMs + RAG)
  3. Agentic Approach - Swarm of fine tuned LLMs + Periodic update of relevant data (commit velocity, release velocity, npm trends, google trends etc.)
  4. We can improve the quality by periodically updating it with data like: popularity of various packages, momentum of framework adoption, commit and release activity, general market news (mySQL bought by Oracle etc) The Agent need not solve 100% of the problem. It will be extremely useful if it solves partial problems too. Architecture can move from gut feel and also come down from months to weeks.

This can provide multiple benefits:

  • Simplifying Research: Automatically searching and summarizing relevant packages and components across ecosystems.
  • Providing Informed Recommendations: Evaluating options based on factors like interoperability, maturity, security, and licensing.
  • Customizing to Team Needs: Considering the team's existing skills and preferences to suggest compatible technologies.
  • Staying Current: Continuously updating with data on package popularity, release activity, and industry trends.

Why This Matters

  • Efficiency Gains: Shift architecture planning from months to weeks or even days.
  • Enhanced Decision-Making: Base choices on comprehensive, up-to-date information and in-depth comparisons.
  • Empowering Teams: Enable architects and developers to focus more on innovation and less on groundwork.
  • Driving Industry Progress: Contribute to a tool that can benefit the broader software development community.

Ethical Considerations for the project

  • Open Source Commitment: Embrace transparency and collective progress by making this project open to all.
  • Inclusivity and Collaboration: Foster a welcoming environment where diverse perspectives are valued.
  • Responsible AI Use: Ensure the LLMs are used ethically, avoiding biases and promoting fairness. i.e. ensure fairness in recommending the right components without being biased by nationality, ethnicity of the component developers etc.

First steps:

  1. Need to search is someone has already started something similar.
    1. Some obvious communities will be openDevin, Devika or similar software Agents.
    2. Search Coding sub-reddits (and reddit in general) and github.
    3. Other LLM and prompt engineering forums and ecosystems.

Depending on what the above research throws up, we can assess if its worth investing time and effort in building this solution.

Clone this wiki locally