Generative AI Interview Questions and Answers
Here are 31 generative AI interview questions, with short answers in simple English. They cover how models create text and images, how to build products with them, and how to use them safely.

How to answer a generative AI question
Give the idea in one or two plain sentences. Then add one practical point: a risk, a cost, or how you would test it. That shows you have thought about real products, not only definitions.
1. Generative AI basics
Start with clear definitions. Many interviews open with one of these to see if you can explain the field simply.
What is generative AI?
Generative AI means models that create new content: text, images, audio, video or code. They learn patterns from a large amount of example data, then produce new data that follows those patterns.
ChatGPT writing an email and a model drawing a picture from a sentence are both generative AI. ChatGPT runs on an LLM (large language model), a model that reads and writes text in small pieces called tokens.
What is the difference between a generative and a discriminative model?
A discriminative model learns how to pick a label for an input, such as spam or not spam. A generative model learns how the data itself is spread out, which lets it make new examples.
Some generative models, like Naive Bayes, can also classify. So the difference is what the model learns, not only what it outputs.
What is a foundation model?
A foundation model is a large model trained on broad data, so it can be used for many tasks. GPT, Claude, Llama and Gemini are examples.
You build on it with a prompt, with RAG, or with fine-tuning, instead of training a new model from zero. RAG adds relevant text from your documents to the prompt. Fine-tuning trains the model a little more on your own examples.
Open-weight or closed model: how do you choose?
A closed model is used through the provider's API, a web service you send requests to. You never see its weights, the numbers it learned. An open-weight model gives you the weights, so you can run it yourself.
Closed models are often stronger and easier to start with. Open-weight models let you keep data in-house, lower the cost at high volume, and fine-tune freely. Read each model's licence before you use it.
2. How generative models work
GANs, VAEs and diffusion are the three classic families for images. You need the idea behind each, and why diffusion took over.

How does a GAN work?
A GAN (generative adversarial network) has two networks. The generator makes fake examples. The discriminator tries to tell fakes from real examples. Each gets better by competing with the other.
GANs can make sharp images fast. They are hard to train. They can also suffer mode collapse, where the generator keeps making only a few kinds of output.
How does a VAE work?
A VAE (variational autoencoder) has an encoder and a decoder. The encoder maps each example to a small range of likely values in a compact space, called the latent space. The decoder rebuilds the example from a point in that space.
Training keeps the latent space smooth and centred. So a random point from it decodes into a sensible new example. VAE images are often a little blurry.
How does a diffusion model work?
In training, the model sees images with random noise added, and learns to predict that noise. If you can predict the noise, you can subtract it. To generate, the model starts from pure noise and removes a little at each step, until an image appears.
It is slower than a GAN, because it takes many steps. It is more stable to train and gives more varied, high-quality images.
How does a text prompt control an image model?
A text encoder turns the prompt into numbers. At every noise-removing step, the model reads those numbers, so its guess of the noise depends on the text.
Many models use classifier-free guidance. They make one guess with the prompt and one without it, then exaggerate the difference. A higher guidance setting follows the prompt more closely.
What is latent diffusion?
Removing noise from a full-size image is slow. Latent diffusion first uses an encoder, like a VAE's, to compress the image into a much smaller latent form. It runs diffusion there, then decodes the result back into pixels.
Stable Diffusion works this way. It is a big reason image generation can run on one home graphics card (GPU).
How is diffusion made faster?
Better samplers can reach a good image in far fewer steps than the original method. Distillation trains a student model to do the work of many steps in just a few.
Fewer steps usually cost a little quality, so the right number depends on the product.
How is text generation different from image diffusion?
Text models are usually autoregressive: they write one token at a time, each based on the tokens before. Diffusion models refine a whole image at once, over many steps.
The two are getting closer. Some image models now generate tokens one by one, and some text models use diffusion.
3. Multimodal models
Multimodal means a model works with more than one kind of data, such as text and images together.

