Generative AI — AI Technical Interview Questions & Answers

Generative AI

Generative AI

  • Generative AI creates new content: text, images, audio, code. It learns a distribution, then samples. LLMs predict the next token. Image models denoise or decode latents. Useful copilots. Risks: hallucination, copyright, deepfakes, leaking training data.
  • Not the same as a classifier that only outputs spam/not-spam. Generative = produce new samples. Discriminative = label existing ones. Say that pair.
  • Generative AI — output: three lines. Generative creates samples; still can hallucinate.

Technical Interview Tip: Generative vs discriminative + one risk.

Code Examples for Generative AI

Example

# Generative vs discriminative
print("classifier : spam / not spam")
print("generative : write a new email draft")
print("fluent text can still be false")

Generative AI — output: three lines. Generative creates samples; still can hallucinate.

How to Explain Generative AI to an Interviewer

Explain Generative AI as if you are teaching a junior — definition, then one example.

Creates new samples. LLM = next token.

What does the example print, and what does that prove?

Generative AI — output: three lines

What mistake do freshers make with Generative AI?

fluent ≠ true.