0% found this document useful (0 votes)
53 views48 pages

Module 1 Presentation

The document outlines a syllabus for a course on Generative AI, covering its definition, applications, and ethical considerations across various domains. It includes modules on prompt engineering, generative AI concepts, language models, case studies, and practical applications in fields like healthcare, business, and education. Additionally, it discusses the importance of generative AI, various modeling techniques, and the ethical challenges associated with its use.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views48 pages

Module 1 Presentation

The document outlines a syllabus for a course on Generative AI, covering its definition, applications, and ethical considerations across various domains. It includes modules on prompt engineering, generative AI concepts, language models, case studies, and practical applications in fields like healthcare, business, and education. Additionally, it discusses the importance of generative AI, various modeling techniques, and the ethical challenges associated with its use.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Generative AI

Course Code: 21CS4807


Course Instructors: Dr. Natarajan Venkateswaran,
Prof. Sasikala Nagarajan,
Prof. Arjun Krishnamurthy.

Academic Year: 2024–2025


Year -Semester : IV -VIII
Syllabus

Module – I : Introduction to Generative AI 06 Hours


Definition and scope of Generative AI, Hierarchy of Generative AI, Overview of
generative models and their applications, Importance of Generative AI in various
domains, Ethical considerations and challenges.

Module – II : Prompt Engineering 08 Hours


Understanding the concept and significance of prompt engineering, Principles of
Prompting, Strategies for designing effective prompts, Techniques for Prompt
Engineering (Template-based prompts, Rule-based prompts, and Fine-tuning prompts),
Best practices for prompt engineering in generative AI, Enhancing Model Outputs.
Syllabus (Contd)

Module – III : Generative AI Concepts 08 Hours


Encoder/decoder architectures as basis for Generative AI, the role of the latent space, Transformer
architectures and Attention, Conditional Generative Models, Introduction to GPT and its
significance, Architecture and working of GPT models.

Module – IV : Language Models and LLM Architectures 09 Hours


Introduction to language models and their role in AI, how do large language models work?
Difference Between Large Language Models and Generative AI and between Large Language
Models and Foundational Models, Examples of LLMs (Generative Pre-trained Transformer 3,
Bidirectional Encoder Representations from Transformers, Text-to-Text Transfer Transformer,
Robustly Optimized BERT Pretraining Approach), RAG methods, Leading language models and their
real-life applications.
Module – V : Case Studies 09 Hours
Case Study of Generative AI and Language Models: using ChatGPT3, BERT, T5, RoBERTa; SRGAN,
ESRGAN, Cycle GAN, StyleGAN, text-2-image, GAN in Computer Vision
Text Books:

1. Prompt Engineering for Generative AI, James Phoenix, Mike Taylor, O'Reilly Media, Inc. ISBN: 9781098153434, 2024.
2. Generative Deep Learning, 2nd Edition by David Foster, O'Reilly Media, Inc. ISBN: 9781098134181, 2023.
3. Artificial Intelligence, Elaine Rich and Knight, McGraw-Hill Publications, 2010.

Reference Books:
1. Artificial Intelligence: A modern Approach, Russell and Norvig, Printice Hall, 2010.
2. Introduction To Artificial Intelligence & Expert Systems, Patterson, PHI.
3. Multi Agent systems- a modern approach to Distributed Artificial intelligence, Weiss. G, MIT Press.
4. Artificial Intelligence: A modern Approach, Russell and Norvig, Printice Hall.

E-Resources:
• https://www.mygreatlearning.com/blog/basics-of-building-an-artificial-intelligence-chatbot/
• https://www.datacamp.com/blog/what-is-prompt-engineering-the-future-of-ai-communication
• https://www.promptengineering4u.com/learning/techniques/template-based-prompting#h.2n56pv37pv0c
• https://www.promptingguide.ai/research/rag
CIA Components
Mark Distribution - Courses
Course subject
(100 Marks)

CIA SEE
(60 Marks) (40 Marks)

Criteria Weightage of Marks Exam Total Converted


MSE – I 20
CIA 60 60
MSE – II 20
SEE 100 40
Assignment 10

Case Study (Unit 5) Seminar 10

Total 60 marks Passing mark = CIA + SEE = 40


