urbanisation-si.com

urbanisation-si.com

ChatGPT, l’outil idéal de réalisation de modèles pour l’Architecture d’Entreprise et l’Urbanisation du Système d’Information ?

Dans notre quête du Graal pour outiller les méthodes d’AE et d'urbanisation du SI et plus généralement pour la modélisation multiparadigmes, nous avons testé ChatGPT pour la production de code PlantUML (voir notre article : Texte vers UML et autres outils de "diagrammes en tant que code" - Le moyen le plus rapide de créer vos modèles ? ) pour des vues ArchiMate et XMI pour des diagrammes UML et BPMN. L'intérêt d'avoir les diagrammes sous forme de code facilite entre autres la mise en œuvre de MDA (Model Driven Architecture).

DALL·E-An-illustration-for-a-technical-article-about-a-dialog-betwen-a-developer-and-a-chat-bot-generating-code   

Évidemment, nous avons demandé à DALL·E, une autre IA d'OpenAI,
spécialisée dans la génération d'images à partir d'une description textuelle, d'illustrer notre article.

"An illustration for an article about a chatbot generating code for diagrams".

 

Un générateur de code qui tient compte de ses erreurs

A quoi sait-on qu’une nouvelle technologie peut vraiment changer la donne ? Quand elle suscite la panique chez les leaders installés du secteur, tout autant que leur convoitise. Présenté pour la première fois fin novembre par OpenAI, le bot conversationnel ChatGPT n’a mis que quelques jours pour devenir le sujet de discussion numéro 1 de la planète numérique.


ChatGPT se révèle être à la fois :

  • un moteur de recherche donnant immédiatement et exactement le résultat sans avoir à ouvrir plusieurs liens,
  • un Wikipédia,
  • un générateur de contenu,
  • un traducteur,
  • un agent conversationnel mémorisant tous les éléments du dialogue lui permettant d’affûter ses réponses. Chaque conversation est stockée, pour être potentiellement reprise ultérieurement,
  • un générateur et vérificateur de code informatique ayant absorbé tous les codes trouvés sur internet jusqu’à fin 2021. 

C’est cette dernière fonctionnalité qui nous intéresse ici.

 

En lui fournissant des informations supplémentaires, comme des données contextuelles ou des préférences utilisateur, ChatGPT formule une réponse encore plus en adéquation avec le sujet demandé. De manière similaire à une conversation entre 2 humains, où la reformulation est le moyen le plus efficace pour se faire comprendre et en procédant par itérations de plus en plus précises, nous avons constaté que ChatGPT affine sa compréhension des attendus et fournit un meilleur résultat.

 

Le système fait également croire qu’il peut se corriger. Si l’utilisateur n’est pas satisfait d’une réponse, il peut demander de recommencer, et recueillir ensuite une meilleure réponse. ChatGPT ne comprend pas son erreur, mais comme c’est un système probabiliste qui fournit la meilleure réponse parmi plusieurs possibles, il finit par proposer les suivantes dans la liste.

 

Nos tests (les codes générés se trouvent en annexe 1)

Pour connaître l'environnement de nos essais, les reproduire et les adapter, vous pouvez vous reporter à l'annexe 1 à la fin de cet article.

 

Nous avons choisi de converser avec ChatGPT en anglais sachant que le domaine abordé est plutôt anglophone, ce qui n’aurait pas été le cas si nous lui avions demandé de disserter sur l'œuvre romanesque de Proust.

 

Test #1

Code PlantUML d'une vue ArchiMate d'un processus de prêt bancaire

Étant néophytes pour la génération de code PlantUML pour des vues ArchiMate avec ChatGPT, nous nous lançons avec une première demande relativement basique. 

 

Question :

 

"Give me the code for PlantUML corresponding of an ArchiMate diagram for a bank loan process"

 

Résultat :

 

Le résultat est un diagramme de classes UML largement satisfaisant pour un débutant en UML.

 

chatgpt-01bis-code-PlantUML-ArchiMate-diagram-bank-loan-process 

ChatGPT a généré du code PlantUML représentant un diagramme de classe
alors qu'on lui a demandé un diagramme ArchiMate. Il a pris le type de diagramme par défaut.

 

A priori, ChatGPT n’a pas tout à fait compris que nous voulions une vue ArchiMate un peu plus consistante.

 

Nous allons alors lui indiquer le code de démonstration pour ArchiMate fourni par PlantUML et nous lui demanderons de générer un code similaire pour un prêt bancaire.

 

Test #2

La même demande après lui avoir donné un exemple

Question :

 

"Can you generate a similar plantuml code for a bank loan process"

 

Résultat :

 

chatgpt-02-similar-plantuml-code-ArchiMate-diagram-bank-loan-process 

Résultat après lui avoir indiqué un exemple et lui avoir dit que nous voulions le même type de code

 

Nous avons une vue faisant intervenir les niveaux métier et applicatif. Des relations de composition relient les processus. Les services applicatifs fournissent des fonctionnalités au processus et les composants réalisent les services.


ChatGPT a compris que nous voulions incorporer dans le diagramme un titre et une légende qui sont souvent négligés et fastidieux à mettre en œuvre.

 

ChatGPT mémorise tous les échanges, nous pouvons donc lui demander de détailler tour à tour chacun des sous-processus. 

 

Test #3

Zoom sur le sous-processus de vérification

Question :

 

"Like the previous plantuml diagram, can you give me the plantuml code for the Verification process ?"

 

Résultat :

 

chatgpt-03-similar-plantuml-code-ArchiMate-diagram-bank-loan-verification-process 

Zoom sur le processus de vérification

 

Nous avons demandé le détail de tous les sous-processus composant le prêt bancaire.

Les autres codes générés n'ont pas été intégrés à cet article, mais restent disponibles sur demande.

 

Test #4

Description textuelle du cas d'utilisation ""Demander un prêt bancaire"

Examinons maintenant ce que va nous donner ChatGPT pour le cas d'utilisation cas d'école "Demander un prêt bancaire".

 

Question :

 

"Lets define a simple use case in bank loan, something that is very well established and easy to understand"

 

Réponse :

 

Sure, let's consider the use case of obtaining a personal loan from a bank.

 

Here's how the process might work:

 

  1. A customer starts by researching different banks and comparing their personal loan options.
  2. Once the customer has found a loan that they are interested in, they complete a loan application, which requires them to provide personal and financial information, such as their income, employment history, and credit score.
  3. The bank uses this information to determine the customer's creditworthiness and assess their ability to repay the loan.
  4. If the customer is approved for the loan, they receive an offer with the loan terms, including the interest rate, monthly payment amount, and repayment period.
  5. If the customer accepts the loan offer, they sign the loan agreement and provide any necessary documentation, such as proof of income or collateral.
  6. The bank then disburses the loan funds to the customer, either as a lump sum payment or in installments.
  7. The customer then repays the loan over time, including both the principal amount and the interest, according to the terms agreed to in the loan agreement.

 

This is just a basic example of how a personal loan from a bank works, but it should give you an idea of how individuals can use loans to access the funds they need for a variety of purposes, from paying for large expenses to consolidating debt.

 

Test #5

Tableau du modèle métier d'un prêt bancaire

Évidemment il s'agit du processus standard. Pour un cas plus spécifique, il suffirait d'ajouter les informations métier supplémentaires.

Demandons-lui le modèle métier sous la forme de tableau au format standard markdown.

 

Question :

 

"Describe the data model in more detail or tabular format using markdown"

 

Réponse :

 

Here is a more detailed and tabular format of the data model for the use case of obtaining a personal loan from a bank:

 

Customer
Attribute Data Type Description
Customer ID Integer Primary key, unique identifier for the customer
Name String Full name of the customer
Address String Physical address of the customer
Phone number String Contact phone number for the customer
Email String Contact email for the customer
Date of birth Date Birthdate of the customer
Social security number String Social security number of the customer
 
Loan Application
Attribute Data Type Description
Loan Application ID Integer Primary key, unique identifier for the loan application
Customer ID Integer Foreign key, reference to the customer who submitted the loan application
Loan amount Decimal Total amount requested in the loan application
Loan purpose String Purpose of the loan as stated by the customer in the application
Status String Current status of the loan application (e.g., pending, approved, denied)
Date submitted Date Date on which the loan application was submitted
 
Loan Offer
Attribute Data Type Description
Loan Offer ID Integer Primary key, unique identifier for the loan offer
Loan Application ID Integer Foreign key, reference to the loan application that generated the offer
Interest rate Decimal Interest rate for the loan offer
Monthly payment amount Decimal Monthly payment amount for the loan offer
Repayment period Integer Length of the repayment period for the loan offer (in months)
Date offered Date Date on which the loan offer was made
 
Loan Agreement
Attribute Data Type Description
Loan Agreement ID Integer Primary key, unique identifier for the loan agreement
Loan Offer ID Integer Foreign key, reference to the loan offer that generated the agreement
Date signed Date Date on which the loan agreement was signed
Collateral information String Information about any collateral used to secure the loan (if applicable)
Repayment terms String Terms of repayment for the loan
 
Loan Repayment
Attribute Data Type Description
Loan Repayment ID Integer Primary key, unique identifier for the loan repayment
Loan Agreement ID Integer Foreign key, reference to the loan agreement for which the payment is made
Payment amount Decimal Amount of the payment
Payment date Date Date on which the payment was made
Balance Decimal Remaining balance on the loan after the payment

 

This tabular format provides a clear and concise representation of the data model for the personal loan use case, making it easier to understand and manage the data.

 

Test #6

Diagramme de classe UML d'un prêt bancaire

Passons à l'aspect structurel avec un diagramme de classe UML généré à base de code PlantUML.

 

Question :

 

"This is perfect, I would like to depict the relationships in a plantuml diagram, can you give me the code to do this"

 

A la première génération, ChatGPT met des espaces dans les noms de classe, ce qui provoque un message d'erreur de syntaxe à l'exécution dans PlantUML.

 

Nous lui indiquons :

"There is a syntax error about class Loan Application, I think there is no space in the class name."

 

Résultat :

 

I apologize, you're correct. Here's the corrected PlantUML code:

 

Voir le code généré en annexe 1.

 

Voici l'exécution dans PlantUML :

 

chatgpt-14-plantuml-bank-loan-class-diagram 

Représentation dans PlantUML du code généré par ChatGPT
pour le modèle d'entités métiers pour un prêt bancaire.

 

Test #7

Diagramme de séquence UML pour le prêt bancaire

Continuons avec l'aspect comportemental avec un diagramme de séquence UML.

 

Question :

 

"How would a client asking for a bank loan impact the classes mentioned above, I would like to depict this as a sequence diagram. Can you help describe the diagram in code for plantuml"

 

Résultat :

 chatgpt-15-plantuml-bank-loan-sequence-diagram

 

Le diagramme de séquence UML avec les commentaires s'il vous plaît !

 

Test #8

Diagramme états/transitions UML pour le prêt bancaire

Demandons à ChatGPT quels seraient les états métier du prêt bancaire et de générer le code PlantUML pour le représenter dans un diagramme de "state machine" UML.

 

Question :

 

"Will the loan have states like new, closed, active inactive, cancelled, etc ? I would like to depict the states in a state diagram using plantuml. Can you help describe the diagram in code for plantuml"

 

Résultat :

 

chatgpt-16-plantuml-bank-loan-state-machine-diagram

  

Les états et les transitions représentés par PlantUML correspondant au code généré par ChatGPT

 

Test #9

Mind map pour un prêt bancaire

On aurait pu commencer par là : voyons ce que donne un mind map toujours relatif au prêt bancaire.

 

Question :

 

"Let's start by creating a simple MindMap on the topic of Bank Loan 
Can you give the mindmap in PlantUML format. Keep it structured from the core central topic branching out to other domains and sub-domains. Let's go to 5 levels to begin with. Add the start and end mindmap tags and keep it expanding on one side for now"

 

Résultat :

 

chatgpt-17-plantuml-bank-loan-mind-map   

Pour finir un mind map des concepts clés d'un prêt bancaire
toujours avec du code PlantUML généré par ChatGPT.

 

Test #10

Un pattern ArchiMate : Strategic Value Map View

Évidemment, si l’on restreint le périmètre, si on supprime les mots clés, et si l’on ne précise pas les règles métier, tout en augmentant le niveau d’abstraction, on obtient une vue correspondant au contexte demandé.

 

Question :

 

"Like the previous plantuml diagram, can you give me the plantuml code for the Strategic Value Map View ?"

 

Résultat :

 

chatgpt-09-similar-plantuml-code-ArchiMate-diagram-strategic-value-map-view 

Essai de génération du pattern "Strategic Value Map View"

 

Test #11

Business Model Canvas View

Demandons-lui de faire un template avec ArchiMate pour un Business Model Canvas View.

 

Question :

 

"Like the previous plantuml diagram, can you give me the plantuml code for the Business Model Canvas View ?"

 

Réponse :

 

ChatGPT répond que malheureusement PlantUML ne supporte pas ce type de diagramme. Il nous propose de trouver un plugin ou de créer nos propres éléments.

 

En fait, il est tout à fait possible de créer une telle vue avec ArchiMate.

 

chatgpt-09bis-similar-plantuml-code-ArchiMate-diagram-business-model-canvas-view 

