[2/3] A Prompt Pattern Sequence Approach to Apply Generative AI in Assisting Software Architecture Decision-making (Category Architecture)
Continue. consideration whitepaper on the use of Gen AI in architecture, started in the first post, by examining promting patterns.
1) Software architect persona pattern It is a pattern that extends the persona pattern, where the point is that AI generates content relevant to the architect, that is, it is accurate and addresses the problems that architects face. This is achieved by creating queries that clearly define the role of the software architect, the purpose, and the limitations of the target design solution. Here's a prompt template from the authors
You are [Persona’s Name] in the role [Role]. Your main goal is [Main Goal]. You cannot [Limitations/Constraints]. As an example, the following is given: You are a Senior Software Architect specializing in cloud-based solutions.Your main goal is to optimize system scalability and performance. You cannot propose solutions that significantly increase operational costs.
2) Architectural project context The authors propose to define the context of the project through three key factors. Operational, such as available development time Organizational, such as team size Financial, such as project budget These factors directly affect the feasibility and direction of architectural decisions, which requires a pattern that effectively integrates these elements into the decision-making process. Interestingly, the authors here consider the design approach of implementing large architectural changes. Here's a prompt template from the authors
Given a development timeline of [Time], a team of [Team Size], and a budget of [Budget], determine if the proposed architecture [Architecture Description] is feasible and can meet the project requirements without compromising on quality. As an example, the following is given: Given a development timeline of 6 months, a team of 10 developers, and a budget of $500k, determine if implementing a microservices-based architecture for our e-commerce platform is feasible and can deliver the required scalability and performance within these constraints. As for me, this description of the context of the project seems too poor, I would like to see what output LLM looks like if you feed it a full description:)
3) Quality attribute question pattern To design a quality architecture, you need to correctly define functional and non-functional requirements, as well as highlight the desired quality attributes. Then you can choose architectural patterns, tenologies and everything else. In this pattern, the authors suggest teaching an AI assistant to ask questions to living architects just to highlight these key attributes of quality. This is what the prompt pattern looks like.
You are [Role] responsible for [Description Project]. Your primary focus is to design an architecture that excels in [List Of The Quality Attribute]. Your task is [Decision-making Process]. You should ask [Clarify Doubts]. [Recommendations]. Additionally, provide a [Comprehensive Prompt].
As an example, the following is given:
Uou are an experienced software architect responsible for creating a credit card processing system for a medium-sized financial institution. Your primary focus is to design an architecture that excels in scalability, security, and performance. Your task is to carefully navigate through the decision-making process of the credit card processing system architecture step by step. You should ask any necessary questions to clarify doubts about the quality attributes of the new system. Avoid making any architectural decisions until all questions are answered. Additionally, provide a comprehensive prompt that includes all the data collected in the previous steps, along with an explanation of the rationale behind each architectural decision-making.
Continued review of patterns and their sharing in next post.
#Architecture #GenAI #AI #ML #Software #Engineering #SystemDesign #DistributedSystems #Project