Module 1: Introduction to Generative AI
Generative Artificial Intelligence (GenAI) is a type of AI
that generates images, text, videos, and other media in
response to inputted prompts. Typically trained on vast
datasets and use advanced algorithms to create
outputs that can mimic human creativity.
Create new content (audio, code, text, images, video)
Some examples of GenAI include “ChatGPT”, “Bard”,
“Gemini”, “DeepSeek R1” and “DALL-E3”.
Generative AI Output

Sora (Open AI): Historical video of California during the gold rush
Generative AI - Definitions
Explained: Generative AI | MIT News | Massachusetts Institute of Technology
Generative AI can be thought of as a machine-learning model that is trained to create new data, rather
than making a prediction about a specific dataset. A generative AI system is one that learns to generate
more objects that look like the data it was trained on.

Foster, David. Generative Deep Learning: Teaching Machines To Paint, Write, Compose, and Play (p. 28). O'Reilly Media.
Generative modeling is a branch of machine learning that involves training a model to produce new data
that is similar to a given dataset.

GenAI FAQs | University IT


Generative AI, or GenAI, refers to a subset of AI that uses prompts to analyze data, detect patterns,
and then create new or original content, like text, images, or even computer code.
Generative Modeling (Pictures of Horses)

Foster, David. Generative Deep Learning: Teaching Machines To Paint, Write, Compose, and Play. O'Reilly Media.
Generative vs Discriminative Modeling
Discriminative Modeling (Paintings)
Generative vs Discriminative Modeling

Discriminative modeling estimates


p(y|x) — the probability of a label y given observation x.

Generative modeling estimates


p(x) —the probability of
observing observation x. If the
dataset is labeled, we can also
build a generative model that
estimates the distribution p(x|y).
Generative Modeling – Hello World!

I have shown some data above. A set of 8 points. What is the rule that generated the
above data ?

I have shown some data above. A set of 7 points. What is the rule that generated the
above data ?
Generative Modeling – Hello World!
Set of Points: X generated by a rule: pdata

New points

How to incorporate three additional points into this, ensuring it adheres to the same rule: pdata?
Generative Modeling – Hello World!
Set of Points: X generated by a rule: pdata

pmodel

How to incorporate three additional points into this, ensuring it adheres to the same rule: pdata?
Generative Modeling – Hello World!

We do not know the underlying distribution: pdata just as it was in this case. Our best estimate is pmodel
Generative Modeling - Framework
• We possess a dataset of observations X.
• These observations are believed to come from an unknown
distribution, pdata.
• A generative model, pmodel, aims to replicate pdata. If successful, we
can sample from pmodel to create observations similar to those from
pdata.
• We find pmodel impressive if:
• —Rule 1: It generates examples resembling those from pdata.
• —Rule 2: It produces examples that differ from those in X,
avoiding mere repetition of seen data.
Generative AI - Scope
• Content generation: Writing, visuals, music, videos,
programming, 3D designs

• Data enhancement: Creating synthetic data to train various


AI models

• Solution development: Discovering new drugs, designing


materials, and optimization tasks
Generative AI - Scope
Gen.AI Importance in various domains
Generative AI has the potential to revolutionize many fields, including medicine, science,
engineering, humanities, and the social sciences.
• In medicine, generative AI can be used to create synthetic patients for clinical trials, to help
doctors diagnose diseases, and to generate patient education materials.
• In science, generative AI can be used to explore the space of possible protein structures
and to perform large-scale fluid mechanical simulations.
• In engineering, generative AI can be used to design new tools that augment human
capabilities. New coding tools can augment software development and engineering.
• In the humanities, generative AI can be used to create new forms of art and literature.
• In the social sciences, generative AI can be used to study the impact of AI on society.
Generative AI: Perspectives from Stanford HAI, March 2023
Modeling of Probability Distributions

Sample space Set of all map points, X

Probability density function p(x), x is a random variable

Parametric Model: Family of density functions given by pϴ(x), where ϴ is parameters set
certain parameters, ϴ

Likelihood. Log of Likelihood.

Maximum Likelihood Estimation


