11. Knowledge Area
Topic Topic
Reference
Material
Body of Knowledge Skills Competencies Jobs / Roles
SWEBOK
Software Engineering Professional Certifications
SWECOM
EITBOK
Learning courses
11
Guide to the Software Engineering Body of Knowledge (SWEBOK)
https://www.computer.org/education/bodies-of-knowledge/software-engineering
• ソフトウェアエンジニアリングにおける「一般に認めら
れた知識」を特定し、共通認識を持つよう研究者と実務
家を導く。
• 資格や教育カリキュラムの基礎
• '01 v1、'04 v2、'05 ISO採用、'14 v3、'24 v4間もなく!
SWEBOK Guide V4
(Editor: Hironori Washizaki)
12. Mainframe
70’s –
Early 80’s
Late 80’s -
Early 90’s
Late 90’s -
Early 00’s
Late 00’s -
Early 10’s
PC,
Client &
server
Internet
Ubiquitous
computing
Late 10’s -
Early 20’s
IoT,
Big data,
AI
Structured
programming
Waterfall
Formalization
Design
Program
generation
Maturity
Management
Object-oriented
Req. eng.
Modeling
Verification
Reuse
Model-driven
Product-line
Global & open
Value-based
Systems eng.
Agile
Iterative &
incremental
DevOps
Empirical
Data-driven
Continuous
SE and IoT
SE and AI
SWEBOK V1
SWEBOK V2
SWEBOK V3
SWEBOK V4
13. SWEBOK Evolution from V3 to V4
• モダンな開発と運用、プラクティス更新、新興領域
Requirements
Design
Construction
Testing
Maintenance
Configuration Management
Engineering Management
Process
Models and Methods
Quality
Professional Practice
Economics
Computing Foundations
Mathematical Foundations
Engineering Foundations
Requirements
Architecture
Design
Construction
Testing
Operations
Maintenance
Configuration Management
Engineering Management
Process
Models and Methods
Quality
Security
Professional Practice
Economics
Computing Foundations
Mathematical Foundations
Engineering Foundations
V3 V4
Agile,
DevOps
AI for SE,
SE for AI Software
engineering
AI
AI for SE
SE for AI
14. Mainframe
70’s –
Early 80’s
Late 80’s -
Early 90’s
Late 90’s -
Early 00’s
Late 00’s -
Early 10’s
PC,
Client &
server
Internet
Ubiquitous
computing
Late 10’s -
Early 20’s
IoT,
Big data,
AI
GenAI, FM,
Autonomous,
Quantum,
Continuum
Late 20’s
Structured
programming
Waterfall
Formalization
Design
Program
generation
Maturity
Management
Object-oriented
Req. eng.
Modeling
Verification
Reuse
Model-driven
Product-line
Global & open
Value-based
Systems eng.
Agile
Iterative &
incremental
DevOps
Empirical
Data-driven
Continuous
SE and IoT
SE and AI
SE and GenAI
SE and QC
Sustainability
SE for
autonomous
and continuum
AI-assisted
DevOps/OpsDev
SWEBOK V1
SWEBOK V2
SWEBOK V3
SWEBOK V4
19. AI・機械学習ソフトウェアエンジニアリングパターン
• アーキテクチャとデザインパターン
– MLアプリケーションのためのソフトウェ
ア工学パターン[SEP4MLA]
– 機械学習デザインパターン[MLDP]
• 論証パターン
– MLシステムのための安全性ケースパ
ターン[Safety]
– DNNのためのセキュリティ論証パター
ン[Security][Security2]
• レスポンシブル(責任ある)AIパター
ン
– 責任あるAIシステムのデザインパター
ン [Responsible]
• 開発と管理のプラクティス
– ライフサイクルフェーズのプラクティス
[Practice][Practice2]
• プロンプトエンジニアリングパターン
– プロンプト・パターン・カタログと分類法
[Prompt][Prompt2]
19
[MLDP] V. Lakshmanan, et al., “Machine Learning Design Patterns,” O’Reilly, 2020
[SEP4MLA] H. Washizaki, et al. “Software Engineering Design Patterns for Machine Learning Applications,” IEEE Computer 55(3) 2022
[Safety] E. Wozniak, et al., “A Safety Case Pattern for Systems with Machine Learning Components,” SAFECOMP 2020 Workshop
[Security] M. Zeroual, et al., “Security Argument patterns for Deep Neural Network Development,” PLoP 2023
[Security2] M. Mutsche, et al. “Robustness-based Security Case Verification for Deep Neural Networks,” AsianPLoP 2024
[Responsible] Q. Lu, et al., “Responsible-AI-by-Design: a Pattern Collection for Designing Responsible AI Systems,” IEEE Software, 2023
[Practice] M. S. Rahman, et al., “Machine Learning Application Development: Practitioners’ Insights,” Software Quality Journal, 31, 2023
[Practice2] Y. Watanabe, et al., “Preliminary Literature Review of Machine Learning System Development Practices,” COMPSAC 2021 Fast Abstract
[Prompt] J, White, et al., “A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT,” arXiv 2302.11382, 2023
[Prompt2] Y. Sasaki, et al., “A Taxonomy and Review of Prompt Engineering Patterns in Software Engineering,” COMPSAC 2024
20. 機械学習アプリケーションのためのSEパターン [Computer’22]
• 約40の学術文書とグレー文書から15のパターンを抽出
• 3つのタイプに分類: トポロジー、プログラミング、モデル操作
20
Hironori Washizaki, Foutse Khomh, Yann-Gael Gueheneuc, Hironori Takeuchi, Naotake Natori, Takuo Doi, Satoshi Okuda,
“Software Engineering Design Patterns for Machine Learning Applications,” IEEE Computer, Vol. 55, No. 3, pp. 30-39, 2022. (Best Paper Award)
Encapsulate ML Models within Rule-based
Safeguards ルールベースの安全ガードによる
MLモデルカプセル化
• 問題:MLモデルは不安定で、敵対的攻撃、
ノイズ、データドリフトに弱いことが知られて
いる。
• 解決: MLモデルによって提供される機能を
カプセル化し、決定論的で検証可能なルー
ルを用いて、システムに内在する不確実性
に対処する。
Business
Logic API
Rule-based
Safeguard
Inference
(Prediction)
Encapsulated
ML model
Input
Output
Rule
Explainable Proxy Model 説明可能な
代理モデル
• 問題:説明可能な代理MLモデルを
構築しなければならない。
• 解決 説明可能な推論パイプライン
を主推論パイプラインと並行して実
行し、予測の違いを監視する。
Input
Decoy model Data lake
Proxy model
(E.g., Decision
tree) Monitoring
and
comparison
Reproduce
and
retraining
Production
model
(E.g., DNN)
21. 実務家における捉え方 [ICSME’20]
• 118人の開発者が回答
• 開発者はほとんどのパターンを
知らない。
• ほとんどの回答者が、今後の設
計においてパターンの利用を検
討していると回答した。
• 回答者が再利用によって設計
問題へのアプローチをより組織
化するにつれて、パターンの使
用比率が増加した。
21
Knew it Didn’t know it
0 20 40 60 80 100 120
Data Flows Up, Model Flows Down
Secure Aggregation
Deployable Canary Model
Kappa Architecture for ML
Parameter-Server Abstraction
Different Workloads in Different Computing…
Encapsulate ML models within rule-base…
ML Gateway Routing Architecture
Lambda Architecture for ML
Separation of Concerns and Modularization of…
Distinguish Business Logic from ML Models
Data Lake for ML
Discard PoC code
Microservice Architecture for ML
ML Versioning
Used it Never used it Consider using it Not consider
Hironori Washizaki, Hironori Takeuchi, Foutse Khomh, Naotake Natori, Takuo Doi, Satoshi Okuda, “Practitioners’ insights on machine-learning software
engineering design patterns: a preliminary study,” 36th IEEE International Conference on Software Maintenance and Evolution (ICSME 2020), Late Breaking Ideas
26. プロンプト(エンジニアリング)パターンとは?
➢ LLMから望ましいアウトプットを得るうえで直面する頻出の問題とその解決のため
のプロンプトおよびその対話をまとめたもの
26
Please add new feature
to our webapp.
Please add new feature to
our webapp.
This is the document
and existing code…
+ Artifacts
例: Few-shot Prompting
User User
<Ordinal Output…>
LLM
<More Desired Output…>
LLM
プロンプト(エンジニアリング)パターンの整理体系化
Yuya Sasaki, Hironori Washizaki, Jialong Li, Dominik Sander, Nobukazu Yoshioka and Yoshiaki Fukazawa, “A Taxonomy and Review of Prompt Engineering
Patterns in Software Engineering,” 48th IEEE International Conference on Computers, Software, and Applications (COMPSAC 2024)
27. 1. S. I. Ross, M. Muller, F. Martinez, S. Houde, and J. D. Weisz, “A Case Study in Engineering a Conversational Programming Assistant’s Persona”
2. A. Gu, T. Mitrovska, D. Velez, J. Andreas, and A. Solar-Lezama, “ObSynth: An Interactive Synthesis System for Generating Object Models from
Natural Language Specifications”
3. P. Denny, V. Kumar, and N. Giacaman, “Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Language”
4. J. White et al., “A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT”
• 問題:正確さと信頼性のバランスを取るのは難しい
• 解決:ユーザー主導のプロンプトのみではなく、役割をシミ
ュレートするためにLLMを割り当てるインタラクティブなプ
ロンプト
例1: User-Model Collaboration Refinement ユーザ・モデル協調洗練
Complex Task
Guide User to Desired Output
27
Persona Game
Question
From LLM
Simulation
Interactive Prompt Templates
Example from [1]:
This is a conversation with Socrates, an eager and helpful, but humble
expert automatic AI...
Example from [4]:
I would like you to ask me questions to achieve X. You should ask questions
until this condition is met or to achieve this goal...
28. Complex Task
Simple task 1
Simple task 2
Simple task 3
例2: Gradual Execution and Output 段階的実行・出力
28
• 問題:LLMは、推論の限界や入力感度の問題から、複雑なタスクに苦戦することが多
い。ユーザーは、手作業を減らしながら、より多くのコントロールを望んでいる。
• 解決: 連鎖したLLMステップまたは実行可能なスクリプトを使用してタスクを分解し、回
答の品質と透明性を向上させます。
Example: Figure from [1]
From:
1.T. Wu, M. Terry, and C. J. Cai, “AI Chains:
Transparent and Controllable Human-AI Interaction
by Chaining Large Language Model Prompts”
2.J. White et al., “A Prompt Pattern Catalog to
Enhance Prompt Engineering with ChatGPT”,
Output Automater Pattern
29. 調査と分類体系
• 系統的文献レビュー(SLR)
– 対象研究 2023年5月以前
– 初期158編、徹底的なレビューの結果28編を選択
• 26のパターンを特定
– インプロンプト学習アプローチ(5)
– インタラクションに焦点を当てた手法(11)
– タスクに特化した手法(8)
– モデルの最適化 (2)
29
Few-shot Zero-shot
Interactive Chain LLM Output
APR Code Quality
LLM Parameter Specific
(for GPT-3.5)
Fine-tuning Related
(for BERT)
例
Yuya Sasaki, Hironori Washizaki, Jialong Li, Dominik Sander, Nobukazu Yoshioka and Yoshiaki Fukazawa, “A Taxonomy and Review of Prompt Engineering
Patterns in Software Engineering,” 48th IEEE International Conference on Computers, Software, and Applications (COMPSAC 2024)
31. プロンプトエンジニアリングの展望
• モデル制約の扱いからユ
ーザー意図重視へ
• 2023 Q2: 限られたコンテ
キスト長の中で、ユーザー
の意図を効率的に伝える
工夫が主
• 現在(2024 Q2): ユーザ
ーの意図や状況がLLMに
どれだけ理解されている
かに焦点
• 将来: ユーザがより使い
やすくなるようなプロンプト
エンジニアリング 31
Token Limit by Model and Year
32. 生成AIに基づくソフトウェアエンジニアリングの現状と展望
Generative AI for Effective Software Development (Springer, 2024)
• Fundamentals of Generative AI
– An Overview on Large Language Models
• Patterns and Tools for the Adoption of Generative
AI in Software Engineering
– Comparing Proficiency of ChatGPT and Bard in
Software Development
– DAnTE: A Taxonomy for the Automation Degree of
Software Engineering Tasks
– ChatGPT Prompt Patterns for Improving Code
Quality, Refactoring, Requirements Elicitation and
Software Design
– Requirements Engineering Using Generative AI:
Prompts and Prompting Patterns
– Advancing Requirements Engineering Through
Generative AI: Assessing the Role of LLMs
• Generative AI in Software Development: Case
Studies
– Generative AI for Software Development: A Family
of Studies on Code Generation
– BERTVRepair: On the Adoption of CodeBERT for
Automated Vulnerability Code Repair
– ChatGPT as a Full-Stack Web Developer
• Generative AI in Software Engineering Processes
– Transforming Software Development with
Generative AI: Empirical Insights on Collaboration
and Workflow
– How Can Generative AI Enhance Software
Management? Is It Better Done than Perfect?
– Value-Based Adoption of ChatGPT in Agile Software
Development: A Survey Study of Nordic Software
Experts
– Early Results from a Study of GenAI Adoption in a
Large Brazilian Company: The Case of Globo
• Future Directions and Education
– Generating Explanations for AI-Powered Delay
Prediction in Software Projects
– Classifying User Intent for Effective Prompt
Engineering: A Case of a Chatbot for Startup Teams
– Toward Guiding Students: Exploring Effective
Approaches for Utilizing AI Tools in Programming
Courses
32
プロンプトパターン
要求工学
AI開発者
開発プロセス
コード関連
38. Java実装
MLパターン適用: モデル化 (例: “Adversarial Example Defense”) [AsianPLoP’24]
Pattern model Application
Pattern description
Context
Model is not trained
well…
Problem:
Model is vulnerable
to adversarial
samples with
intentional noise…
Solution:
Employ adversarial
training …
OCL description
Java description
T. Ayukawa, et al., “Machine Learning Design Pattern Application Support,” AsianPLoP 2024
39. ML a
39
MLパターン適用:
詳細の指定
(例: “DNN Robustness Case Verification”)
[AsianPLoP’24]
M. Mutsche, et al. “Robustness-based Security Case Verification for Deep Neural Networks,” AsianPLoP 2024
Acceptable (L2 Norm = 2) Unacceptable (L2 Norm = 3)
Goal: Robustness >= 2
40. AI architecture
patterns
IoT design patterns
レイヤや側面を超えたパターンランゲージに向けて
...では、この街に多くの人
を呼び込むためには、
小さな広場を中心部に
配置しよう。広場には、
路上カフェを誘致しよう
・・・
40
https://unsplash.com/photos/EdpbTj3Br-Y
https://unsplash.com/photos/GqurqYbj7aU
https://unsplash.com/photos/zFoRwZirFvY
AI management
practices
AI assurance
argument
patterns
Governance
Responsible
AI patterns
AI design patterns
Small Public
Square
Street
Cafe
Opening to
the Street
44. 機械学習システムのマルチビュー・モデリング [Software Quality J. ’24]
ML Canvas
AI Project Canvas Safety Case
Architectural Diagram (SysML) KAOS Goal Model
STAMP/STPA
Value
MLOps Architecture Goals
Safety
Argumentation
Jati H. Husen, Hironori Washizaki, Jomphon Runpakprakun, Nobukazu Yoshioka, Hnin Thandar Tun, Yoshiaki Fukazawa, Hironori Takeuchi, “Integrated Multi-
view Modeling for Reliable Machine Learning-Intensive Software Engineering,” Software Quality Journal, pp. 1-51, Springer, 2024.
44
45. 一貫性・追跡性保証の
ためのメタモデル [ICEBE’23]
ML Canvas
AI Project Canvas
Safety Case
KAOS Goal Model
STAMP/STPA
Architecture (SysML)
ML workflow
pipeline
45
Hironori Takeuchi, Jati H. Husen, Hnin Thandar Tun, Hironori Washizaki and Nobukazu Yoshioka, “Enterprise Architecture-based Metamodel for a Holistic
Business – IT Alignment View on Machine Learning Projects,” IEEE International Conference on E-Business Engineering (ICEBE 2023), Best Paper Award
Hironori Takeuchi, Jati H. Husenb, Hnin Thandar Tun, Hironori Washizaki, Nobukazu Yoshioka, “Enterprise Architecture-based Metamodel for Machine Learning
Projects and its Management,” Future Generation Computer Systems, Elsevier, pp. 1-12, 2024.