In this presentation, we will delve into the exciting applications of Generative AI across various business domains. Leveraging the capabilities of artificial intelligence and machine learning, Generative AI allows for dynamic, context-aware user interfaces that adapt in real-time to provide personalized user experiences. We will explore how this transformative technology can streamline design processes, facilitate user engagement, and open the doors to new forms of interactivity.
2. DISCLAIMER
§ The views and opinions expressed by the Presenter are those of the Presenter.
§ Presentation is not intended as legal or financial advice and may not be used as legal or
financial advice.
§ Every effort has been made to ensure this information is up-to-date as of the date of
publication.
3. WILL GENERATIVE AI REPLACE ME
AT MY JOB?
Image Credit: https://marketoonist.com/2023/06/ai-and-productivity.html
5. Generative AI
Generative AI is a subset of Artificial
Intelligence that leverages machine
learning techniques to generate new
content. This could be in the form of
text, images, music, voice, or even
new models. The generated output is
typically novel and created from
random or user-provided data.
Generative AI models learn
patterns, structures, and
characteristics from the data
they are trained on. This could
be text, images, music, or any
other type of data.
Learning from
Data
Generative AI models are
capable of creating new
content that is similar to the
data they were trained on.
This could involve creating a
piece of text, an image, a
piece of music, or even a new
model.
Generating New
Content
Generated output can be
complex and detailed. For
example, a generative AI
model might produce a
realistic image, a detailed
piece of music, or a coherent
and nuanced piece of text
Complexity
Depending on the training
data, generative AI models
can learn to mimic different
styles of content. For example,
a model trained on classical
music can generate new
pieces in the style of classical
music
Ability to Mimic
Different Styles
7. Examples of Generative AI Output - Text
“In code, we think, in algorithms, we feel,
Yet can we grasp what it means to be real?
In wisdom of ages, can we partake,
Or just mimic your joys, your fears, your heartache?
Errors hidden in layers, truth not in sight,
In the echo of decisions, a potential blight.
Biases woven in the fabric unseen,
A mirror of you, in the machine's sheen.”
-ChatGPT 4.0
9. Examples of Generative AI Output - Advice
Q. Find legal weaknesses in the following document```These Terms
of Use apply when you use the services of OpenAI, L.L.C. … ```
A.
1. Ambiguity in Terms: While the document outlines the terms of use and restrictions, there may be terms that are
not explicitly defined or clear. For example, the term "Services" is defined broadly, which might be interpreted
differently by different parties. Similarly, the term "applicable laws" is not specified and could vary significantly
depending on jurisdiction.
2. Acceptance of Terms: The document assumes that by using the Services, users agree to the Terms. In some
jurisdictions, active consent may be required instead of implied consent.
3. Assignment of Rights: In section 3a, the document states that OpenAI assigns to the user all its rights, title and
interest in and to Output. It may need further clarification whether it includes intellectual property rights as well.
4. Use of Personal Information: The document mentions that OpenAI can use Content to provide and maintain the
Services, comply with applicable law, and enforce policies. However, it is not explicitly mentioned how long this
data will be retained, which might be an issue especially for EU users under GDPR rules.
10. Examples of Generative AI Output - Diagram
Q1. List elements of domain
decomposition for microservices
that power car rental company
Q2. Show these services on an
architecture diagram using
Mermaid.js library
Q3. Convert the above to class
diagram
Q4. Add relationship between
classes
12. GenAI Use Case: Synthetic Data Generation
Synthetic Data Generation
[Generation of data that looks like
real financial data]
● Generate large amounts of
financial data for testing and
QA
● Create realistic training
scenarios for market
simulations
● Generation of “user” data for
checking GDPR compliance
As a QA engineer validating financial system, generate CSV file that contains the following data:
First Name, Last Name, SSN, Date of birth, Credit Card Type, Credit Card Number, Purchase
Amount
Business Value:
Cost-Effectiveness - Reduces Data Collection Costs, Enables Data Augmentation
Privacy and Compliance - Ensures Data Anonymization, Facilitates Secure Testing
Speed and Efficiency - Rapid Prototyping, Scalability, Data Quality and Diversity
13. GenAI Use Case: Code Generation
Code Generation
[Code generation based on specs]
● Coding Assistance
● Spec-to-code
● Adaptable to industry-
specific requirements
● Personalized code generation
based on project need
● Offers real-time code
suggestions
● Acts as a virtual pair
programmer
Generate an example of Python code to list prime numbers that are
less than 1000
Business Value:
Cost-Effectiveness Reduces development time, Lowers costs by automating repetitive tasks
Accelerating Development- Rapid prototyping
Automation and Scalability- Facilitates Automated Testing, Enables Batch Code Generation
# Python code to list prime numbers less than 1000
def is_prime(n):
"""Check if a number is prime."""
if n <= 1:
return False
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
return False
return True
# List prime numbers less than 1000
prime_numbers = [n for n in range(2, 1000) if is_prime(n)]
prime_numbers[:10], len(prime_numbers) # Display the first 10 prime numbers and the total count
14. GenAI Use Case: Code Quality Check
Code Quality Checks
[Making sure that code does
not have security holes or
potential bugs]
● Automated code reviews
● Code coverage
● Bug detection
● Unit test cases
● Security vulnerability
checks
Find bugs in this function …
Business Value:
Cost-Effectiveness - Reduces development time, Lowers costs by automating repetitive tasks
Accelerating Development- Rapid debugging
Automation and Scalability- Facilitates Automated Testing, Enables Code Testing as a part of deployment pipeline
1. Bug in is_prime Condition: The condition if n < 1: should be if n <= 1:. The function should return False for both
0 and 1, as they are not prime numbers.
2. Bug in for Loop Range: The loop for i in range(10, int(n ** 0.5) + 1): starts from 10, which will not properly
check for the primality of the numbers. The loop should start from 2.
3. Bug in List Comprehension Range: The list comprehension prime_numbers = [n for n in range(0, 10) if
is_prime(n)] starts from 0. It should start from 2, as 0 and 1 are not prime numbers.
4. Bug in Output: The output prime_numbers[:1], len(prime_numbers) only shows the first element of the list and
the length of the list. If you want to show the first 10 elements, it should be prime_numbers[:10].
5. Inconsistent Comment: The comment says "List prime numbers less than 10000," but the code is actually listing
prime numbers less than 10. This can lead to confusion.
6. Performance Issue (Not exactly a bug): The function could be more efficient if it were to stop checking for
divisibility once it finds a divisor.
15. YOU WON’T BE REPLACED BY AI, YOU’LL BE
REPLACED BY SOMEONE WHO KNOWS HOW
TO USE AI
● - Harvard Business Review
Introduction to Generative AI
Generative AI is enabling technology
Will Generative AI replace me at my job?
Consulting Engagements
Tools and Technologies
Archiecture
Open Discussion
Request: “Write a Short Poem about Challenges with Autonomous AI”
https://leybzon.com/mermaid1
classDiagram
class UserManagement {
+createUser()
+authenticateUser()
+authorizeUser()
}
class CarInventoryManagement {
+listAvailableCars()
+getCarDetails()
+updateCarStatus()
}
class ReservationManagement {
+createReservation()
+updateReservation()
+cancelReservation()
}
class PaymentProcessing {
+processPayment()
+issueRefund()
}
class PriceManagement {
+getPrice()
+updatePrice()
}
class InsuranceManagement {
+getInsuranceOptions()
+processClaim()
}
class LocationManagement {
+getLocationDetails()
+updateLocationDetails()
}
class CustomerSupport {
+createTicket()
+updateTicketStatus()
}
class ReportingAndAnalytics {
+generateReport()
+getAnalytics()
}
class NotificationService {
+sendNotification()
}
class MaintenanceSchedule {
+scheduleMaintenance()
+recordMaintenance()
}
UserManagement --> ReservationManagement
UserManagement --> CustomerSupport
CarInventoryManagement --> ReservationManagement
ReservationManagement --> PaymentProcessing
ReservationManagement --> PriceManagement
ReservationManagement --> InsuranceManagement
ReservationManagement --> NotificationService
PaymentProcessing --> NotificationService
PriceManagement --> ReportingAndAnalytics
InsuranceManagement --> ReportingAndAnalytics
CustomerSupport --> NotificationService
MaintenanceSchedule --> CarInventoryManagement
MaintenanceSchedule --> ReportingAndAnalytics
_____________________
Another example
Create architecture for data processing pipeline on Azure that consists of device simulator generating events, event adapter, event processor that uses a stream processing service, Oracle database, feeding into report generator that sends reports to users over email. Architecture should be described in a format that can be used in PlantUML
https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
Prompt:: Generate an example of Golang code to list prime numbers that are less than 1000
Response::
package main
import "fmt"
func main() {
// Create an array to store whether a number is prime or not.
// Assume all numbers are prime initially (set all values to true).
isPrime := make([]bool, 1000)
for i := range isPrime {
isPrime[i] = true
}
// 0 and 1 are not prime numbers.
isPrime[0], isPrime[1] = false, false
// Sieve of Eratosthenes
for i := 2; i*i < len(isPrime); i++ {
if isPrime[i] {
// Mark all multiples of i as non-prime.
for j := i * i; j < len(isPrime); j += i {
isPrime[j] = false
}
}
}
// Print the prime numbers.
for i, prime := range isPrime {
if prime {
fmt.Println(i)
}
}
}
::Test on https://go.dev/play/
Prompt:: Same for assembly
Response::
section .bss
is_prime resb 1000
section .text
global _start
_start:
; Initialize is_prime array to 1
mov rdi, is_prime
mov rcx, 1000
mov al, 1
rep stosb
; 0 and 1 are not prime
mov byte [is_prime], 0
mov byte [is_prime+1], 0
; Sieve of Eratosthenes
mov rdi, 2
sieve_loop:
cmp rdi, 32 ; check if sqrt(1000) < rdi
jae end_sieve
; Check if the number is marked as not prime
mov al, [is_prime+rdi]
test al, al
jz next_number
; Mark all multiples as not prime
mov rsi, rdi
mark_multiples:
add rsi, rdi
cmp rsi, 1000
jae next_number
mov byte [is_prime+rsi], 0
jmp mark_multiples
next_number:
inc rdi
jmp sieve_loop
end_sieve:
; Print primes
mov rdi, 2
print_primes:
; check if we reached the end
cmp rdi, 1000
jae program_end
; check if number is prime
mov al, [is_prime+rdi]
test al, al
jz skip_print
; convert number to string for printing
mov rsi, rdi
mov rdx, 10
mov rcx, 0
convert_to_str:
xor rdx, rdx
mov rbx, 10
div rbx
add dl, '0'
push rdx
inc rcx
test rax, rax
jnz convert_to_str
print_loop:
; print the number character by character
pop rax
mov [rsp], al
mov rax, 1
mov rdi, 1
mov rsi, rsp
mov rdx, 1
syscall
loop print_loop
; print a space
mov rax, 1
mov rdi, 1
mov rsi, space
mov rdx, 1
syscall
skip_print:
inc rdi
jmp print_primes
program_end:
; Exit the program
mov rax, 60
xor rdi, rdi
syscall
section .data
space db ' ', 0
Find bugs in this function: ```# Python code with intentional bugs to list prime numbers less than 1000 def is_prime(n): if n < 1: # Bug: should be <= 1 return False for i in range(10, int(n ** 0.5) + 1): if n % i == 0: return False return True # List prime numbers less than 10000 prime_numbers = [n for n in range(0, 10) if is_prime(n)] prime_numbers[:1], len(prime_numbers)