[3/3] A Prompt Pattern Sequence Approach to Apply Generative AI in Assisting Software Architecture Decision-making (Category Architecture)
Continue consideration (1 and 2) whitepaper on the use of Gen AI in architecture, started in the first post, by examining promting patterns.
4) Technical Premises Pattern Using generative AI can lead to hallucination problems that LLM can sometimes solve. But when designing, ensuring the accuracy and reliability of the data used in architectural solutions is essential to the success of any project. Does this pattern help to test the technical prerequisites given by the LLM to ensure the accuracy and reliability of the information used in making the necessary architectural decisions? As a result, the pattern bar is presented below, where the list of technical premises is provided by the LLM and refers to the -ilities of the project.
[Context] and [List of Technical Premises]. From now on, make sure that when generating a response, the AI language model creates a set of specific facts for each technical premise and justification for each architectural decision-making. These facts should be verified and listed at the end of the output. An example of a specific prompt and response looks like so
5) Uncertain Requirement Statement Pattern Uncertainties in project requirements can significantly affect software architecture and lead to risks in the future. To mitigate these consequences, architects should make predictions about the implementation of requirements that were not originally planned or are uncertain. This pattern helps to accommodate these implicit requirements As a result, the dummy pattern is presented below.
Statement Template: In [Project Context], and [Uncertain Aspect].Examine the potential repercussions of not adequately addressing these uncertainties in the system architecture. This assessment will inform our strategic planning and decision-making in software architecture for mitigation, emphasizing creating a system that is not only technologically advanced but also flexible and responsive to regulatory and technological changes. 6) Prompt Pattern Sequence The last pattern from this article tells you how to assemble a chain of calls from previous patterns to analyze architecture. The boys suggest using them that way.
- Define the Role and Objective of the Architect
- Applying the Software Architect Persona
- Evaluate Technical Premises
- Unclear Requirements with Uncertain Requirement Statement
- Refining Quality Attributes with Quality Attribute Question
- Budget and Resources Defined with Architectural Project Context
- Evaluate Results
In the article, the authors gave examples of all the chains of prompts for the three use cases described at the very beginning.
- Prompt Pattern Sequence for Brazilian Financial Bank
- Prompt Pattern Sequence for Brazilian Pharmacies Nationwide
- Prompt Pattern Sequence for CRM Application Cloud-Based for a Startup
In conclusion, the authors state that
Pattern-based Prompt Sequence advocated a strategic approach to leveraging generative AI to assist software architects in navigating decision-making processes. To me, this is a move in the right direction to create a co-architect that helps experienced engineers think about the architecture in their project/product, but so far the resulting chains of prompts look very general - as if chatting with consultants from the development world:) I wonder what will happen if you dotune the model and train it in-company specifics through RAG or fine tune. It's not clear yet, but I'd like to try something inside the company.
#Architecture #GenAI #AI #ML #Software #Engineering #SystemDesign #DistributedSystems #Project