Un Business Model Canvas View avec les artefacts ArchiMate et réalisé avec l’outil open source Archi (voir notre article : Top 5 2023 des outils gratuits ou open source pour l’Architecture d'Entreprise et la modélisation du Système d’Information )

 

Test #12

Plus on donne d'informations à ChatGPT, meilleure sera la réponse. Exemple d'une librairie en ligne.

Question :

 

"Give me the code for PlantUML corresponding of a class diagram for an online library with Author, Book, User, ShoppingCartLine, ShippingCart, PurchaseOrder and Status. Don't forget the multiplicity. Author wrote 0 or several books and a book is written by 0 or several authora. A User is an aggragate of 0 or several shopping cart which is an aggragate of 0 or several shopping cart lines which is linked at a book. A PurchaseOrder is linked at one user and one shopping cart. The Status are pending and shipped."

 

Résultat :

 

chatgpt-12-plantuml-code-uml-class-diagram-online-library 

Diagramme de classe UML pour une librairie en ligne, généré par ChatGPT
après avoir décrit le contexte métier.

 

Si l’ajout des attributs des entités métier était trivial, il n'en va pas de même pour ce qui est des méthodes. Heureusement, ChatGPT les a correctement modélisées selon les meilleures pratiques de conception orientée objet.

 

Test #13

Qu’en est-il pour du code plus verbeux comme XMI représentant un processus BPMN ?

Question :

 

“Write BPMN code for a pizza order”

 

Résultat :

 

Le code XML de l’OMG pour représenter un simple cas d’école de processus BPMN est tellement verbeux que ChatGPT ne finissait pas sa génération. On peut comprendre qu’il soit limité dans sa réponse en nombre de mots étant donné les millions de conversations simultanées auxquelles il doit participer.

Nous lui avons demandé par 2 fois de terminer son code. 

Puis nous avons concaténé les 3 parties de code dans un fichier avec l’extension .bpmn, que nous avons ensuite ouvert avec l’outil bpmn.io (https://bpmn.io/) de Camunda (voir notre article : Top 5 2023 des outils gratuits ou open source pour l’Architecture d'Entreprise et la modélisation du Système d’Information

 

chatgpt-13-bpmn-pizza-command 

En demandant par 3 fois à ChatGPT de continuer à générer le code XML pour le diagramme BPMN, nous avons pu constituer le fichier .bpmn et l'ouvrir avec l'open source bpmn.io de Camunda.

 

Un assistant de choix pour les cartographes

ChatGPT peut accompagner les cartographes de SI dans leur production quotidienne, en leur suggérant du code pour les outils de modélisation visuelle. En les aidant, ChatGPT peut augmenter leurs capacités et leur productivité, réduire les tâches manuelles et leur permettre de se concentrer sur les aspects les plus intéressants de leur travail.
Cela fait intrinsèquement partie des métiers de l’IT d’évoluer en fonction des innovations technologiques. Un développeur d'application de gestion ne programme plus en assembleur, un architecte logiciel n’écrit plus manuellement les codes techniques pour une architecture distribuée, les outils low code/no code se développent… 
De langages impératifs fastidieux, on passera inéluctablement à un formalisme déclaratif voir au langage naturel. 


Pourquoi se fatiguer à apprendre ?

Quand Wikipédia est apparu, les instances pédagogiques se sont alarmées des possibilités de plagiat par les apprenants. Avec le temps, des logiciels antiplagiat sont apparus, les enseignants ont largement fait la morale en expliquant les raisons pour lesquelles il ne fallait pas copier et finalement Wikipédia est devenu un outil pédagogique comme un autre.
Nous pensons qu’il se passera la même chose avec ChatGPT. Il ne faudrait pas exercer des contraintes coercitives, mais au contraire innover dans l’ingénierie pédagogique en incluant ce type d’agent conversationnel comme un formidable moyen pour développer les capacités cognitives. Les pédagogues devront alors vérifier, expliquer les résultats et les utiliser comme support pour aller plus loin sur le sujet concerné.

 

Conclusion

CQFD.

Bien sûr, il s'agit d'une première prise en main de ChatGPT et nos tests portent sur des cas d’école, pouvant par exemple servir comme matériel pédagogique à de futurs étudiants dans le domaine de la modélisation de Système d'Information.

Cependant, ils montrent qu’en apprivoisant ChatGPT, en décrivant un contexte métier en langage naturel, en explicitant la formulation, en ajoutant au fur et à mesure des échanges des informations supplémentaires sur l'ontologie utilisée, en affinant la question et en demandant de détailler certaines parties, ce chatbot est capable de générer du code représentant des vues ArchiMate d’Architecture d’Entreprise ainsi que des diagrammes UML et BPMN pour le SI.

 

Cette génération de "diagram as code" est fondamentale, car les avantages à représenter les modèles sous forme textuelle sont nombreux : synchronisation automatique entre les modèles, versioning avec des outils de type Git, conception collaborative avec des outils de type Google Doc, solutions open source légères, code moins verbeux que le XMI de l'OMG... (voir notre article : Texte vers UML et autres outils de "diagrammes en tant que code" - Le moyen le plus rapide de créer vos modèles ? ).

Sans oublier la mise en œuvre grandement facilitée de MDA avec la réalisation par scripts de transformations de modèles à partir de leur code. Les normes XMI et DI de l'OMG, très complexes, verbeuses et avec leurs nombreuses versions incompatibles, empêchaient la démocratisation de la dérivation des modèles correspondant par exemple aux couches d'architecture.

 

Au vu de ce que prépare par exemple le géant chinois de l’internet Baido avec son Ernie Bot, Google avec Bard et OpenAI avec la prochaine version de ChatGPT (GPT-4) et avec l’aide des milliards de Microsoft, soyons assurés que dans un proche avenir, les architectes d’entreprise, urbanistes et cartographes de SI, voir les modélisateurs multiparadigmes, seront dispensés des tâches fastidieuses et sans valeur ajoutée, leur permettant d’être plus créatif.

 

De notre côté, nous comptons bien en faire une utilisation plus poussée et utiliser ChatGPT à des fins professionnelles. Nous ne manquerons pas de vous tenir informé.

 

 

DALL·E - A detailed illustration about a chat bot generating computer code

 

ChatGPT

chat.openai.com

@ChatGPT

 

 

 

urbanisation-si_logo

 

Rhona Maxwel

urbanisation-si.com

@rhona_helena

 

“Autrefois pour faire sa cour
On parlait d'amour
Pour mieux prouver son ardeur
On offrait son cœur
Maintenant, c'est plus pareil
Ça change, ça change

Viens m'embrasser
Et je te donnerai

Une tourniquette
Pour faire la vinaigrette
Un bel aérateur
Pour bouffer les odeurs
Des draps qui chauffent
Un pistolet à gaufres
…”
Boris Vian - La complainte du progrès

 

 

Annexe 1

Les codes générés

Mode d'emploi

  1. Créer un compte sur le site : chat.openai.com puis se connecter.

  2. Cliquer sur le lien Serveur de démonstration en ligne de PlantUML.

  3. Copier/Coller le code de ChatGPT, le diagramme correspondant apparaît instantanément.

 

Test #1

Code PlantUML d'une vue ArchiMate d'un processus de prêt bancaire

Question :

 

"Give me the code for PlantUML corresponding of an ArchiMate diagram for bank loan process"

 

Réponse :

 

@startuml
!define ARCHIMATE_COLOR #6495ED

class LoanProcess {
  + requestLoan(amount: int, purpose: String)
  + checkEligibility(borrower: Borrower)
  + calculateInterestRate(amount: int, purpose: String)
  + issueLoan(borrower: Borrower, amount: int)
}

class Borrower {
  + name: String
  + address: String
  + income: int
}

class Bank {
  + name: String
  + address: String
  + processLoan: LoanProcess
  + approveLoan(borrower: Borrower, amount: int)
}

Borrower -> LoanProcess : request loan
LoanProcess -> Borrower : check eligibility
LoanProcess -> Bank : calculate interest rate
Bank -> LoanProcess : approve loan
LoanProcess -> Borrower : issue loan
@enduml

chatgpt-01-code-PlantUML-ArchiMate-diagram-bank-loan-proces-.png

 

Test #2

La même demande après lui avoir donné un exemple

Question :

 

"Can you generate a similar plantuml code for a bank process"

 

Réponse :

 

@startuml
skinparam rectangle<<behavior>> {
    roundCorner 25
}
sprite $bProcess jar:archimate/business-process
sprite $aService jar:archimate/application-service
sprite $aComponent jar:archimate/application-component

rectangle "Handle claim"  as HC <<$bProcess>><<behavior>> #Business
rectangle "Capture Information"  as CI <<$bProcess>><<behavior>> #Business
rectangle "Notify\nAdditional Stakeholders" as NAS <<$bProcess>><<behavior>> #Business
rectangle "Validate" as V <<$bProcess>><<behavior>> #Business
rectangle "Investigate" as I <<$bProcess>><<behavior>> #Business
rectangle "Pay" as P <<$bProcess>><<behavior>> #Business

HC *-down- CI
HC *-down- NAS
HC *-down- V
HC *-down- I
HC *-down- P

CI -right->> NAS
NAS -right->> V
V -right->> I
I -right->> P

rectangle "Scanning" as scanning <<$aService>><<behavior>> #Application
rectangle "Customer admnistration" as customerAdministration <<$aService>><<behavior>> #Application
rectangle "Claims admnistration" as claimsAdministration <<$aService>><<behavior>> #Application
rectangle Printing <<$aService>><<behavior>> #Application
rectangle Payment <<$aService>><<behavior>> #Application

scanning -up-> CI
customerAdministration  -up-> CI
claimsAdministration -up-> NAS
claimsAdministration -up-> V
claimsAdministration -up-> I
Payment -up-> P

Printing -up-> V
Printing -up-> P

rectangle "Document\nManagement\nSystem" as DMS <<$aComponent>> #Application
rectangle "General\nCRM\nSystem" as CRM <<$aComponent>>  #Application
rectangle "Home & Away\nPolicy\nAdministration" as HAPA <<$aComponent>> #Application
rectangle "Home & Away\nFinancial\nAdministration" as HFPA <<$aComponent>>  #Application

DMS .up.|> scanning
DMS .up.|> Printing
CRM .up.|> customerAdministration
HAPA .up.|> claimsAdministration
HFPA .up.|> Payment

legend left
Example from the "Archisurance case study" (OpenGroup).
See
====
<$bProcess> :business process
====
<$aService> : application service
====
<$aComponent> : application component
endlegend
@enduml
Can you generate a similar plantuml code for a bank process


Certainly! Here is an example of PlantUML code for a bank loan process:

@startuml
skinparam rectangle<<behavior>> {
    roundCorner 25
}
sprite $bProcess jar:archimate/business-process
sprite $aService jar:archimate/application-service
sprite $aComponent jar:archimate/application-component

rectangle "Loan Application" as LA <<$bProcess>><<behavior>> #Business
rectangle "Verification" as V <<$bProcess>><<behavior>> #Business
rectangle "Credit Check" as CC <<$bProcess>><<behavior>> #Business
rectangle "Approval" as A <<$bProcess>><<behavior>> #Business
rectangle "Funding" as F <<$bProcess>><<behavior>> #Business

LA *-down- V
V *-down- CC
CC *-down- A
A *-down- F

rectangle "Customer\nInformation\nSystem" as CIS <<$aService>><<behavior>> #Application
rectangle "Credit\nBureau\nSystem" as CBS <<$aService>><<behavior>> #Application
rectangle "Loan\nAdministration\nSystem" as LAS <<$aService>><<behavior>> #Application
rectangle "Payment\nSystem" as PS <<$aService>><<behavior>> #Application

CIS -up-> LA
CBS -up-> CC
LAS -up-> A
LAS -up-> F
PS -up-> F

rectangle "Database" as DB <<$aComponent>> #Application
rectangle "CRM\nSystem" as CRM <<$aComponent>>  #Application
rectangle "Financial\nAdministration\nSystem" as FAS <<$aComponent>> #Application

DB .up.|> CIS
DB .up.|> CBS
CRM .up.|> CIS
FAS .up.|> PS

legend left
Example of a bank loan process.
See
====
<$bProcess> : business process
====
<$aService> : application service
====
<$aComponent> : application component
endlegend
@enduml

This code will create a diagram that visualizes the loan application process in a bank. The customer submits their information, which is verified and goes through a credit check. Based on the results, the loan is approved or rejected and, if approved, the funds are disbursed. The diagram also shows the relationships between the various business processes, application services, and application components involved in the loan process.

 

Test #3

Zoom sur le sous-processus de vérification

Question :

 

"Like the previous plantuml diagram, can you give me the plantuml code for the Verification process ?"

 

Réponse :

 

Here is an example of a PlantUML diagram for a Verification process:

 

@startuml
skinparam rectangle<<behavior>> {
    roundCorner 25
}
sprite $bProcess jar:archimate/business-process
sprite $aService jar:archimate/application-service
sprite $aComponent jar:archimate/application-component

rectangle "Verify Information" as VI <<$bProcess>><<behavior>> #Business
rectangle "Collect Information" as CI <<$bProcess>><<behavior>> #Business
rectangle "Check Credibility" as CC <<$bProcess>><<behavior>> #Business
rectangle "Notify Customer" as NC <<$bProcess>><<behavior>> #Business

CI *-down- VI
VI *-down- CC
CC *-down- NC

rectangle "Information Gathering" as IG <<$aService>><<behavior>> #Application
rectangle "Data Validation" as DV <<$aService>><<behavior>> #Application
rectangle "Notification" as N <<$aService>><<behavior>> #Application

IG -up-> VI
DV -up-> CC
N -up-> NC

rectangle "Know Your Customer (KYC)" as KYC <<$aComponent>> #Application
rectangle "Credit Bureau" as CB <<$aComponent>> #Application
rectangle "Notification System" as NS <<$aComponent>> #Application

KYC .up.|> IG
CB .up.|> DV
NS .up.|> N

legend left
Example of a verification process.
See
====
<$bProcess> :business process
====
<$aService> : application service
====
<$aComponent> : application component
endlegend
@enduml

 

Test #4

Description textuelle du cas d'utilisation "Demander un prêt bancaire"

Examinons maintenant ce que va nous donner ChatGPT pour le cas d'utilisation cas d'école "Demander un prêt bancaire".

 

Question :

 

"Lets define a simple use case in bank loan, something that is very well established and easy to understand"

 

Réponse :

 

Sure, let's consider the use case of obtaining a personal loan from a bank.

 

Here's how the process might work:

 

  1. A customer starts by researching different banks and comparing their personal loan options.
  2. Once the customer has found a loan that they are interested in, they complete a loan application, which requires them to provide personal and financial information, such as their income, employment history, and credit score.
  3. The bank uses this information to determine the customer's creditworthiness and assess their ability to repay the loan.
  4. If the customer is approved for the loan, they receive an offer with the loan terms, including the interest rate, monthly payment amount, and repayment period.
  5. If the customer accepts the loan offer, they sign the loan agreement and provide any necessary documentation, such as proof of income or collateral.
  6. The bank then disburses the loan funds to the customer, either as a lump sum payment or in installments.
  7. The customer then repays the loan over time, including both the principal amount and the interest, according to the terms agreed to in the loan agreement.

 

This is just a basic example of how a personal loan from a bank works, but it should give you an idea of how individuals can use loans to access the funds they need for a variety of purposes, from paying for large expenses to consolidating debt.

 

Test #5

Tableau du modèle métier d'un prêt bancaire

Évidemment il s'agit du processus standard. Pour un cas plus spécifique, il suffirait d'ajouter les informations métier supplémentaires.

Demandons-lui le modèle métier sous forme de tableau au format standard markdown.

 

Question :

 

"Describe the data model in more detail or tabular format using markdown"

 

Réponse :

 

Here is a more detailed and tabular format of the data model for the use case of obtaining a personal loan from a bank:

 

Customer
Attribute Data Type Description
Customer ID Integer Primary key, unique identifier for the customer
Name String Full name of the customer
Address String Physical address of the customer
Phone number String Contact phone number for the customer
Email String Contact email for the customer
Date of birth Date Birthdate of the customer
Social security number String Social security number of the customer
 
Loan Application
Attribute Data Type Description
Loan Application ID Integer Primary key, unique identifier for the loan application
Customer ID Integer Foreign key, reference to the customer who submitted the loan application
Loan amount Decimal Total amount requested in the loan application
Loan purpose String Purpose of the loan as stated by the customer in the application
Status String Current status of the loan application (e.g., pending, approved, denied)
Date submitted Date Date on which the loan application was submitted
 
Loan Offer
Attribute Data Type Description
Loan Offer ID Integer Primary key, unique identifier for the loan offer
Loan Application ID Integer Foreign key, reference to the loan application that generated the offer
Interest rate Decimal Interest rate for the loan offer
Monthly payment amount Decimal Monthly payment amount for the loan offer
Repayment period Integer Length of the repayment period for the loan offer (in months)
Date offered Date Date on which the loan offer was made
 
Loan Agreement
Attribute Data Type Description
Loan Agreement ID Integer Primary key, unique identifier for the loan agreement
Loan Offer ID Integer Foreign key, reference to the loan offer that generated the agreement
Date signed Date Date on which the loan agreement was signed
Collateral information String Information about any collateral used to secure the loan (if applicable)
Repayment terms String Terms of repayment for the loan
 
Loan Repayment
Attribute Data Type Description
Loan Repayment ID Integer Primary key, unique identifier for the loan repayment
Loan Agreement ID Integer Foreign key, reference to the loan agreement for which the payment is made
Payment amount Decimal Amount of the payment
Payment date Date Date on which the payment was made
Balance Decimal Remaining balance on the loan after the payment

 

This tabular format provides a clear and concise representation of the data model for the personal loan use case, making it easier to understand and manage the data.

 

Test #6

Diagramme de classe UML d'un prêt bancaire

Question :

 

"this is perfect, I would like to depict the relationships in a plantuml diagram, can you give me the code to do this"

 

Après détection d'une erreur de syntaxe dans PlantUML :

"there is a syntax error about class Loan Application, I think there is no space in the class name"

 

Réponse :

 

I apologize, you're correct. Here's the corrected PlantUML code:

 

@startuml
title Personal Loan Data Model Relationships

class Customer {
  + CustomerID: Integer
  + Name: String
  + Address: String
  + PhoneNumber: String
  + Email: String
  + DateOfBirth: Date
  + SocialSecurityNumber: String
}

class LoanApplication {
  + LoanApplicationID: Integer
  + CustomerID: Integer
  + LoanAmount: Decimal
  + LoanPurpose: String
  + Status: String
  + DateSubmitted: Date
}

class LoanOffer {
  + LoanOfferID: Integer
  + LoanApplicationID: Integer
  + InterestRate: Decimal
  + MonthlyPaymentAmount: Decimal
  + RepaymentPeriod: Integer
  + DateOffered: Date
}

class LoanAgreement {
  + LoanAgreementID: Integer
  + LoanOfferID: Integer
  + DateSigned: Date
  + CollateralInformation: String
  + RepaymentTerms: String
}

class LoanRepayment {
  + LoanRepaymentID: Integer
  + LoanAgreementID: Integer
  + PaymentAmount: Decimal
  + PaymentDate: Date
  + Balance: Decimal
}

Customer "1" -- "1..*" LoanApplication
LoanApplication "1" -- "1" LoanOffer
LoanOffer "1" -- "1" LoanAgreement
LoanAgreement "1" -- "1..*" LoanRepayment

@enduml

 

Test #7

Diagramme de séquence UML pour le prêt bancaire

Question :

 

"How would a client asking for a bank loan impact the classes mentioned above, I would like to depict this as a sequence diagram. Can you help describe the diagram in code for plantuml"

 

Réponse :

 

Certainly! Here's a PlantUML sequence diagram that depicts the interaction between a client and the classes in the personal loan use case when the client applies for a loan:

 

@startuml
title Personal Loan Application Sequence Diagram

participant Customer
participant LoanApplication
participant LoanOffer
participant LoanAgreement

Customer -> LoanApplication: Submit Loan Application

Note right of LoanApplication: LoanApplication\nvalidates the application

LoanApplication -> LoanOffer: Generate Loan Offer

Note right of LoanOffer: LoanOffer\ncalculates loan terms and conditions

LoanOffer -> Customer: Present Loan Offer

Note right of Customer: Customer\nreviews and accepts loan offer

Customer -> LoanAgreement: Sign Loan Agreement

Note right of LoanAgreement: LoanAgreement\nrecords loan agreement details

@enduml

 

This diagram depicts the interactions between the customer, the LoanApplication class, the LoanOffer class, and the LoanAgreement class when a client applies for a personal loan. The customer submits a loan application to the LoanApplication class, which validates the application. The LoanApplication class then generates a loan offer by calculating loan terms and conditions and presenting the offer to the customer. If the customer accepts the loan offer, they sign the loan agreement, which is recorded by the LoanAgreement class.

 

Test #8

Diagramme états/transitions UML pour le prêt bancaire

Question :

 

"Will the loan have states like new, closed, active inactive, cancelled, etc ? I would like to depict the states in a state diagram using plantuml. Can you help describe the diagram in code for plantuml"

 

Réponse :

 

@startuml
title Personal Loan State Diagram

[*] --> New
[*] --> Active : Loan Agreement Signed
New --> Cancelled : Loan Application Cancelled

Active --> Inactive : Loan Repayment Completed
Active --> Closed : Loan Agreement Terminated

Inactive --> Active : Loan Repayment Resumed

Closed --> Cancelled : Loan Agreement Cancelled
@enduml

 

Test #9

Mind map pour un prêt bancaire

Question :

 

"Let's start by creating a simple MindMap on the topic of Bank Loan 
Can you give the mindmap in PlantUML format. Keep it structured from the core central topic branching out to other domains and sub-domains. Let's go to 5 levels to begin with. Add the start and end mindmap tags and keep it expanding on one side for now"

 

Remarque : au 1er essai ChatGPT nous dit que les diagrammes de mind map n'existent pas dans PlantUML.

 

Nous lui donnons alors l'exemple fourni dans la documentation de PlantUML.

 

Réponse :

 

I apologize for the earlier confusion. You are correct, PlantUML does support mind map diagrams. Here's an example of a simple mind map for the topic of "Bank Loan":

 

@startmindmap
* Bank Loan
** Loan Types
*** Personal Loan
*** Home Loan
*** Car Loan
*** Education Loan
*** Business Loan
** Loan Requirements
*** Proof of Income
*** Credit History
*** Collateral
*** Loan Application
** Loan Approval Process
*** Application Review
*** Credit Check
*** Risk Assessment
*** Approval Decision
** Loan Repayment
*** Repayment Terms
*** Interest Rate
*** Penalty for Default
*** Loan Refinancing
@endmindmap

 

This mind map starts with the central topic of "Bank Loan" and branches out to different loan types, loan requirements, the loan approval process, and loan repayment. Each sub-topic is indented and connected to the central topic.

 

Test #10

Un pattern ArchiMate : Strategic Value Map View

Question :

 

"Like the previous plantuml diagram, can you give me the plantuml code for the Strategic Value Map View ?"

 

Réponse :

 

Here is a sample PlantUML code for the Strategic Value Map View pattern in ArchiMate:


@startuml
skinparam rectangle<<strategy>> {
roundCorner 25
}

sprite $goal jar:archimate/goal
sprite $businessActor jar:archimate/business-actor

rectangle "Improve Loan Processing Efficiency" as ILPE <<$goal>><<strategy>> #Business
rectangle "Satisfy Customer Needs" as SCN <<$goal>><<strategy>> #Business
rectangle "Maximize Profit" as MP <<$goal>><<strategy>> #Business
rectangle "Customer" as C <<$businessActor>> #Business

ILPE *-down-> SCN
SCN *-down-> MP
C -- ILPE
legend left
Example of a Strategic Value Map view pattern in ArchiMate.
See
<$goal> : goal

<$businessActor> : business actor
endlegend
@enduml

 

Test #11

Business Model Canvas View

Question :

 

"Like the previous plantuml diagram, can you give me the plantuml code for the Business Model Canvas View ?"

Réponse :

 

Unfortunately, PlantUML does not have built-in support for creating a Business Model Canvas view. You may need to find a plugin or create your own custom shapes to represent the elements of the Business Model Canvas in PlantUML.

 

Test #12

Plus on donne d'informations à ChatGPT, meilleure sera la réponse. Exemple d'une librairie en ligne.

Question :

 

Give me the code for PlantUML corresponding of a class diagram for an online library with Author, Book, User, ShoppingCartLine, ShippingCart, PurchaseOrder and Status. Don't forget the multiplicity. Author wrote 0 or several Book and a Book is written by 0 or several Author. A User is an aggragate of 0 or several ShoppingCart which is an aggragate of 0 or several ShoppingCartLine which is linked at a Book. A PurchaseOrder is linked at one User and one ShoppingCart. The Status are pending and shipped.

 

Réponse :

 

class Author {
  +writtenBooks(): Book[]
}

class Book {
  +writtenByAuthors(): Author[]
  +belongsToShoppingCartLine(): ShoppingCartLine[]
}

class User {
  +hasShoppingCarts(): ShoppingCart[]
  +hasPurchaseOrders(): PurchaseOrder[]
}

class ShoppingCartLine {
  +belongsToShoppingCart(): ShoppingCart
  +linkedToBook(): Book
}

class ShoppingCart {
  +belongsToUser(): User
  +containsShoppingCartLines(): ShoppingCartLine[]
  +hasPurchaseOrder(): PurchaseOrder
}

class PurchaseOrder {
  +belongsToUser(): User
  +belongsToShoppingCart(): ShoppingCart
  +hasStatus(): Status
}

class Status {
  +pending
  +shipped
}

Author "0..*" -- "0..*" Book
User -- "0..*" ShoppingCart
ShoppingCart -- "0..*" ShoppingCartLine
ShoppingCartLine -- Book
PurchaseOrder -- User
PurchaseOrder -- ShoppingCart

 

Test #13

Qu’en est-il pour du code plus verbeux comme XMI représentant un processus BPMN ?

Ouvrir le code avec : https://bpmn.io/

 

Question :

 

Write BPMN code for a pizza command

 

Réponse :

 

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="11.3.1">
  <bpmn:process id="Process_1" isExecutable="false">
    <bpmn:startEvent id="StartEvent_1">
      <bpmn:outgoing>Flow_1</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:task id="Task_1" name="Receive Pizza Order">
      <bpmn:incoming>Flow_1</bpmn:incoming>
      <bpmn:outgoing>Flow_2</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Task_2" name="Prepare Pizza">
      <bpmn:incoming>Flow_2</bpmn:incoming>
      <bpmn:outgoing>Flow_3</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Task_3" name="Bake Pizza">
      <bpmn:incoming>Flow_3</bpmn:incoming>
      <bpmn:outgoing>Flow_4</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Task_4" name="Deliver Pizza">
      <bpmn:incoming>Flow_4</bpmn:incoming>
      <bpmn:outgoing>Flow_5</bpmn:outgoing>
    </bpmn:task>
    <bpmn:endEvent id="EndEvent_1">
      <bpmn:incoming>Flow_5</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="Task_1" />
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Task_1" targetRef="Task_2" />
    <bpmn:sequenceFlow id="Flow_3" sourceRef="Task_2" targetRef="Task_3" />
    <bpmn:sequenceFlow id="Flow_4" sourceRef="Task_3" targetRef="Task_4" />
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Task_4" targetRef="EndEvent_1" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="173" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="157" y="142" width="68" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_1_di" bpmnElement="Task_1">
        <dc:Bounds x="259" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_2_di" bpmnElement="Task_2">
        <dc:Bounds x="443" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_3_di" bpmnElement="Task_3">
        <dc:Bounds x="632" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_4_di" bpmnElement="Task_4">
        <dc:Bounds x="825" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_2" bpmnElement="EndEvent_1">
        <dc:Bounds x="1018" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1002" y="142" width="68" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1">
        <di:waypoint x="209" y="120" />
        <di:waypoint x="259" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2">
        <di:waypoint x="359" y="120" />
        <di:waypoint x="443" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3">
        <di:waypoint x="543" y="120" />
        <di:waypoint x="632" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4">
        <di:waypoint x="732" y="120" />
        <di:waypoint x="825" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5">
        <di:waypoint x="925" y="120" />
        <di:waypoint x="1018" y="120" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

 

Annexe 2

Les principaux concurrents à ChatGPT
en attendant la réponse de Google

 

 

Compléments de lecture

 



16/02/2023
0 Poster un commentaire

A découvrir aussi


Inscrivez-vous au site

Soyez prévenu par email des prochaines mises à jour

Rejoignez les 720 autres membres