Skip to content
tezvyn:

LLMs & Generative AI

Large language models, chatbots, agents, prompt engineering

145 bites

Test yourself: Top 30 LLMs & Generative AI interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Interview questions in LLMs & Generative AI, page 3

How does function calling work in modern LLMs?
easy2 min read

How does function calling work in modern LLMs?

Schemas in the prompt; model emits JSON name and arguments; client executes and returns results.

Walk me through building a weather agent with get_weather
easy2 min read

Walk me through building a weather agent with get_weather

Register get_weather, let the model emit parameters, execute it yourself, feed the result back, then synthesize the answer.

Describe a ReAct agent architecture for multi-step dependent tool calls
intermediate2 min read

Describe a ReAct agent architecture for multi-step dependent tool calls

Sketch ReAct's thought-action-observation cycle; keep state in an append-only trajectory; re-plan after each observation.

intermediate2 min read

What fixes an LLM agent's incorrect JSON arguments for a complex tool?

Tests mixing prompting with system guardrails for valid tool JSON. Outline: few-shot demos plus CoT prompting; schema validation, constrained decoding, and retries. Red flag: weak prompts without validation or structured output.

advanced1 min read

Securing tool-using LLM agents

Name indirect prompt injection, data exfiltration, and unsafe tool execution, then defend with sandboxing, least-privilege scoped tools, input/output filtering, and human-in-the-loop on risky actions.

advanced1 min read

Designing an agent that resolves ambiguity

Detect ambiguity, gather evidence with the contact API, resolve relative time deterministically, ask the user only when genuinely uncertain, then confirm before the irreversible booking.

easy2 min read

Explain GAN architecture, generator and discriminator roles, and objective function

Tests adversarial training as a minimax game. Strong answers: generator maps noise z to fakes; discriminator classifies real versus fake; both optimize V(D,G)=E[log D(x)]+E[log(1-D(G(z)))].

Key latent space difference between Autoencoder and VAE, and generative use
easy2 min read

Key latent space difference between Autoencoder and VAE, and generative use

This tests deterministic versus probabilistic latent representations. Standard autoencoders encode fixed points; VAEs encode distributions. Sampling the regularized latent distribution generates new data. Red flag: calling VAEs mere noise adders.

easy2 min read

Explain Denoising Diffusion models and forward/reverse processes.

This tests if you see diffusion as iterative latent generation, not GANs. Forward: add Gaussian noise over T steps until data is pure noise. Reverse: a network iteratively denoises random noise into data.

intermediate2 min read

What is GAN mode collapse, its causes, and two mitigations?

Define mode collapse as diversity loss to few modes; cite discriminator imbalance and lenient JS loss; give two fixes: WGAN and mini-batch discrimination.

How does text guide Stable Diffusion via U-Net cross-attention?
intermediate2 min read

How does text guide Stable Diffusion via U-Net cross-attention?

Tests whether you know text embeddings condition the U-Net through cross-attention. Good answers explain that image features query text keys and values at every layer. Red flag: claiming the prompt is concatenated to the image latent.

intermediate1 min read

Evaluating image generation: FID and IS

FID compares feature distributions of real and generated images, lower is better; Inception Score rewards confident, diverse classes but ignores real data.

advanced1 min read

DDIM: faster diffusion sampling

DDIM defines a non-Markovian deterministic process sharing DDPM's training, letting you skip steps and sample in far fewer iterations.

advanced1 min read

Diffusion-based image inpainting design

At each denoising step keep the known region by replacing it with the noised original, let the model generate only the masked area, condition on prompt and mask.

advanced1 min read

Temporal consistency in video diffusion

Add temporal layers, such as temporal attention or 3D convolutions across frames, so the model attends across time and frames denoise jointly rather than independently.

easy1 min read

Classic image captioning architecture

A CNN encoder extracts image features, a recurrent or transformer decoder generates the caption word by word, and attention lets the decoder focus on image regions per word.

easy1 min read

Early versus late modality fusion

Early fusion merges raw or low-level features so the model learns cross-modal interactions, while late fusion processes each modality separately and combines outputs.

intermediate1 min read

Designing a Visual Question Answering system

Encode the image with a vision backbone, encode the question with a text encoder, fuse them via cross-attention into a joint representation, then decode or classify the answer.

intermediate1 min read

How Stable Diffusion generates images

The text encoder turns the prompt into embeddings, the U-Net predicts noise to remove conditioned on those embeddings, and the scheduler controls how noise is stepped down over iterations in…

intermediate1 min read

Aligning text and image representations

Contrastive learning like CLIP pulls matched image-text pairs together and pushes mismatches apart; alternatively projection layers map one modality into a frozen model's space.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles