Skip to content
← Generative AI

Practice questions

The full practice set, 72 questions — each with a full worked answer: derivations, diagrams, and examples.

Q01

Generative AI mechanism for medical image synthesis

Explain the fundamental mechanism of Generative AI. Discuss its characteristics and suitability for generating synthetic medical images to augment a small training dataset. Explain the different types of generative models and their advantages.

Q02

Four generative model types with real-world applications

Discuss any four major types of Generative AI models and provide one real-world application for each.

Q03

Generative AI use cases across six industries

Explain the major use cases of Generative AI in healthcare, education, entertainment, marketing, software development, and content creation. Give a suitable example for each use case and highlight two major challenges associated with its adoption.

Q04

Joint vs conditional probability with applications

Explain the fundamental difference between joint probability and conditional probability with a suitable example. Mention two applications of each type of probabilistic model.

Q05

Generative vs discriminative models comparison table

Compare Generative and Discriminative Models based on learning objective, probability distribution, training process, decision boundary, data requirements, and applications. Give suitable algorithm examples.

Q06

Mathematical foundations of generative vs discriminative learning

Explain the mathematical foundations of Generative and Discriminative learning. Discuss how a generative model learns the joint distribution P(x,y), while a discriminative model learns the conditional distribution P(y|x) directly. Illustrate the difference using a suitable classification example.

Q07

Bayes' theorem derivation and full generative-discriminative comparison

Explain Generative and Discriminative learning paradigms in detail. Derive the relationship between P(x,y), P(x|y), P(y), and P(y|x) using Bayes' theorem. Compare their mathematical formulation, model training, decision boundaries, computational complexity, advantages, limitations, and real-world applications.

Q08

Naive Bayes vs logistic regression on binary classification

Consider a binary classification problem involving two classes. Explain how a Generative Model and a Discriminative Model approach the same problem differently. Compare their assumptions, training procedures, decision-making processes, advantages, and limitations using Naïve Bayes and Logistic Regression.

Q09

Designing a multi-class image classifier: generative vs discriminative

A dataset contains images belonging to multiple classes. Design an AI-based classification system using both Generative and Discriminative approaches, such as Naïve Bayes or Gaussian Mixture Models and Logistic Regression, SVM, or Neural Networks. Compare probability estimation, decision boundaries, handling of unseen data, training requirements, and expected performance. Justify your choice for a practical classification system.

Q10

Autoencoder vs variational autoencoder differences

Differentiate between a standard Autoencoder and a Variational Autoencoder with respect to architecture, latent representation, training objective, and generated output. Why is a VAE more suitable for generative tasks?

Q11

VAE components and ELBO loss derivation

Explain the roles of the encoder, latent space, reparameterization trick, and decoder in a VAE. Derive and explain the two major components of its loss function and discuss why both reconstruction loss and KL-divergence are required.

Q12

KL-divergence term and latent space regularization in VAE

Explain the KL-divergence term in the VAE loss function. Why is it required, and how does it help regularize the latent space?

Q13

Reparameterization trick for VAE backpropagation

Explain the reparameterization trick used in Variational Autoencoders. Why is it required for backpropagation through the stochastic latent variable? Derive the mathematical expression for sampling the latent vector and explain its significance in VAE training.

Q14

VAE architecture, ELBO derivation, and training losses

Explain the architecture and working principle of a VAE in detail. Derive the Evidence Lower Bound (ELBO) and explain how reconstruction loss and KL-divergence loss contribute to model training. Illustrate the complete process with a suitable diagram.

Q15

Critical analysis of VAE generation, ELBO, and limitations

Critically analyze VAE-based generation. Explain how a VAE learns a latent probability distribution, derive the ELBO, discuss the role of KL-divergence and the assumptions made by the model, and analyze at least three limitations compared with other generative approaches.

Q16

Designing a VAE pipeline for synthetic image generation

Design a complete VAE-based solution for generating realistic synthetic images. Explain the encoder, latent-space representation, reparameterization trick, decoder, reconstruction process, and complete loss function. Describe how to evaluate whether generated images are useful for data augmentation.

Q17

Deriving the ELBO: posterior, prior, likelihood and KL

Derive the Evidence Lower Bound (ELBO) used for training a VAE. Explain the approximate posterior q(z|x), the prior distribution p(z), reconstruction likelihood, and KL-divergence, and show how maximizing ELBO supports generative modelling.

Q18

VAE-based augmentation pipeline for a small image dataset

