SlideShare a Scribd company logo
1 of 33
AIFIRSTForSDLC
Take a Leap into future with AI for live enterprise
Abhijit Shah,
Principal Technology Architect , Infosys
• Microsoft Azure Solutions
Architect Expert
• A Cloud Enthusiast, Leading
Cloud Community
• Innovation Lead
• Sustainability Champion
https://www.linkedin.com/in/abhijitvijayshah
Abhijit Shah
Principal Technology Architect, Infosys
Microsoft Certified Azure Solutions Architect Expert
A Cloud Enthusiast, Running a Cloud Community
Innovation Lead and Sustainability Champion
https://www.linkedin.com/in/abhijitvijayshah
AI First Approach for SDLC | 29th July 23
• Topic - Prompt Engineering & AI First Approach for SDLC
• We will look at ways of applying AI First in each of the
phases of Software lifecycle – Requirements, Design,
Development, Testing , Documentation etc.
• We will use Chat GPT for Prompt Engineering and then
look at using Plugins in our dev environment.
• With hands on demos inside Visual studio code we will
generate code in for the identified requirement.
• What can I do next ?
• Find at least 3 things that we do manually , that could be
accelerated with the use of AI, and you get comfortable
with AI, start applying AI first in anything you do.
• With your new AI assistant doing the mundane jobs, you
can spend more quality time with your friends and family.
TREY
research
Canyouguesswhatis
showninthispicture?
3
• Supercomputer makes
calculations in blink of an eye that
take rivals 47 years.
• The 2019 version of this device
had 53 qubits; this next
generation device has 70.
• The new machine is 241 million
times more powerful than the
2019 machine.
• A paper from researchers at
Google
Quantum Computing in Artificial Intelligence Around the Corner (einfochips.com)
Moments of disruption provides a
biggest opportunity and today, it’s
Generative AI @ center stage
A word of caution, If you don't
disrupt yourself someone else will
.. So…. Get ready!
Let’s wear the hats of Innovators &
engage in this wave of Generative
AI led disruptions.
Identify and build use cases with
GPT as Co-pilot to deliver
personalized customer experience
with the power of AI
TREY
research
Agenda
Generative AI for Software Development Lifecycle
1. What is Generative AI ?
2. What is Prompt Engineering ?
3. How to apply Generative AI in SDLC ?
4. Demos of AI in SDLC
5
TREY
research
TheAgeof
GenerativeAI
• What is Generative AI?
• What is Prompt Engineering?
6
Launched on
30 Nov 2022
Chat GPT has made
HISTORY
in just 5 days
Latest, GPT 4 was release on
15th March 23
Instagram’s Thread’s App has set new record,
100 M users in 5 days
• Google CEO was the first to pitch the concept of ‘AI-First’ in 2017 & it’s a radical rethinking about how computers would
work in future
AI FIRST APPROACH
A strategy that means an increased focus on use of machine learning and AI for solving user problems.
✓ Human Adopts to machines Vs Machines adopt to Human
✓ Conversational and Sensory AI - AI is the New UI.
There are four core attributes associated with the ‘AI-First’
experience.
✓ Ability to interact with computing in a natural and
seamless way
✓ Ambient, multi-device presence of computing
✓ Thoughtfully contextual computing
✓ Computing that can learn and adapt
Unsupervised Learning Then Supervised Learning
• Human babies learn to speak languages
before formal education at school
(unsupervised learning)
• Kids then get fine tuned from school with
exam scores that tell them what is better or
worse answer (supervised learning)
• ChatGPT is made up of two main parts
• Understanding the context of the
input chat by human
• Left side in diagram
• Generate reactionary answer back
to the human
• Right side in diagram
Generative Pre-trained Transformers
Prompt Engineering
Tips to improve your prompts
TREY
research
AI FIRST APPROCH IN SDLC
13
The proficiency of Large Language Models (LLMs) in understanding and generating code,
are set to revolutionize software engineering like never before.
Use this picture as requirement & build a website
AI FirstApproach for Software Development Lifecycle
Chat GPT
for Smart
Scrum Masters, Product Owners, Stakeholders, Developers,
Content Writers, Artists, Authors, Doctors
..and everyone
Demos
Generative AI
For
Software Development Life Cycle
● Generate Requirements
● Create Class Design
● Create Code
● Optimize Code
● Create Test Cases
● Create Documentation
● Create SQL / Database
● Create Image / Logos
AutoGPT – the autonomous AI agent
AutoGPT was released on 30-Mar, 23 shortly after the launch of GPT-4 & it has got the world divided due to the pros & cons associated with a fully autonomous AI model in place.
TREY
research
ResponsibleAI
#TechForGood , Ethics in AI, #GreenAI
19
#BeResponsible while using GPT-3
Especially if you care about Sustainability!
● T5, Google’s pretrained language model, used 86 megawatts and produced 47 metric tons of CO2 emissions
● Meena, Google’s multiturn, open-domain chatbot, used 232 megawatts and produced 96 metric tons of carbon dioxide
emissions
● GShard, a Google-developed language translation framework, used 24 megawatts and produced 4.3 metric tons of carbon
dioxide emissions.
● Switch Transformer, a Google-developed routing algorithm, used 179 megawatts and produced 59 metric tons of carbon
dioxide emissions
● And worst of all: GPT-3, Open AI's sophisticated natural language model, used 1,287 megawatts hours (=1.3 Gwh) and
produced metric 552 metric tons of carbon dioxide emissions.
This is roughly equivalent to driving a car 1.3 million miles - in one hour!
● Natural intelligence in human beings , which works with the functionality of the human brain, consumes: 25 KW (Open
AI: 1300000 KW) - this is 0.002%, so 99.998% more efficient! (By comparison, the human brain works with 20 watts /
hour).
Stop using GPT-3 - especially if you care about sustainability! | LinkedIn
Carbon Emissions from IT
● Images created using Stable Diffusion Online (stablediffusionweb.com)
Images depicting CO2 emissions from IT Devices generated using AI
TREY
research
ThankYou
Abhijit Shah
+91 9423497869
Abhijith.shah@gmail.com
https://www.linkedin.com/in/abhijitvijayshah
22
AIFIRSTForSDLC
HANDS ON DEMOS
https://www.linkedin.com/in/abhijitvijayshah
Abhijit Shah,
Principal Technology Architect , Infosys
TREY
research
HandsOnDemo -AIinSDLC
Use Case - Digital Wallet : Assume that our project requires us to develop a Digital wallet system. We proceed with SDLC phases step by step as given below. At each step we will see
how Generative AI model such as GPT3/4, ChatGPT, etc. can help us.
24
Requirement phase:
•The requirement of the project is to develop a digital wallet system for retail payment. The user can make payments for his purchases using the
wallet. He should be able to link his wallet to his bank account. What are the key requirements of such a system?
•We can get more information for the progressive elaboration of the requirement.
•Elaborate on Payment System mentioned above.
•What should the Payment System user interface contain?
•What should be the elements of Payment Screen mentioned above?
Design phase:
•Write the software design for the digital wallet system.
•What are the main classes of Payment System module in wallet system?
•what are the methods that the Payment class will have ?
Build phase:
•Write the code for Payment class using python
•write the HTML code for the user interface for the Payment Request of the wallet system
•write python code to validate the data entered in the user interface of the Payment Request of the wallet system
•Write sql code to create a table to store the data entered in the user interface of the Payment Request of the wallet system
Test phase:
•Write the code to test the methods in PaymentRequest class
TREY
research
Elaboratingaproblemstatementintohighlevelrequirements
Using Generative AI – GPT 3.5
• Prompt
• The requirement of the project is to develop a digital wallet system for retail payment. The user can make payments
for his purchases using the wallet. He should be able to link his wallet to his bank account. What are the key
requirements of such a system?
• Response
1. Security: The system should have a secure platform to protect user data and transactions.
2. User Interface: The user interface should be simple and intuitive, allowing users to easily perform payments and
manage their accounts.
3. Payment Processing: The system should be able to process payments from various sources and provide real-time
updates.
4. Payment Options: The system should be able to accept payments from debit/credit cards, digital wallets, bank
accounts, and other payment solutions.
5. Reports and Analytics: The system should provide detailed reports and analytics to help users monitor their spending
and performance.
Model Used: text-davinci-003 25
TREY
research
DesigntheClassesfortheDigitalWallet
Prompt :
We want to prepare the class design for the Wallet System. What are the main classes of Payment System module in wallet
system?
Response:
1. User: This class will contain all the details of the user who is using the wallet system, including their personal details, payment
options, and loyalty programs.
2. Payment: This class will contain details of the payment made by the user, including the source, amount, and payment
method.
3. Transaction: This class will contain details of the transaction made using the wallet system, including the source, amount, &
payment method.
4. Bank Account: This class will contain details of the user’s linked bank account, including account details and balance.
5. Loyalty Program: This class will contain details of the loyalty program associated with the wallet system, including rewards &
discounts.
6. Payment Gateway: This class will contain details of the payment gateway used by the wallet system, including payment
options and processing fees.
7. Security: This class will contain details of the security measures used by the wallet system, including encryption and
authentication.
26
TREY
research
Obtainlistofmethodsforaclass
Prompt :
• List the methods of the User and Payment class
RESPONSE
User Class
1. getUserDetails(): This method will return the details of the user, including their personal information and payment options
2. setUserDetails(): This method will set the details of the user, including their personal information and payment options.
3. getLoyaltyPrograms(): This method will return the details of the loyalty programs associated with the user’s wallet.
4. setLoyaltyPrograms(): This method will set the details of the loyalty programs associated with the user’s wallet.
5. linkBankAccount(): This method will link the user’s wallet to their bank account.
Payment Class
1. getPaymentDetails(): This method will return the details of the payment, including the source, amount, and payment method.
2. setPaymentDetails(): This method will set the details of the payment, including the source, amount, and payment method.
3. processPayment(): This method will process the payment and update the user’s wallet balance.
4. getTransactionDetails(): This method will return the details of the transaction, including the source, amount, and payment method.
5. setTransactionDetails(): This method will set the details of the transaction, including the source, amount, and payment method.
27
TREY
research
CodeGeneration
28
Prompt:
Write the code for Payment class using python.
Response:
class Payment:
def __init__(self, amount, date, type):
self.amount = amount
self.date = date
self.type = type
def process_payment(self):
# code to process the payment
return True
def process_refund(self):
# code to process the refund
return True
def process_reversal(self):
# code to process the reversal
return True
def generateReceipt(self):
# code to process the receipt
return True
TREY
research
GenerateBasicUICode
Prompt : Write the HTML code for the user interface for the Payment Processing screen of the wallet system.
Response:
<!DOCTYPE html> <html> <head> <title>Payment Processing</title><style type="text/css">
body {font-family: Arial, Helvetica, sans-serif;margin: 0;}
.container {
margin: 10px auto;width: 600px;padding: 20px;background-color: #f1f1f1;border-radius: 10px;}
h2 {font-size: 24px;margin-bottom: 10px;}
label {font-size: 16px;margin-bottom: 5px;width: 150px;display: inline-block;}
input[type="text"] {width: 200px;padding: 5px;border-radius: 5px;border: 1px solid #ccc;}
input[type="submit"] {padding: 5px 10px;background-color: #4CAF50;
color: #fff;border-radius: 5px;border: none;margin-top: 10px;} </style>
</head>
<body> <div class="container">
<h2>Payment Processing</h2>
<form method="post" action="payment_process.php">
<label>Payment Method:</label>
<input type="text" name="payment_method" /><br><br>
</form> </div> </body> </html>
29
TREY
research
GenerateUnitTestingCode
Prompt :
Write Unit Testing Code for Bank account class.
import unittest
from BankAccount import BankAccountpublic class BankAccountTest {
class BankAccountTestCase(unittest.TestCase):
Response:
def setUp(self):
self.account = BankAccount('John Doe', '123456789')
________________________________________________
def test_account_holder_name(self):
self.assertEqual(self.account.holder_name, 'John Doe’)
________________________________________________
def test_account_number(self):
self.assertEqual(self.account.account_number, '123456789’)
________________________________________________
30
def test_deposit_funds(self):
self.account.deposit_funds(1000)
self.assertEqual(self.account.balance, 1000)
______________________________________________
def test_withdraw_funds(self):
self.account.deposit_funds(1000)
self.account.withdraw_funds(500)
self.assertEqual(self.account.balance, 500)
TREY
research
GeneratingUserGuideinmultiplelanguages
31
Consider a scenario wherein you wish to
handover the code to the client along
with code documentation. Assuming the
client developers prefer the
documentation in their native language.
Such translations can be achieved by
using GPT3 models.
•Let us print the Summary of a simple
“Hello World” Python program in English.
And then instruct GPT3 model for a
French version of the same.
Intent: Generate User Guide
Prompt: <Note: Appropriate code snippet is placed here. In our case, the HTML code for Payment Processing is
placed here. >
Create a user guide in Hindi and French based on this code:
Response by Model : text--davinci-003
Hindi
भुगतान प्रक्रियाकरण
डीवी क
े लिए एक आवश्यकता है क्रक आप भुगतान प्रक्रियाकरण कर सकते हैं। इस कोड का उपयोग करक
े , आप एक भुगतान प्रक्रियाकरण पृष्ठ बना
सकते हैं।
पृष्ठ पर एक संग्रह है जो ननम्न वववरण शालिि है:
• भुगतान ववधि: आप ि
े डडट काडड, डीबीएच, इिेक्ट्रॉननक क
ु क्रकज़, और अन्य िुद्राओं का उपयोग कर सकते हैं।
• रालश: आप अपनी भुगतान रालश दजड कर सकते हैं।
• भुगतान आवृवि: आप एक बार क
े लिए, साप्ताहहक, िालसक या अन्य आवृवियों िें अपना भुगतान कर सकते हैं।
• सबलिट बटन: आप अपनी भुगतान जिा करने क
े लिए एक सबलिट बटन दजड कर सकते हैं।
French
Traitement des paiements
Le Développement d'une nécessité pour vous de traiter les paiements. Avec ce code, vous pouvez créer une page de traitement des
paiements.
La page comprend une collection comprenant les détails suivants:
• Mode de paiement: vous pouvez utiliser des cartes de crédit, des DBAs, des électroniques et d'autres devises.
• Montant: Vous pouvez entrer votre montant de paiement.
• Fréquence de paiement: Vous pouvez effectuer votre paiement à une seule fois, hebdomadaire, mensuel ou d'autres fréquences.
• Bouton Envoyer: Vous pouvez entrer un bouton Envoyer pour effectuer votre paiement.
TREY
research
TaketheAIFIRSTApproachforSDLCcourseonInfosysSpringboard
32
Infosys announces the launch of its AI-Training sessions on Infosys
Springboard in June 2023. The topics are: Introduction to Artificial Intelligence,
Introduction to Natural Language Processing, Introduction to Deep Learning
and Generative AI - Tools and Techniques.
Home | Infosys Springboard (onwingspan.com)
TREY
research
ThankYou
Abhijit Shah
+91 XXXXXXXXXX
Abhijith.shah@gmail.com
https://www.linkedin.com/in/abhijitvijayshah
33

More Related Content

Similar to ANIn Pune July 2023 |Prompt Engineering and AI first SDLC by Abhijit Shah

Introducción al Machine Learning Automático
Introducción al Machine Learning AutomáticoIntroducción al Machine Learning Automático
Introducción al Machine Learning Automático
Sri Ambati
 
Artificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdf
Artificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdfArtificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdf
Artificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdf
Bhuvnesh Sharma
 

Similar to ANIn Pune July 2023 |Prompt Engineering and AI first SDLC by Abhijit Shah (20)

Building Products That Think- Bhaskaran Srinivasan & Ashish Gupta
Building Products That Think- Bhaskaran Srinivasan & Ashish GuptaBuilding Products That Think- Bhaskaran Srinivasan & Ashish Gupta
Building Products That Think- Bhaskaran Srinivasan & Ashish Gupta
 
D365 power platform-user-group-deck-v02
D365 power platform-user-group-deck-v02D365 power platform-user-group-deck-v02
D365 power platform-user-group-deck-v02
 
Introducción al Machine Learning Automático
Introducción al Machine Learning AutomáticoIntroducción al Machine Learning Automático
Introducción al Machine Learning Automático
 
SkillsFuture Festival at NUS 2019- Artificial Intelligence for Everyone - A P...
SkillsFuture Festival at NUS 2019- Artificial Intelligence for Everyone - A P...SkillsFuture Festival at NUS 2019- Artificial Intelligence for Everyone - A P...
SkillsFuture Festival at NUS 2019- Artificial Intelligence for Everyone - A P...
 
A Modern Dive into QA Automation and Beyond
A Modern Dive into QA Automation and BeyondA Modern Dive into QA Automation and Beyond
A Modern Dive into QA Automation and Beyond
 
Maruti gollapudi cv
Maruti gollapudi cvMaruti gollapudi cv
Maruti gollapudi cv
 
Hrms industrial training report
Hrms industrial training reportHrms industrial training report
Hrms industrial training report
 
Uses of ChatGPT in Marketing
Uses of ChatGPT in MarketingUses of ChatGPT in Marketing
Uses of ChatGPT in Marketing
 
Uses of ChatGPT in Marketing
Uses of ChatGPT in MarketingUses of ChatGPT in Marketing
Uses of ChatGPT in Marketing
 
MassChallenge Time Machine for .NET
MassChallenge Time Machine for .NETMassChallenge Time Machine for .NET
MassChallenge Time Machine for .NET
 
Ijsred v2 i5p95
Ijsred v2 i5p95Ijsred v2 i5p95
Ijsred v2 i5p95
 
Hybrid model for software development
Hybrid model for software developmentHybrid model for software development
Hybrid model for software development
 
AI-900 Slides.pptx
AI-900 Slides.pptxAI-900 Slides.pptx
AI-900 Slides.pptx
 
Sakshi sharma resume
Sakshi sharma resumeSakshi sharma resume
Sakshi sharma resume
 
Artificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdf
Artificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdfArtificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdf
Artificial-Intelligence-and-Machine-Learning-by-IIT-Jammu.pdf
 
GDSC FY Orientation.pptx
GDSC FY Orientation.pptxGDSC FY Orientation.pptx
GDSC FY Orientation.pptx
 
AI improves software testing by Kari Kakkonen at TQS
AI improves software testing by Kari Kakkonen at TQSAI improves software testing by Kari Kakkonen at TQS
AI improves software testing by Kari Kakkonen at TQS
 
Whats Next for Machine Learning
Whats Next for Machine LearningWhats Next for Machine Learning
Whats Next for Machine Learning
 
Session 2023-11.pptx
Session 2023-11.pptxSession 2023-11.pptx
Session 2023-11.pptx
 
IRJET- College Enquiry Chat-Bot using API.AI
IRJET- College Enquiry Chat-Bot using API.AIIRJET- College Enquiry Chat-Bot using API.AI
IRJET- College Enquiry Chat-Bot using API.AI
 

More from AgileNetwork

More from AgileNetwork (20)

ANIn Pune May 2024 | Best practices in testing of AI based SaMD by Anupama An...
ANIn Pune May 2024 | Best practices in testing of AI based SaMD by Anupama An...ANIn Pune May 2024 | Best practices in testing of AI based SaMD by Anupama An...
ANIn Pune May 2024 | Best practices in testing of AI based SaMD by Anupama An...
 
ANIn Ahmedabad May 2024 | Sailing the Agile seas Leveraging Business Prioriti...
ANIn Ahmedabad May 2024 | Sailing the Agile seas Leveraging Business Prioriti...ANIn Ahmedabad May 2024 | Sailing the Agile seas Leveraging Business Prioriti...
ANIn Ahmedabad May 2024 | Sailing the Agile seas Leveraging Business Prioriti...
 
ANIn Mumbai May 2024 | Measuring Business Agility by Prashant Neharkar
ANIn Mumbai May 2024 | Measuring Business Agility by Prashant NeharkarANIn Mumbai May 2024 | Measuring Business Agility by Prashant Neharkar
ANIn Mumbai May 2024 | Measuring Business Agility by Prashant Neharkar
 
ANIn Ahmedabad May 2024 | Reusability Using Agile by Pratik Patel
ANIn Ahmedabad May 2024 | Reusability Using Agile by Pratik PatelANIn Ahmedabad May 2024 | Reusability Using Agile by Pratik Patel
ANIn Ahmedabad May 2024 | Reusability Using Agile by Pratik Patel
 
ANIn Chennai April 2024 |Agile Engineering: Modernizing Legacy Systems by Ana...
ANIn Chennai April 2024 |Agile Engineering: Modernizing Legacy Systems by Ana...ANIn Chennai April 2024 |Agile Engineering: Modernizing Legacy Systems by Ana...
ANIn Chennai April 2024 |Agile Engineering: Modernizing Legacy Systems by Ana...
 
ANIn Chennai April 2024 |Beyond Big Bang: Technical Agility in Vintage Produc...
ANIn Chennai April 2024 |Beyond Big Bang: Technical Agility in Vintage Produc...ANIn Chennai April 2024 |Beyond Big Bang: Technical Agility in Vintage Produc...
ANIn Chennai April 2024 |Beyond Big Bang: Technical Agility in Vintage Produc...
 
ANIn Gurugram April 2024 |Agile Adaptation: Driving Progress in Generative AI...
ANIn Gurugram April 2024 |Agile Adaptation: Driving Progress in Generative AI...ANIn Gurugram April 2024 |Agile Adaptation: Driving Progress in Generative AI...
ANIn Gurugram April 2024 |Agile Adaptation: Driving Progress in Generative AI...
 
ANIn Noida Oct 2023 |AI Usage in Agile Transformation Journey by Kunal
ANIn Noida Oct 2023 |AI Usage in Agile Transformation Journey by KunalANIn Noida Oct 2023 |AI Usage in Agile Transformation Journey by Kunal
ANIn Noida Oct 2023 |AI Usage in Agile Transformation Journey by Kunal
 
ANIn Kolkata April 2024 |Ethics of AI by Abhishek Nandy
ANIn Kolkata April 2024 |Ethics of AI by Abhishek NandyANIn Kolkata April 2024 |Ethics of AI by Abhishek Nandy
ANIn Kolkata April 2024 |Ethics of AI by Abhishek Nandy
 
ANIn Kolkata April 2024 | AI Enabled Reflection in Agile Delivery by Indranil...
ANIn Kolkata April 2024 | AI Enabled Reflection in Agile Delivery by Indranil...ANIn Kolkata April 2024 | AI Enabled Reflection in Agile Delivery by Indranil...
ANIn Kolkata April 2024 | AI Enabled Reflection in Agile Delivery by Indranil...
 
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
 
ANIn Pune April 2024 |L&D Accelerating business growth by Mukta Nalke
ANIn Pune April 2024 |L&D Accelerating business growth by Mukta NalkeANIn Pune April 2024 |L&D Accelerating business growth by Mukta Nalke
ANIn Pune April 2024 |L&D Accelerating business growth by Mukta Nalke
 
ANIn Pune April 2024 | Meeting Modern Learning Needs with Innovation by Ankit...
ANIn Pune April 2024 | Meeting Modern Learning Needs with Innovation by Ankit...ANIn Pune April 2024 | Meeting Modern Learning Needs with Innovation by Ankit...
ANIn Pune April 2024 | Meeting Modern Learning Needs with Innovation by Ankit...
 
ANIn Ahmedabad April 2024 | Powering Big Wins with Small, Agile Teams by Yoge...
ANIn Ahmedabad April 2024 | Powering Big Wins with Small, Agile Teams by Yoge...ANIn Ahmedabad April 2024 | Powering Big Wins with Small, Agile Teams by Yoge...
ANIn Ahmedabad April 2024 | Powering Big Wins with Small, Agile Teams by Yoge...
 
ANIn Coimbatore March 2024 | Unlocking Agility with Gen AI by Balaprasanna S
ANIn Coimbatore March 2024 | Unlocking Agility with Gen AI by Balaprasanna SANIn Coimbatore March 2024 | Unlocking Agility with Gen AI by Balaprasanna S
ANIn Coimbatore March 2024 | Unlocking Agility with Gen AI by Balaprasanna S
 
ANIn Coimbatore March 2024 | Agile & AI in Project Management by Dhilipkumar ...
ANIn Coimbatore March 2024 | Agile & AI in Project Management by Dhilipkumar ...ANIn Coimbatore March 2024 | Agile & AI in Project Management by Dhilipkumar ...
ANIn Coimbatore March 2024 | Agile & AI in Project Management by Dhilipkumar ...
 
ANIn Chennai March 2024 |Conversational AI for Agility in Healthcare by Shine...
ANIn Chennai March 2024 |Conversational AI for Agility in Healthcare by Shine...ANIn Chennai March 2024 |Conversational AI for Agility in Healthcare by Shine...
ANIn Chennai March 2024 |Conversational AI for Agility in Healthcare by Shine...
 
ANIn Chennai March 2024 |Oxygenating AI ecosystem with Agility by Gowtham Bal...
ANIn Chennai March 2024 |Oxygenating AI ecosystem with Agility by Gowtham Bal...ANIn Chennai March 2024 |Oxygenating AI ecosystem with Agility by Gowtham Bal...
ANIn Chennai March 2024 |Oxygenating AI ecosystem with Agility by Gowtham Bal...
 
ANIn Ahmedabad March 2024 | The Power of Retrospection by Rakesh Mehta
ANIn Ahmedabad March 2024 | The Power of Retrospection by Rakesh MehtaANIn Ahmedabad March 2024 | The Power of Retrospection by Rakesh Mehta
ANIn Ahmedabad March 2024 | The Power of Retrospection by Rakesh Mehta
 
ANIn Pune March 2024 | Customer Stratification for Business Growth by Manish ...
ANIn Pune March 2024 | Customer Stratification for Business Growth by Manish ...ANIn Pune March 2024 | Customer Stratification for Business Growth by Manish ...
ANIn Pune March 2024 | Customer Stratification for Business Growth by Manish ...
 

Recently uploaded

Recently uploaded (12)

W.H.Bender Quote 63 You Must Plan T.O.P Take-Out Packaging
W.H.Bender Quote 63 You Must Plan T.O.P Take-Out PackagingW.H.Bender Quote 63 You Must Plan T.O.P Take-Out Packaging
W.H.Bender Quote 63 You Must Plan T.O.P Take-Out Packaging
 
Marketing Management 16th edition by Philip Kotler test bank.docx
Marketing Management 16th edition by Philip Kotler test bank.docxMarketing Management 16th edition by Philip Kotler test bank.docx
Marketing Management 16th edition by Philip Kotler test bank.docx
 
Group work -meaning and definitions- Characteristics and Importance
Group work -meaning and definitions- Characteristics and ImportanceGroup work -meaning and definitions- Characteristics and Importance
Group work -meaning and definitions- Characteristics and Importance
 
Internal Reconstruction Corporate accounting by bhumika Garg
Internal Reconstruction Corporate accounting by bhumika GargInternal Reconstruction Corporate accounting by bhumika Garg
Internal Reconstruction Corporate accounting by bhumika Garg
 
Persuasive and Communication is the art of negotiation.
Persuasive and Communication is the art of negotiation.Persuasive and Communication is the art of negotiation.
Persuasive and Communication is the art of negotiation.
 
W.H.Bender Quote 62 - Always strive to be a Hospitality Service professional
W.H.Bender Quote 62 - Always strive to be a Hospitality Service professionalW.H.Bender Quote 62 - Always strive to be a Hospitality Service professional
W.H.Bender Quote 62 - Always strive to be a Hospitality Service professional
 
thesis-and-viva-voce preparation for research scholars
thesis-and-viva-voce preparation for research scholarsthesis-and-viva-voce preparation for research scholars
thesis-and-viva-voce preparation for research scholars
 
Nurturing Tomorrow’s Leaders_ The Emerging Leaders Institute.pdf
Nurturing Tomorrow’s Leaders_ The Emerging Leaders Institute.pdfNurturing Tomorrow’s Leaders_ The Emerging Leaders Institute.pdf
Nurturing Tomorrow’s Leaders_ The Emerging Leaders Institute.pdf
 
digital Human resource management presentation.pdf
digital Human resource management presentation.pdfdigital Human resource management presentation.pdf
digital Human resource management presentation.pdf
 
How Software Developers Destroy Business Value.pptx
How Software Developers Destroy Business Value.pptxHow Software Developers Destroy Business Value.pptx
How Software Developers Destroy Business Value.pptx
 
Spring-2024-Priesthoods of Augustus Yale Historical Review
Spring-2024-Priesthoods of Augustus Yale Historical ReviewSpring-2024-Priesthoods of Augustus Yale Historical Review
Spring-2024-Priesthoods of Augustus Yale Historical Review
 
Information Technology Project Management, Revised 7th edition test bank.docx
Information Technology Project Management, Revised 7th edition test bank.docxInformation Technology Project Management, Revised 7th edition test bank.docx
Information Technology Project Management, Revised 7th edition test bank.docx
 

ANIn Pune July 2023 |Prompt Engineering and AI first SDLC by Abhijit Shah

  • 1. AIFIRSTForSDLC Take a Leap into future with AI for live enterprise Abhijit Shah, Principal Technology Architect , Infosys • Microsoft Azure Solutions Architect Expert • A Cloud Enthusiast, Leading Cloud Community • Innovation Lead • Sustainability Champion https://www.linkedin.com/in/abhijitvijayshah
  • 2. Abhijit Shah Principal Technology Architect, Infosys Microsoft Certified Azure Solutions Architect Expert A Cloud Enthusiast, Running a Cloud Community Innovation Lead and Sustainability Champion https://www.linkedin.com/in/abhijitvijayshah AI First Approach for SDLC | 29th July 23 • Topic - Prompt Engineering & AI First Approach for SDLC • We will look at ways of applying AI First in each of the phases of Software lifecycle – Requirements, Design, Development, Testing , Documentation etc. • We will use Chat GPT for Prompt Engineering and then look at using Plugins in our dev environment. • With hands on demos inside Visual studio code we will generate code in for the identified requirement. • What can I do next ? • Find at least 3 things that we do manually , that could be accelerated with the use of AI, and you get comfortable with AI, start applying AI first in anything you do. • With your new AI assistant doing the mundane jobs, you can spend more quality time with your friends and family.
  • 3. TREY research Canyouguesswhatis showninthispicture? 3 • Supercomputer makes calculations in blink of an eye that take rivals 47 years. • The 2019 version of this device had 53 qubits; this next generation device has 70. • The new machine is 241 million times more powerful than the 2019 machine. • A paper from researchers at Google Quantum Computing in Artificial Intelligence Around the Corner (einfochips.com)
  • 4. Moments of disruption provides a biggest opportunity and today, it’s Generative AI @ center stage A word of caution, If you don't disrupt yourself someone else will .. So…. Get ready! Let’s wear the hats of Innovators & engage in this wave of Generative AI led disruptions. Identify and build use cases with GPT as Co-pilot to deliver personalized customer experience with the power of AI
  • 5. TREY research Agenda Generative AI for Software Development Lifecycle 1. What is Generative AI ? 2. What is Prompt Engineering ? 3. How to apply Generative AI in SDLC ? 4. Demos of AI in SDLC 5
  • 6. TREY research TheAgeof GenerativeAI • What is Generative AI? • What is Prompt Engineering? 6
  • 7. Launched on 30 Nov 2022 Chat GPT has made HISTORY in just 5 days Latest, GPT 4 was release on 15th March 23 Instagram’s Thread’s App has set new record, 100 M users in 5 days
  • 8. • Google CEO was the first to pitch the concept of ‘AI-First’ in 2017 & it’s a radical rethinking about how computers would work in future AI FIRST APPROACH A strategy that means an increased focus on use of machine learning and AI for solving user problems. ✓ Human Adopts to machines Vs Machines adopt to Human ✓ Conversational and Sensory AI - AI is the New UI. There are four core attributes associated with the ‘AI-First’ experience. ✓ Ability to interact with computing in a natural and seamless way ✓ Ambient, multi-device presence of computing ✓ Thoughtfully contextual computing ✓ Computing that can learn and adapt
  • 9. Unsupervised Learning Then Supervised Learning • Human babies learn to speak languages before formal education at school (unsupervised learning) • Kids then get fine tuned from school with exam scores that tell them what is better or worse answer (supervised learning) • ChatGPT is made up of two main parts • Understanding the context of the input chat by human • Left side in diagram • Generate reactionary answer back to the human • Right side in diagram Generative Pre-trained Transformers
  • 11. Tips to improve your prompts
  • 12.
  • 13. TREY research AI FIRST APPROCH IN SDLC 13 The proficiency of Large Language Models (LLMs) in understanding and generating code, are set to revolutionize software engineering like never before.
  • 14. Use this picture as requirement & build a website
  • 15.
  • 16. AI FirstApproach for Software Development Lifecycle
  • 17. Chat GPT for Smart Scrum Masters, Product Owners, Stakeholders, Developers, Content Writers, Artists, Authors, Doctors ..and everyone
  • 18. Demos Generative AI For Software Development Life Cycle ● Generate Requirements ● Create Class Design ● Create Code ● Optimize Code ● Create Test Cases ● Create Documentation ● Create SQL / Database ● Create Image / Logos AutoGPT – the autonomous AI agent AutoGPT was released on 30-Mar, 23 shortly after the launch of GPT-4 & it has got the world divided due to the pros & cons associated with a fully autonomous AI model in place.
  • 20. #BeResponsible while using GPT-3 Especially if you care about Sustainability! ● T5, Google’s pretrained language model, used 86 megawatts and produced 47 metric tons of CO2 emissions ● Meena, Google’s multiturn, open-domain chatbot, used 232 megawatts and produced 96 metric tons of carbon dioxide emissions ● GShard, a Google-developed language translation framework, used 24 megawatts and produced 4.3 metric tons of carbon dioxide emissions. ● Switch Transformer, a Google-developed routing algorithm, used 179 megawatts and produced 59 metric tons of carbon dioxide emissions ● And worst of all: GPT-3, Open AI's sophisticated natural language model, used 1,287 megawatts hours (=1.3 Gwh) and produced metric 552 metric tons of carbon dioxide emissions. This is roughly equivalent to driving a car 1.3 million miles - in one hour! ● Natural intelligence in human beings , which works with the functionality of the human brain, consumes: 25 KW (Open AI: 1300000 KW) - this is 0.002%, so 99.998% more efficient! (By comparison, the human brain works with 20 watts / hour). Stop using GPT-3 - especially if you care about sustainability! | LinkedIn
  • 21. Carbon Emissions from IT ● Images created using Stable Diffusion Online (stablediffusionweb.com) Images depicting CO2 emissions from IT Devices generated using AI
  • 24. TREY research HandsOnDemo -AIinSDLC Use Case - Digital Wallet : Assume that our project requires us to develop a Digital wallet system. We proceed with SDLC phases step by step as given below. At each step we will see how Generative AI model such as GPT3/4, ChatGPT, etc. can help us. 24 Requirement phase: •The requirement of the project is to develop a digital wallet system for retail payment. The user can make payments for his purchases using the wallet. He should be able to link his wallet to his bank account. What are the key requirements of such a system? •We can get more information for the progressive elaboration of the requirement. •Elaborate on Payment System mentioned above. •What should the Payment System user interface contain? •What should be the elements of Payment Screen mentioned above? Design phase: •Write the software design for the digital wallet system. •What are the main classes of Payment System module in wallet system? •what are the methods that the Payment class will have ? Build phase: •Write the code for Payment class using python •write the HTML code for the user interface for the Payment Request of the wallet system •write python code to validate the data entered in the user interface of the Payment Request of the wallet system •Write sql code to create a table to store the data entered in the user interface of the Payment Request of the wallet system Test phase: •Write the code to test the methods in PaymentRequest class
  • 25. TREY research Elaboratingaproblemstatementintohighlevelrequirements Using Generative AI – GPT 3.5 • Prompt • The requirement of the project is to develop a digital wallet system for retail payment. The user can make payments for his purchases using the wallet. He should be able to link his wallet to his bank account. What are the key requirements of such a system? • Response 1. Security: The system should have a secure platform to protect user data and transactions. 2. User Interface: The user interface should be simple and intuitive, allowing users to easily perform payments and manage their accounts. 3. Payment Processing: The system should be able to process payments from various sources and provide real-time updates. 4. Payment Options: The system should be able to accept payments from debit/credit cards, digital wallets, bank accounts, and other payment solutions. 5. Reports and Analytics: The system should provide detailed reports and analytics to help users monitor their spending and performance. Model Used: text-davinci-003 25
  • 26. TREY research DesigntheClassesfortheDigitalWallet Prompt : We want to prepare the class design for the Wallet System. What are the main classes of Payment System module in wallet system? Response: 1. User: This class will contain all the details of the user who is using the wallet system, including their personal details, payment options, and loyalty programs. 2. Payment: This class will contain details of the payment made by the user, including the source, amount, and payment method. 3. Transaction: This class will contain details of the transaction made using the wallet system, including the source, amount, & payment method. 4. Bank Account: This class will contain details of the user’s linked bank account, including account details and balance. 5. Loyalty Program: This class will contain details of the loyalty program associated with the wallet system, including rewards & discounts. 6. Payment Gateway: This class will contain details of the payment gateway used by the wallet system, including payment options and processing fees. 7. Security: This class will contain details of the security measures used by the wallet system, including encryption and authentication. 26
  • 27. TREY research Obtainlistofmethodsforaclass Prompt : • List the methods of the User and Payment class RESPONSE User Class 1. getUserDetails(): This method will return the details of the user, including their personal information and payment options 2. setUserDetails(): This method will set the details of the user, including their personal information and payment options. 3. getLoyaltyPrograms(): This method will return the details of the loyalty programs associated with the user’s wallet. 4. setLoyaltyPrograms(): This method will set the details of the loyalty programs associated with the user’s wallet. 5. linkBankAccount(): This method will link the user’s wallet to their bank account. Payment Class 1. getPaymentDetails(): This method will return the details of the payment, including the source, amount, and payment method. 2. setPaymentDetails(): This method will set the details of the payment, including the source, amount, and payment method. 3. processPayment(): This method will process the payment and update the user’s wallet balance. 4. getTransactionDetails(): This method will return the details of the transaction, including the source, amount, and payment method. 5. setTransactionDetails(): This method will set the details of the transaction, including the source, amount, and payment method. 27
  • 28. TREY research CodeGeneration 28 Prompt: Write the code for Payment class using python. Response: class Payment: def __init__(self, amount, date, type): self.amount = amount self.date = date self.type = type def process_payment(self): # code to process the payment return True def process_refund(self): # code to process the refund return True def process_reversal(self): # code to process the reversal return True def generateReceipt(self): # code to process the receipt return True
  • 29. TREY research GenerateBasicUICode Prompt : Write the HTML code for the user interface for the Payment Processing screen of the wallet system. Response: <!DOCTYPE html> <html> <head> <title>Payment Processing</title><style type="text/css"> body {font-family: Arial, Helvetica, sans-serif;margin: 0;} .container { margin: 10px auto;width: 600px;padding: 20px;background-color: #f1f1f1;border-radius: 10px;} h2 {font-size: 24px;margin-bottom: 10px;} label {font-size: 16px;margin-bottom: 5px;width: 150px;display: inline-block;} input[type="text"] {width: 200px;padding: 5px;border-radius: 5px;border: 1px solid #ccc;} input[type="submit"] {padding: 5px 10px;background-color: #4CAF50; color: #fff;border-radius: 5px;border: none;margin-top: 10px;} </style> </head> <body> <div class="container"> <h2>Payment Processing</h2> <form method="post" action="payment_process.php"> <label>Payment Method:</label> <input type="text" name="payment_method" /><br><br> </form> </div> </body> </html> 29
  • 30. TREY research GenerateUnitTestingCode Prompt : Write Unit Testing Code for Bank account class. import unittest from BankAccount import BankAccountpublic class BankAccountTest { class BankAccountTestCase(unittest.TestCase): Response: def setUp(self): self.account = BankAccount('John Doe', '123456789') ________________________________________________ def test_account_holder_name(self): self.assertEqual(self.account.holder_name, 'John Doe’) ________________________________________________ def test_account_number(self): self.assertEqual(self.account.account_number, '123456789’) ________________________________________________ 30 def test_deposit_funds(self): self.account.deposit_funds(1000) self.assertEqual(self.account.balance, 1000) ______________________________________________ def test_withdraw_funds(self): self.account.deposit_funds(1000) self.account.withdraw_funds(500) self.assertEqual(self.account.balance, 500)
  • 31. TREY research GeneratingUserGuideinmultiplelanguages 31 Consider a scenario wherein you wish to handover the code to the client along with code documentation. Assuming the client developers prefer the documentation in their native language. Such translations can be achieved by using GPT3 models. •Let us print the Summary of a simple “Hello World” Python program in English. And then instruct GPT3 model for a French version of the same. Intent: Generate User Guide Prompt: <Note: Appropriate code snippet is placed here. In our case, the HTML code for Payment Processing is placed here. > Create a user guide in Hindi and French based on this code: Response by Model : text--davinci-003 Hindi भुगतान प्रक्रियाकरण डीवी क े लिए एक आवश्यकता है क्रक आप भुगतान प्रक्रियाकरण कर सकते हैं। इस कोड का उपयोग करक े , आप एक भुगतान प्रक्रियाकरण पृष्ठ बना सकते हैं। पृष्ठ पर एक संग्रह है जो ननम्न वववरण शालिि है: • भुगतान ववधि: आप ि े डडट काडड, डीबीएच, इिेक्ट्रॉननक क ु क्रकज़, और अन्य िुद्राओं का उपयोग कर सकते हैं। • रालश: आप अपनी भुगतान रालश दजड कर सकते हैं। • भुगतान आवृवि: आप एक बार क े लिए, साप्ताहहक, िालसक या अन्य आवृवियों िें अपना भुगतान कर सकते हैं। • सबलिट बटन: आप अपनी भुगतान जिा करने क े लिए एक सबलिट बटन दजड कर सकते हैं। French Traitement des paiements Le Développement d'une nécessité pour vous de traiter les paiements. Avec ce code, vous pouvez créer une page de traitement des paiements. La page comprend une collection comprenant les détails suivants: • Mode de paiement: vous pouvez utiliser des cartes de crédit, des DBAs, des électroniques et d'autres devises. • Montant: Vous pouvez entrer votre montant de paiement. • Fréquence de paiement: Vous pouvez effectuer votre paiement à une seule fois, hebdomadaire, mensuel ou d'autres fréquences. • Bouton Envoyer: Vous pouvez entrer un bouton Envoyer pour effectuer votre paiement.
  • 32. TREY research TaketheAIFIRSTApproachforSDLCcourseonInfosysSpringboard 32 Infosys announces the launch of its AI-Training sessions on Infosys Springboard in June 2023. The topics are: Introduction to Artificial Intelligence, Introduction to Natural Language Processing, Introduction to Deep Learning and Generative AI - Tools and Techniques. Home | Infosys Springboard (onwingspan.com)