Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Answer: To create new content such as text, images, or audio
Generative AI is designed to generate new content like text, images, music, and code, rather than just analyzing or sorting existing data.
Question 2 of 60 · Define generative AI · Easy
Which of the following best describes generative AI?
Not quite. Try another option.
Answer: A type of AI that produces original outputs from learned patterns
Generative AI learns patterns from training data and uses them to produce new, original outputs.
Question 3 of 60 · Define generative AI · Easy
Generative AI is a subset of which broader field?
Not quite. Try another option.
Answer: Machine learning
Generative AI is a branch of machine learning, which itself is part of artificial intelligence.
Question 4 of 60 · Define generative AI · Easy
Which of the following is an example of a generative AI output?
Not quite. Try another option.
Answer: An AI-written poem about the ocean
Creating a poem is generating new content, which is a hallmark of generative AI.
Question 5 of 60 · Explain how generative AI works · Easy
What do generative AI models learn from during training?
Not quite. Try another option.
Answer: Large amounts of data
Generative AI models are trained on large datasets so they can learn patterns and generate similar new content.
Question 6 of 60 · Explain how generative AI works · Easy
In language models, a prompt refers to what?
Not quite. Try another option.
Answer: The input text given to the model
A prompt is the instruction or input a user provides to guide the model's generated response.
Question 7 of 60 · Explain how generative AI works · Easy
What is a token in the context of language models?
Not quite. Try another option.
Answer: A small unit of text such as a word or part of a word
Language models break text into tokens (words or subwords) and process them to generate output.
Question 8 of 60 · Explain how generative AI works · Easy
How does a text-generating model typically produce its output?
Not quite. Try another option.
Answer: By predicting the next token based on previous ones
Generative language models predict the most likely next token given the preceding context, one step at a time.
Question 9 of 60 · Explain how generative AI works · Easy
What is the process of adjusting a pre-trained model on a smaller, specific dataset called?
Not quite. Try another option.
Answer: Fine-tuning
Fine-tuning adapts a pre-trained model to a specific task or domain using additional targeted data.
Question 10 of 60 · Explain how generative AI works · Easy
Which component in modern generative models helps focus on relevant parts of the input?
Not quite. Try another option.
Answer: The attention mechanism
The attention mechanism lets models weigh the importance of different input parts when generating output.
Question 11 of 60 · Describe generative AI model types · Easy
What does the acronym GAN stand for?
Not quite. Try another option.
Answer: Generative Adversarial Network
GAN stands for Generative Adversarial Network, which uses two competing networks to generate realistic data.
Question 12 of 60 · Describe generative AI model types · Easy
A GAN consists of which two main components?
Not quite. Try another option.
Answer: A generator and a discriminator
A GAN pairs a generator that creates data with a discriminator that judges whether it is real or fake.
Question 13 of 60 · Describe generative AI model types · Easy
Which architecture is the foundation of most modern large language models?
Not quite. Try another option.
Answer: Transformer
The Transformer architecture, introduced in 2017, underpins most modern large language models.
Question 14 of 60 · Describe generative AI model types · Easy
What does LLM stand for?
Not quite. Try another option.
Answer: Large Language Model
LLM stands for Large Language Model, a model trained on vast text data to understand and generate language.
Question 15 of 60 · Describe generative AI model types · Easy
Which model type is commonly used to generate high-quality images from text prompts?
Not quite. Try another option.
Answer: Diffusion models
Diffusion models generate images by gradually removing noise, and are widely used in text-to-image tools.
Question 16 of 60 · Describe generative AI model types · Easy
What does VAE stand for in generative modeling?
Not quite. Try another option.
Answer: Variational Autoencoder
VAE stands for Variational Autoencoder, a model that learns compressed representations to generate new data.
Question 17 of 60 · Describe generative AI applications · Easy
Which of the following is a common application of generative AI?
Not quite. Try another option.
Answer: Chatbots that answer questions
Conversational chatbots are a widely used application of generative AI, producing human-like responses.
Question 18 of 60 · Describe generative AI applications · Easy
Generative AI tools that create pictures from a text description perform what task?
Not quite. Try another option.
Answer: Text-to-image generation
Text-to-image generation converts written descriptions into images, a popular generative AI application.
Question 19 of 60 · Describe generative AI applications · Easy
Which task is an example of generative AI assisting software developers?
Not quite. Try another option.
Answer: Suggesting and completing code
Code-assistant tools use generative AI to suggest, complete, and explain code for developers.
Question 20 of 60 · Describe generative AI applications · Easy
How can generative AI help with long documents?
Not quite. Try another option.
Answer: By summarizing them into shorter text
Text summarization is a common generative AI application that condenses long content into concise summaries.
Question 21 of 60 · Define generative AI · Medium
A team builds a system that produces brand-new product descriptions rather than labeling existing ones as spam or not-spam. Which characteristic best classifies this system as generative AI?
Not quite. Try another option.
Answer: It creates novel content by modeling the distribution of training data
Generative AI learns the underlying data distribution and samples from it to produce new content, unlike discriminative models that only classify inputs.
Question 22 of 60 · Define generative AI · Medium
Which of the following tasks is the clearest example of generative rather than discriminative modeling?
Not quite. Try another option.
Answer: Synthesizing a realistic human face that does not exist
Generating a new, non-existent face is content creation. The other options assign labels or scores to existing inputs, which is discriminative.
Question 23 of 60 · Define generative AI · Medium
A discriminative model learns while a generative model typically learns or . What practical capability does learning give a generative model?
Not quite. Try another option.
Answer: It can sample and produce new data instances resembling the training set
Modeling lets the system sample new instances from the learned distribution, which is the core of content generation.
Question 24 of 60 · Explain how generative AI works · Medium
In a transformer-based language model, the self-attention mechanism primarily allows the model to do what?
Not quite. Try another option.
Answer: Weigh the relevance of different tokens in a sequence to each other
Self-attention computes relevance weights between tokens, letting the model capture context and long-range dependencies when generating each token.
Question 25 of 60 · Explain how generative AI works · Medium
During text generation, increasing the temperature parameter of a language model generally has what effect on the output?
Not quite. Try another option.
Answer: It increases randomness and diversity in the generated tokens
Higher temperature flattens the probability distribution over tokens, making less-likely tokens more probable and increasing output diversity.
Question 26 of 60 · Explain how generative AI works · Medium
A large language model predicts text by estimating the probability of the next token given previous tokens. This objective is best described as:
Not quite. Try another option.
Answer: Autoregressive next-token prediction
Autoregressive models generate sequences one token at a time, each conditioned on the tokens produced so far, modeling .
Question 27 of 60 · Explain how generative AI works · Medium
Why are embeddings important in how generative models process text?
Not quite. Try another option.
Answer: They map words into dense vectors that capture semantic relationships
Embeddings represent tokens as continuous vectors where semantically similar items are close together, enabling the model to reason over meaning.
Question 28 of 60 · Explain how generative AI works · Medium
In the training of a generative model, what does a loss function typically measure?
Not quite. Try another option.
Answer: The difference between the model's predictions and the target data
The loss quantifies prediction error; minimizing it via gradient descent adjusts the model's weights to better match the training data.
Question 29 of 60 · Describe generative AI model types · Medium
A Generative Adversarial Network (GAN) trains two competing networks. What are their roles?
Not quite. Try another option.
Answer: A generator creates samples while a discriminator judges their authenticity
In a GAN, the generator produces fake samples and the discriminator tries to distinguish real from fake; their adversarial competition improves both.
Question 30 of 60 · Describe generative AI model types · Medium
Modern image generators like Stable Diffusion are based on diffusion models. How do they generate images?
Not quite. Try another option.
Answer: By iteratively denoising random noise into a coherent image
Diffusion models learn to reverse a noising process, gradually transforming random noise into a structured image over many denoising steps.
Question 31 of 60 · Describe generative AI model types · Medium
A Variational Autoencoder (VAE) differs from a plain autoencoder mainly because it:
Not quite. Try another option.
Answer: Learns a probabilistic latent space that can be sampled to generate new data
A VAE encodes inputs into a distribution over latent variables; sampling from this latent space and decoding produces new, plausible data.
Question 32 of 60 · Describe generative AI model types · Medium
The transformer architecture became dominant for large language models primarily because it:
Not quite. Try another option.
Answer: Processes sequence tokens in parallel using attention instead of recurrence
Transformers use self-attention to handle sequences in parallel, avoiding the sequential bottleneck of RNNs and scaling well to large datasets.
Question 33 of 60 · Describe generative AI model types · Medium
Which model type is most naturally suited for generating a coherent paragraph of text one word at a time?
Not quite. Try another option.
Answer: An autoregressive transformer language model
Autoregressive transformer LLMs generate text sequentially, conditioning each new token on prior context, which suits paragraph generation.
Question 34 of 60 · Describe generative AI model types · Medium
A researcher wants a model that maps an input distribution to a latent space and back using an encoder-decoder pair with a regularized latent code. Which model best fits this description?
Not quite. Try another option.
Answer: Variational Autoencoder (VAE)
A VAE uses an encoder-decoder structure with a regularized (probabilistic) latent space, matching the described setup exactly.
Question 35 of 60 · Describe generative AI applications · Medium
A company uses generative AI to automatically draft first-pass replies to customer support emails. This application is best categorized as:
Not quite. Try another option.
Answer: Text generation for automated content creation
Drafting email replies is a natural-language text-generation task, a core application of generative AI.
Question 36 of 60 · Describe generative AI applications · Medium
A studio uses a generative model to turn a text prompt like "a red fox in a snowy forest" into an original image. This is an example of:
Not quite. Try another option.
Answer: Text-to-image generation
Producing an image from a textual description is text-to-image generation, a widely used generative AI application.
Question 37 of 60 · Describe generative AI applications · Medium
In software development, tools like code assistants that suggest complete functions from a comment demonstrate which generative AI application?
Not quite. Try another option.
Answer: Code generation from natural-language descriptions
Generating source code from natural-language prompts is a code-generation application powered by large language models trained on code.
Question 38 of 60 · Describe generative AI applications · Medium
A drug-discovery lab uses a generative model to propose novel molecular structures with desired properties. This best illustrates generative AI used for:
Not quite. Try another option.
Answer: Synthetic data and candidate generation in scientific research
Generating novel candidate molecules is an application where generative models explore and propose new structures in scientific domains.
Question 39 of 60 · Describe generative AI applications · Medium
Which scenario is the least appropriate use of a generative AI model on its own?
Not quite. Try another option.
Answer: Producing legally binding financial figures that must be exactly correct
Generative models can hallucinate and are probabilistic, so tasks demanding exact, verifiable numbers are poorly suited to them without strict validation.
Question 40 of 60 · Describe generative AI applications · Medium
A music platform generates original background tracks from a short melodic prompt. This is an example of generative AI applied to:
Not quite. Try another option.
Answer: Audio and music synthesis
Creating new audio or musical content from a prompt is an audio-generation application of generative AI.
Question 41 of 60 · Define generative AI · Hard
A researcher claims their model is 'generative' because it outputs class labels with calibrated probability distributions . Why is this claim technically incorrect from a probabilistic modeling standpoint?
Not quite. Try another option.
Answer: It models the conditional rather than the joint or data distribution , making it discriminative
Generative models learn the data distribution or joint so they can sample new data. Modeling only is discriminative classification, regardless of calibration.
Question 42 of 60 · Define generative AI · Hard
Which characteristic most precisely distinguishes a generative model from a discriminative one, even when both are neural networks trained on the same dataset?
Not quite. Try another option.
Answer: The generative model can synthesize novel samples resembling the training distribution
The defining trait is the ability to generate new data by capturing the underlying distribution. Parameter count, labeling, and optimization method are not distinguishing criteria.
Question 43 of 60 · Define generative AI · Hard
A team argues that a lookup table returning memorized training sentences is 'generative AI' because it produces text. What is the strongest counterargument?
Not quite. Try another option.
Answer: It fails to generalize to a learned distribution and only reproduces stored samples without novel synthesis
Generative AI models a distribution enabling novel, unseen outputs. Pure memorization/retrieval lacks generalization and synthesis, so it is not genuinely generative.
Question 44 of 60 · Explain how generative AI works · Hard
In an autoregressive language model, the joint probability of a sequence is factorized as which of the following?
Not quite. Try another option.
Answer:
Autoregressive models apply the chain rule of probability, conditioning each token on all preceding tokens, giving the product of conditionals.
Question 45 of 60 · Explain how generative AI works · Hard
Lowering the sampling temperature in a language model's softmax produces what effect on generated output?
As , the softmax sharpens toward a one-hot distribution on the max logit, making sampling effectively greedy and deterministic.
Question 46 of 60 · Explain how generative AI works · Hard
A diffusion model is trained to reverse a gradual noising process. During generation, what does the model fundamentally learn to predict at each denoising step?
Not quite. Try another option.
Answer: The noise (or score) to remove, progressively transforming random noise into a data sample
Diffusion models learn to estimate the added noise (equivalently the score ) and iteratively denoise, turning Gaussian noise into a coherent sample.
Question 47 of 60 · Explain how generative AI works · Hard
In the self-attention mechanism, attention weights are computed as . Why is the scaling factor included?
Not quite. Try another option.
Answer: To prevent large dot products from pushing softmax into regions with vanishingly small gradients
For large , dot products grow in magnitude, saturating the softmax and shrinking gradients. Dividing by keeps variance stable and gradients healthy.
Question 48 of 60 · Explain how generative AI works · Hard
A variational autoencoder (VAE) optimizes the Evidence Lower Bound (ELBO). Which term in the ELBO acts as a regularizer forcing the latent posterior toward the prior?
Not quite. Try another option.
Answer: The KL divergence
The ELBO = reconstruction term − KL term. The KL divergence pulls the approximate posterior toward the prior , regularizing the latent space.
Question 49 of 60 · Explain how generative AI works · Hard
Why can teacher forcing during training cause 'exposure bias' at inference time in autoregressive generators?
Not quite. Try another option.
Answer: Training conditions on ground-truth tokens, but inference conditions on the model's own possibly-erroneous outputs, compounding errors
With teacher forcing, each step sees correct history. At inference the model feeds its own outputs; early mistakes propagate, a mismatch called exposure bias.
Question 50 of 60 · Describe generative AI model types · Hard
GAN training is often unstable due to 'mode collapse.' What does mode collapse specifically describe?
Not quite. Try another option.
Answer: The generator produces limited, repetitive outputs covering only a few modes of the true data distribution
Mode collapse occurs when the generator maps many latent inputs to a narrow set of outputs, ignoring the diversity of the real distribution while still fooling the discriminator.
Question 51 of 60 · Describe generative AI model types · Hard
Which comparison between VAEs and GANs is accurate regarding sample quality and likelihood?
Not quite. Try another option.
Answer: VAEs offer tractable likelihood estimates but often blurrier samples, while GANs yield sharper samples without explicit likelihoods
VAEs optimize a likelihood lower bound (ELBO) but tend to produce blurry outputs; GANs generate sharp samples via adversarial training but lack an explicit tractable likelihood.
Question 52 of 60 · Describe generative AI model types · Hard
Why are diffusion models generally more stable to train than GANs despite being more computationally expensive at inference?
Not quite. Try another option.
Answer: They optimize a well-defined denoising regression objective rather than a min-max adversarial game
Diffusion models use a stable regression-style loss (predicting noise), avoiding the fragile adversarial equilibrium of GANs. The cost is many iterative denoising steps at inference.
Question 53 of 60 · Describe generative AI model types · Hard
An autoregressive image model like PixelCNN differs from a GAN primarily in that it:
Not quite. Try another option.
Answer: Models the explicit joint distribution as a product of pixel-wise conditionals, enabling exact likelihood
PixelCNN factorizes into conditionals over pixels, giving tractable exact likelihood but slow sequential generation, unlike GANs' implicit, one-shot sampling.
Question 54 of 60 · Describe generative AI model types · Hard
Normalizing flows achieve exact likelihood computation through which key architectural constraint?
Not quite. Try another option.
Answer: Invertible transformations with tractable Jacobian determinants relating data and latent densities
Flows use bijective mappings so the change-of-variables formula gives exact likelihood, requiring the Jacobian determinant to be efficiently computable.
Question 55 of 60 · Describe generative AI model types · Hard
A transformer-based LLM and an RNN-based language model both generate text autoregressively. What is the transformer's core architectural advantage during training?
Not quite. Try another option.
Answer: Parallel processing of all sequence positions via attention instead of sequential recurrence
Transformers compute attention over all positions simultaneously, enabling parallel training. RNNs must process tokens sequentially, limiting parallelism and long-range dependency capture.
Question 56 of 60 · Describe generative AI applications · Hard
In a retrieval-augmented generation (RAG) system, why does grounding an LLM with retrieved documents primarily reduce hallucination?
Not quite. Try another option.
Answer: It conditions generation on relevant external evidence, anchoring outputs to verifiable source content
RAG injects retrieved, relevant context into the prompt so generation is grounded in actual source material, reducing fabricated (hallucinated) content without retraining.
Question 57 of 60 · Describe generative AI applications · Hard
A company deploys a generative model for synthetic tabular data to train downstream classifiers. What is the key risk that undermines this application if unaddressed?
Not quite. Try another option.
Answer: The synthetic data may memorize and leak sensitive records or fail to preserve real statistical dependencies
Poorly regularized generators can memorize training rows (privacy leakage) or distort feature correlations, degrading downstream utility—both must be validated before deployment.
Question 58 of 60 · Describe generative AI applications · Hard
For real-time interactive applications (e.g., live chat), why might a diffusion-based text generator be a poor choice compared to an autoregressive transformer?
Not quite. Try another option.
Answer: Diffusion requires many iterative denoising steps, increasing latency, while transformers generate tokens more directly
Diffusion's iterative sampling adds substantial latency per output. Autoregressive transformers, especially with caching, deliver lower-latency token streaming suited to interactive use.
Question 59 of 60 · Describe generative AI applications · Hard
When using a text-to-image model for product design, which limitation best explains why fine-grained spatial instructions (e.g., 'exactly three buttons in a row') often fail?
Not quite. Try another option.
Answer: The model captures statistical associations rather than precise compositional or counting constraints
Generative image models learn distributional correlations, so precise counting and exact spatial composition are weakly enforced, leading to frequent violations of strict constraints.
Question 60 of 60 · Describe generative AI applications · Hard
A developer uses an LLM for code generation and observes plausible-looking but nonexistent library functions. What underlying property of the model best explains this?
Not quite. Try another option.
Answer: It generates the most statistically likely tokens, which can produce syntactically plausible yet factually invalid API calls
The model predicts likely token sequences based on patterns, not verified truth. Plausible naming patterns can yield hallucinated APIs that do not actually exist.
That's unit 1
Answer a few questions and your score shows up here.
Nearly through. Did unit 1 of CSG202 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 1 of CSG202 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.