Generative Models
Explicit Density Implicit Density
• Approximate Density • Generative Adversarial
• Variational Auto encoders Networks
• Energy based Models
• Diffusion Models
• Tractable Density
• Autoregressive Models
• Normalizing Flow Models

Generative AI: Perspectives from Stanford HAI, March 2023


Variational Auto Encoders
Variational Autoencoders (VAEs) are generative models in machine
learning. They learn the probabilistic distribution of input data to create
new, similar samples.

Encoder and Decoder:


Encoder: Compresses input data into a lower-dimensional latent
space. Representation Learning
Decoder: Reconstructs the input from this latent representation.

Latent Space:
A compressed version of input data, where VAEs impose a Gaussian
distribution to ensure smooth interpolation between points.
Variational Auto Encoders - Applications

• Image Generation: Producing new images similar to a


dataset.
• Data Imputation: Completing missing data values.
• Anomaly Detection: Spotting outliers through reconstruction
errors.
Energy based models
Energy-Based Models (EBMs) are probabilistic models in machine learning
that assign a scalar energy to each variable configuration, making them
effective for high-dimensional data tasks

• Energy Function: This assigns a scalar energy to each configuration,


with lower values indicating more favorable outcomes.

• Learning: The objective is to develop an energy function that has lower


energy for observed data configurations and higher for others,
optimizing parameters to reduce energy for these data points.

• Inference: This process involves identifying configurations with the


lowest energy, representing the most likely outcomes.
Energy based models - Applications
• Image Recognition: Associating energy with different
image classes to classify images.

• Natural Language Processing: Assigning energy to


sequences of words to model language.

• Denoising and Reconstruction: Reducing noise or


reconstructing missing parts of data.
• Image Denoising: An EBM can denoise images by defining an energy
function that measures the difference between noisy and clean images,
training to minimize this energy for training pairs.
Diffusion models
Diffusion models are generative models recognized for producing
high-quality data, particularly images, due to their strong theoretical
basis and performance across tasks.

• Forward Diffusion Process: Noise is gradually added to data, akin to a


"blurring" effect.
• Reverse Diffusion Process: This core aspect involves learning to
denoise data step by step.

• Training: The model learns to predict clean data from noisy inputs,
minimizing prediction errors.
• Generation: Starting with random noise, the model applies the reverse
process to create new data samples.
Diffusion models - Applications

• Image Generation: Creating realistic images from


noise.
• Super-Resolution: Enhancing the resolution of
low-resolution images.
• Data Imputation: Filling in missing values in data.
Autoregressive models

A family of models that treats the problem as a sequential process.


Autoregressive models condition predictions on previous values in the
sequence, rather than on a latent random variable. Therefore, they
attempt to explicitly model the data-generating distribution.
Autoregressive models - Applications

Economics: Modeling and forecasting economic indicators like GDP,


inflation, and stock prices.

Meteorology: Forecasting weather conditions.

Signal Processing: Analyzing and predicting audio signals.


Normalizing Flow models

Normalized Flow models are generative models that apply invertible


transformations to convert simple probability distributions into
complex ones. They excel in managing high-dimensional data,
generating high-quality samples, and conducting efficient density
estimation.
Normalizing Flow models - Applications

• Density Estimation: Estimating the probability density


of high-dimensional data.
• Image Generation: Generating high-quality images
from a learned distribution.
• Anomaly Detection: Identifying outliers by examining
the likelihood of data under the learned distribution.
Generative Adversarial Networks
Generative Adversarial Networks (GANs) are deep learning models
aimed at producing realistic data. They feature two neural
networks—the generator and the discriminator—that are trained
together within a game-theoretic framework.
Generator: The generator network creates data samples from random noise, aiming
to produce data that resembles real data.

Discriminator: The discriminator network receives data and attempts to tell apart
real data from that generated by the generator, aiming for accurate classification.

Adversarial Training: Both networks are trained competitively; the generator seeks
to deceive the discriminator, while the discriminator works to accurately identify real
versus generated data, resulting in a minimax game where the generator reduces the
discriminator's effectiveness, and the discriminator enhances its detection skills.
Generative Adversarial Networks - Applications

• Image Generation: Creating realistic images from random