Design a Generative AI solution in which a VAE is used to augment a small image dataset. Explain model training, latent sampling, synthetic-image generation, quality filtering, and how a downstream classifier can be used to evaluate the usefulness of the generated samples.

Q19

GAN minimax game: Generator vs Discriminator

Discuss the working principle of Generative Adversarial Networks. Illustrate the minimax game between the Generator and Discriminator with a suitable diagram and explain the objective function.

Q20

Adversarial learning: how G and D interact in a GAN

Explain the basic concept of adversarial learning in GANs. Describe how a Generator transforms latent noise into synthetic samples and how a Discriminator evaluates real and generated samples. Illustrate the overall workflow with a suitable diagram.

Q21

The adversarial training loop and how G improves over time

Describe the adversarial training process in GANs. Explain how the Generator gradually learns to generate realistic samples through feedback from the Discriminator.

Q22

GAN architecture: forward/backward passes and the role of z

Explain the architecture of a GAN and how the Generator and Discriminator interact during training. Illustrate the forward and backward passes and discuss the significance of the latent-space input to the Generator.

Q23

Vanilla GAN architecture and information flow

Discuss the architecture of a vanilla GAN in detail. Explain the Generator and Discriminator networks, their information flow, and the objective function associated with the architecture.

Q24

Minimax optimization and alternating parameter updates in GANs

Analyze the minimax optimization process used in GAN training. Write the original GAN value function and explain how the Generator and Discriminator update their parameters alternately during adversarial training.

Q25

GAN Generator and Discriminator architecture

Explain the architectural design of the Generator and Discriminator in a GAN. Illustrate their input and output layers, activation functions, and information flow during one training iteration.

Q26

Standard GAN loss functions for G and D

Explain the standard loss functions used in GANs, including Generator loss and Discriminator loss. Discuss how these loss functions contribute to the adversarial training process.

Q27

Comparing GAN loss variants and gradient quality

Compare the standard Discriminator loss, saturating Generator loss, and non-saturating Generator loss in GANs. Explain how these objectives influence gradient quality and training stability.

Q28

Three major GAN training challenges

Discuss any three major training challenges in GANs. Explain mode collapse, vanishing gradients, and training instability, and discuss how loss-function modifications can improve training.

Q29

Diagnosing mode collapse in a digit GAN

A GAN trained on handwritten digits generates only a small subset of digit styles while the Discriminator becomes highly confident. Identify the training problem, explain its causes, and recommend practical techniques to improve sample diversity.

Q30

GAN objective comparison for synthetic MRI generation

A healthcare AI company is training a GAN to generate synthetic MRI scans but observes mode collapse, unstable loss curves, artifacts, and insufficient fine details. Diagnose the problems and compare standard GAN, Least-Squares GAN, and Wasserstein-based objectives for improving stability and medical-image quality.

Q31

DCGAN architecture vs vanilla GAN

Explain the architecture of a Deep Convolutional GAN (DCGAN) and distinguish it from a fully connected vanilla GAN. Discuss convolution and transposed-convolution layers, normalization, activation functions, and architectural guidelines for stable image generation.

Q32

Conditional GAN architecture and conditioning effect

Explain the architecture and working principle of a Conditional GAN (cGAN). How does conditioning information influence generation compared with a conventional GAN?

Q33

Class-conditioned digit generation with cGAN

Explain how class labels can be incorporated into both the Generator and Discriminator of a cGAN. Illustrate the process using class-controlled handwritten-digit generation.

Q34

Conventional GAN vs Conditional GAN comparison

Compare conventional GANs and Conditional GANs in terms of architecture, input representation, training objective, and control over generated samples. Explain with a suitable application scenario.

Q35

cGAN objective and conditioning-injection methods

Formulate the conditional adversarial objective of a cGAN. Explain different methods for injecting conditioning information into the Generator and Discriminator, and discuss two real-world applications where controlled generation is important.

Q36

Complete cGAN architecture and training process

Describe the complete architecture and training process of a Conditional GAN in detail. Explain how conditioning information is provided to both networks, formulate the conditional adversarial objective, and discuss the advantages and limitations of controlled generation.

Q37

StyleGAN's core idea vs traditional GANs

Explain the key architectural idea behind StyleGAN and describe how it differs from the traditional GAN architecture.

Q38

Mapping network, W space, and style modulation

What is style-based generation in StyleGAN? Explain the mapping network, intermediate latent space, and style modulation. Discuss how coarse, middle-level, and fine image attributes can be controlled.