How does a vision-language model understand an image?
A vision encoder cuts the image into small patches and turns each into numbers. A small projection layer maps these into the same space as text tokens. They become image tokens, placed next to the text tokens.
The language model then reads both together, so it can answer questions about the picture.
What is CLIP?
CLIP is a model from OpenAI. It turns images and text into lists of numbers in one shared space, called an embedding space. A photo of a dog and the words "a photo of a dog" end up close together.
It was trained on image and caption pairs, pulling matching pairs together and pushing others apart. It is used for image search and to guide image generation.
How do voice assistants use generative AI?
The common design has three steps. Speech-to-text, also called ASR (automatic speech recognition), turns speech into text. An LLM writes the answer. Text-to-speech (TTS) reads it aloud.
Newer models handle audio directly, which lowers the delay and keeps tone of voice. The three-step design is still easier to debug.
4. Building with generative AI
This part is about turning a model into a product that works every day.
What makes a good prompt?
Give the model a clear role, the task, the context it needs, and the exact output format. Add one or two examples of good answers when the format matters.
Put fixed instructions first and changing content last. Many providers then reuse, or cache, the fixed part across requests, which saves cost.
Why treat prompts like code?
A small change to a prompt can break answers in ways nobody notices. So store prompts with a version. Test each change against a fixed set of examples, and keep a way to roll back.
Log which prompt version produced each answer, so a bad answer can be traced.
Prompting, RAG or fine-tuning: where do you start?
Start with prompting, because it is fastest to change. Add RAG when the model needs your own or fresh information. Fine-tune only to change behaviour that prompting cannot fix.
Each step costs more time and money than the one before. Move on only when you have measured a need.
How do you control the cost of a generative AI app?
Send easy requests to a small, cheap model and hard ones to a strong model. This is called routing. Also cut repeated text from prompts, cap the length of replies, and cache common answers.
Measure the cost per request, not only the monthly bill, so you can see which feature costs most.
How do you know a generative AI app is working in production?
Checking for errors is not enough. The app can report success and still give a wrong answer. Log the full prompt, the answer, the tokens used and the time of each step, under one ID per request.
Then review samples of real answers regularly, and track user feedback.
5. Quality and evaluation
Generated content rarely has one correct answer. These questions test how you measure quality anyway.
How do you evaluate output that has no single right answer?
Combine several methods. Keep a fixed set of test inputs with examples of good answers. Use code checks for format and facts. Use an LLM judge, a model that grades answers, for things like tone. Check the judge against human grades.
In production, compare versions with real users in an A/B test, where each group sees a different version.
How is the quality of generated images measured?
FID (Fréchet Inception Distance) turns many generated and many real images into numbers with an image model. Then it measures how far apart the two groups are. Lower is better. CLIP score checks how well an image matches its text prompt.
Both are rough. Human ratings are still the final test for image quality.
How do you reduce hallucinations in a generative AI product?
Give the model the right source text to answer from. Ask it to cite that text, and let it say it does not know. Check important facts in code where you can.
Design the product so that a wrong answer is caught or is not harmful. For example, show sources, or ask a person to approve risky actions.
6. Risk, privacy and law
This part covers privacy, safety, law and security.

How do you protect personal data in a generative AI app?
Treat every prompt sent to a provider as data leaving your company. Remove or mask personal data, like names and phone numbers, before it reaches the model and your logs.
Keep logs only as long as you need them. Check where the provider stores data, and make deletion work in every store.
What are guardrails in generative AI?
Guardrails are checks around the model. Input checks can block attacks or personal data. Output checks can block harmful content, leaked secrets or broken formats.
They reduce risk but do not remove it. Combine them with limits on what the app is allowed to do.
What are the copyright risks of generative AI?
Models are trained on huge amounts of existing work. The law on this is still being decided in many countries. Output can sometimes copy training data closely.
In practice, check the licence of the model you use. Avoid prompts that ask for a named artist's or brand's work. Ask your legal team about your use case.
How can AI-generated images be detected?
Detection from pixels alone is unreliable. The stronger approach is labelling at creation. Watermarks like Google's SynthID hide a signal in the content. C2PA content credentials attach signed information about how a file was made.
Neither is complete, because some tools add no label and some labels can be removed.
Can downloading a model be a security risk?
Yes. Some model file formats use Python's pickle format. A pickle file can include instructions to run any code while it loads. A harmful file can take over the machine before you see the model.
Prefer the safetensors format, which holds only numbers. Fix the exact version of everything you install, and check the source of every model you load.
How does bias show up in generative AI?
Models learn patterns from their data, including unfair ones. An image model asked for "a doctor" may mostly show one gender or skin colour.
Test outputs across different groups, adjust prompts or data, and let users report problems.
7. Synthetic data
Generative AI is also used to make training data for other models. It helps, but it is easy to get wrong.
When is synthetic data useful?
When real data is rare, private or does not exist yet. Examples are a new fraud pattern with 40 real cases, or medical data you cannot share.
Synthetic data can fill that gap, but only if it keeps the real patterns, including the rare ones.
How do you prove synthetic data actually helps?
Train one model on the synthetic data and one on real data. Test both on real data you kept aside. If the synthetic one scores close to the real one, the synthetic data is useful.
Also check the rare cases, not just the averages. Then check the generator did not copy real rows. A near copy of a real person's record is a privacy leak.
What is model collapse?
Model collapse happens when models are trained on the output of earlier models, again and again. Rare cases get sampled less each time, until they disappear, and the output becomes more and more average.
So keep real data in the training mix, and track where your data came from.
Learn it properly, not just the answers
Every answer on this page comes from our AI Engineering course: 112 lessons on RAG, evals, agents, serving, security and MLOps. Many of them are built around a real experiment. You learn why the answer is right, which is what an interviewer checks with the second question. 10 lessons are free to read, with no card needed.