noise.
• Image-to-Image Translation: Converting images from one
domain to another (e.g., turning sketches into photos).
• Super-Resolution: Enhancing the resolution of
low-resolution images.
• Data Augmentation: Generating additional training data
for machine learning models.
Generative AI in Healthcare
• Drug discovery: Accelerating the
development of new drugs and therapies
• Personalized medicine: Tailoring
treatments to individual patients
• Medical imaging: Enhancing image
analysis and diagnosis
Generative AI in Art and Creativity
New forms of artistic expression: Generating
unique artwork, music, and literature.

• Design assistance: Aiding designers in


creating innovative products and
experiences
• Creative tools: Empowering artists with
AI-powered tools
Generative AI in Business
• Content creation: Generating marketing
materials, product descriptions, and social
media content
• Customer service: Powering AI chatbots
for improved customer interactions
• Market research: Analyzing trends and
generating insights
Generative AI in Technology
• Code generation: Automating code
writing and software development
• Software testing: Generating test
cases and improving software
quality
• Data synthesis: Creating synthetic
data for training AI models
Generative AI in Education
• Personalized learning: Creating
customized learning materials and
experiences
• Content creation: Generating educational
content, quizzes, and assessments
• Automated feedback: Providing students
with instant feedback on their work
Generative AI in Entertainment
• Video game development: Creating
realistic game environments and
characters
• Film and animation: Generating
special effects and animation
sequences
• Music production: Composing new
music and sound effects
Generative AI in Fashion

• Design generation: Creating new clothing designs


and styles
• Virtual try-on: Allowing customers to try on
clothes virtually
• Trend forecasting: Predicting future fashion
trends
Generative AI in Architecture
• Building design: Generating innovative
building designs and floor plans
• Urban planning: Optimizing city layouts
and infrastructure
• Sustainable design: Creating
energy-efficient and environmentally
friendly buildings
Generative AI for Accessibility
• Assistive technologies: Developing tools for people with
disabilities
• Content generation: Creating alternative formats for content
(e.g., audio descriptions)
• Language translation: Breaking down language barriers
Generative AI for Productivity
• Automation of tasks: Discuss the potential for
job displacement and the need for reskilling
• New job creation: Highlight the emergence of
new roles in AI development and
management
• Changing skillsets: Emphasize the importance
of adaptability and continuous learning
Ethical Considerations & Challenges
Generative AI can be used to generate synthetic media, such as images, videos, and audio.
Such AI generated content can be difficult or impossible to distinguish from real media,
posing serious ethical implications. Such media may spread misinformation, manipulate
public opinion, or even harass or defame individuals.

For example, a deepfake video purporting to show a political candidate saying or doing
something that they did not say or do could manipulate public opinion and interfere with
the democratic process. The video below is a dramatic example featuring Barack Obama1.

Biased AI algorithms may lead to discrimination of minority groups. For


instance, Amazon shut down its AI recruiting tool after using it for one year.1 Developers in
Amazon state that the tool was penalizing women. About 60% of the candidates the AI
tool chose were male, which was due to patterns in data on Amazon’s historical
recruitments2.

1. Generative AI Ethics in 2025: Top 6 Concerns


2. Top 12 AI Ethics Dilemmas: Real-life examples & Tips to mitigate
Ethical Considerations & Challenges
A recent study examined participants' ability to identify AI-generated content versus human-written
text. The findings revealed that individuals struggled to differentiate between the two, showcasing
how these models can disseminate misinformation effectively.

An extraordinary instance of this occurred in a US court, where a lawyer cited a fictitious legal case
based on a response from ChatGPT.

Generative AI models are trained on vast amounts of data, which can inadvertently violate
copyrights and intellectual property rights. This raises potential legal, reputational, and financial risks
for companies using these models, affecting creators and copyright holders negatively.

3. https://www.theverge.com/2023/6/28/23775311/gpt-3-ai-language-models-twitter-disinformation-study
4. ChatGPT: US lawyer admits using AI for case research
5. New York Times Sues OpenAI and Microsoft Over Use of Copyrighted Work - The New York Times
Ethical Considerations & Challenges
• Bias and Fairness
• Misinformation and Deepfakes
• Job Displacement
• Intellectual Property
• Explainability and Transparency
• Environmental Impact
• Regulation and Governance
End of Module 1

You might also like