Q39

StyleGAN improvements: style control, quality, diversity

Explain the major improvements introduced by StyleGAN over traditional GAN architectures. Discuss style-based control, progressive control of image features, image quality, and diversity.

Q40

From traditional GANs to StyleGAN: architecture trace

Trace the major architectural improvements from traditional GANs to StyleGAN. Discuss the mapping network, style injection, stochastic variation, and multi-scale control of visual features, and explain how they improve image quality and diversity.

Q41

Traditional GANs vs modern variants: stability and control

Compare traditional GANs with modern GAN variants such as StyleGAN. Explain how architectural improvements address training instability, image quality, and control over generated content.

Q42

Virtual fashion studio with StyleGAN attribute control

A fashion company wants to build a virtual studio that can independently control facial appearance, hairstyle, pose, clothing texture, background, and fine visual details. Design a StyleGAN-based approach and explain style levels, style mixing, and attribute control.

Q43

Synthetic faces: StyleGAN latent manipulation vs traditional GANs

A research organization wants to generate realistic synthetic human faces and modify characteristics such as age, hairstyle, facial structure, pose, and image details. Compare traditional GANs with StyleGAN and explain how latent-space manipulation supports controlled generation.

Q44

GAN image-to-image translation for product photos

An online shopping platform wants to generate different product images by changing the background, style, or appearance of existing products. Explain how GAN-based image-to-image translation can be used, with a suitable example and architecture.

Q45

Colorizing photos with a GAN-based pix2pix approach

A company wants to convert black-and-white photographs into realistic colored photographs. Explain how a GAN-based image-to-image translation approach can solve this task. Describe the Generator, Discriminator, training process, and expected transformation with a suitable diagram.

Q46

Diffusion models: forward noising and reverse denoising

Explain the basic idea of a diffusion model. Describe the forward diffusion and reverse denoising processes used for generating data.

Q47

Gaussian noise's role in DDPM training and sampling

What is the role of Gaussian noise in a Denoising Diffusion Probabilistic Model (DDPM)? Explain how a model learns to generate clean samples from noisy data.

Q48

DDPM forward diffusion: a worked 3-step example

In a DDPM, the forward diffusion process is x_t = sqrt(alpha_bar_t) * x_0 + sqrt(1 - alpha_bar_t) * epsilon. The question's original source gave specific numeric values for beta_1, beta_2, beta_3 (a 3-step toy noise schedule) that were lost in copy-paste — they did NOT survive into this text. (a) Calculate alpha_t and alpha_bar_t at each step. (b) Calculate the noisy sample x_t. (c) Find the separate contributions of the original sample and noise. (d) Explain how these contributions change as the timestep increases.

Q49

DDPM noise schedule: alpha-bar and signal-to-noise decay

A DDPM uses a noise schedule beta_1, beta_2, beta_3 over 3 timesteps. The question's original source gave specific numeric values that were lost in copy-paste — they did NOT survive into this text. Given a toy schedule, calculate alpha_t, the cumulative products alpha_bar_t, and sqrt(alpha_bar_t)/sqrt(1-alpha_bar_t). Analyze how the signal and noise contributions change across the diffusion steps.

Q50

Diffusion vs GAN for synthetic medical image generation

A medical AI research team has a limited dataset and wants to generate synthetic medical images using DDPM or Stable Diffusion. Explain the forward and reverse diffusion processes, noise prediction during training, and compare diffusion-based generation with GAN-based generation. Evaluate the benefits, challenges, and privacy risks.

Q51

Stable Diffusion's text-to-image pipeline end to end

An e-commerce company wants to generate product images from natural-language descriptions using Stable Diffusion. Explain the complete text-to-image pipeline, including the text encoder, latent representation, noise addition, U-Net-based denoising, conditioning mechanism, and decoder. Discuss advantages and limitations.

Q52

GAN design for synthetic diseased-leaf images

A smart agriculture company wants to generate realistic images of diseased plant leaves because collecting diseased-leaf images is difficult and expensive. Design a GAN-based solution and explain the Generator, Discriminator, adversarial training, objective function, and synthetic-image augmentation workflow.

Q53

GAN design for synthetic network-flow traffic data

A cybersecurity firm wants to generate realistic synthetic network-flow records containing numerical and categorical attributes. Design a GAN suitable for tabular or sequential traffic data. Explain data representation, Generator output design, Discriminator structure, training, evaluation metrics, and possible architectural improvements.

Q54

GAN architecture for synthetic satellite imagery

A research group wants to generate synthetic satellite images for environmental monitoring. Explain the architecture of a suitable GAN with a labelled diagram showing the Generator, Discriminator, real-data path, and fake-data path. Discuss training dynamics and the value function.

Q55

Full Transformer architecture: encoder, decoder, attention

Explain the architecture of the Transformer model. Describe the encoder, decoder, self-attention, feed-forward networks, residual connections, and layer normalization.

Q56

Positional encoding: derivation and role in Transformers

Analyze the role of positional encoding in Transformer-based Generative AI models. Derive the sinusoidal positional encoding expressions and explain how position information is combined with token embeddings.

Q57

Worked numeric example of single-head self-attention

Using a small numerical example, demonstrate single-head scaled dot-product self-attention. Compute the Query, Key, and Value matrices, attention scores, scaling, Softmax probabilities, and the final weighted output.

Q58

Multi-head self-attention: mechanics and motivation

Analyze Multi-Head Self-Attention in Transformers. Explain how different heads independently project Query, Key, and Value representations, compute attention, concatenate their outputs, and apply the final projection. Discuss why multiple heads are useful.

Q59

Cross-attention: decoder using encoder context

Analyze how cross-attention allows a Transformer decoder to use encoder information while generating an output sequence. Explain the Query, Key, and Value roles with a suitable machine-translation example.

Q60

Contextual embeddings: same word, different sentences

Pass three semantically different sentences through a Transformer Encoder and analyze their contextual representations. Explain why the same word can obtain different embeddings when it appears in different contexts.

Q61

Transformer decoder architecture for text generation

Design and explain a Transformer Decoder for autoregressive text generation. Discuss causal masked self-attention, optional cross-attention, residual connections, layer normalization, feed-forward networks, output projection, and next-token prediction.

Q62

Text classification using a Transformer encoder

Develop a text-classification application using a Transformer Encoder. Explain tokenization, contextual encoding, pooling or CLS representation, classification head, training objective, and prediction of the input class.

Q63

Text generation with a pretrained Transformer

Implement text generation using a pretrained Transformer model for a given prompt. Show tokenization, model inference, decoding, and the final generated text.

Q64

Zero-shot, one-shot, and few-shot prompting compared

Differentiate zero-shot, one-shot, and few-shot prompting. Write an example of all three for the same task and discuss when each prompting strategy is most suitable.

Q65

Comparing instruction, role, and reasoning prompting styles

Compare instruction prompting, role prompting, one/few-shot prompting, and structured reasoning prompting. Explain their purpose, advantages, limitations, and suitable Generative AI applications.

Q66

RAG pipeline: from documents to grounded answers

Explain the complete step-by-step workflow of a Retrieval-Augmented Generation (RAG) system, covering document ingestion, chunking, embedding generation, indexing, retrieval, prompt augmentation, generation, and source grounding.

Q67

RAG system design for a university portal

Design an end-to-end RAG system for a university knowledge portal that answers questions from syllabus documents, academic regulations, examination guidelines, and notices. Explain ingestion, chunking, embeddings, vector storage, retrieval, prompt construction, answer generation, and citation of sources.

Q68

Comparing greedy, temperature, and top-k/top-p decoding

Develop a Transformer-based text-generation experiment using three different prompts. Generate outputs using greedy decoding, temperature sampling, and top-k/top-p sampling, and compare their diversity and coherence.

Q69

Variational Autoencoder on MNIST, step by step

Implement a simple VAE using Python and TensorFlow or PyTorch on the MNIST dataset. Include the encoder, latent-space sampling using the reparameterization trick, decoder, reconstruction loss, KL-divergence loss, and training procedure. Display original and reconstructed images.

Q70

VAE image generation: sampling new MNIST digits

Implement a VAE for image generation using the MNIST dataset. Estimate the latent mean and variance, apply the reparameterization trick, decode latent vectors, calculate reconstruction and KL-divergence losses, and visualize newly generated samples.

Q71

Basic GAN for generating handwritten digits

Implement a basic GAN using Python and TensorFlow or PyTorch on the MNIST dataset. Include data preprocessing, Generator and Discriminator construction, adversarial training, loss functions, and visualization of synthetic handwritten digits at different training stages.

Q72

Text summarization with a pretrained Transformer

Implement text summarization using a pretrained Transformer model. Display the input paragraph and generated summary, and explain how the model identifies and produces the most important information.