AI Engineer (LLM & Generative AI) question bank
704 questions. Filter by level and skill, track what you've solved, and see how many people get each one right.
- What is a token
- What text embeddings are
- Effect of temperature
- What the context window limits
- What RAG does
- What a hallucination is
- Purpose of a system prompt
- Comparing two embeddings
- Dot product of two vectors
- Length of a vector
- Softmax of equal scores
- What softmax outputs look like
- Temperature close to zero
- What top-k sampling does
- Grouping data with no labels
- Why keep a separate test set
- Spotting overfitting
- Computing precision
- Why activation functions exist
- A learning rate that is too high
- How rare words get tokenized
- What LLM pretraining learns
- What few-shot prompting is
- Asking the model to reason first
- The required keyword in JSON Schema
- What a tool definition contains
- The basic agent loop
- What MCP is for
- What a vector database does
- Which words BM25 rewards
- What a golden set is for
- Handling an HTTP 429 response
- Customer data and a hosted LLM
- Parsing a JSON reply in Python
- Workflow or agent
- Reading the stop reason
- Describing tool parameters
- What ReAct means
- MCP message format
- What an MCP server offers
- Choosing an MCP transport
- Short-term and long-term memory
- Do tool definitions cost tokens
- Limiting a parameter to fixed values
- What an idempotent tool is
- Why trace an agent run
- What a subagent is
- The agent gets the date wrong
- What lets an LLM take actions
- Host, client and server in MCP
- How a client finds MCP tools
- Logging in to a remote MCP server
- MCP compared with A2A
- Do we even need an agent
- Handing over to a human
- Asking instead of guessing
- More context, worse answers
- Flagging a failed tool result
- Making a parameter mandatory
- Forcing the model to use a tool
- Least privilege for agent tools
- First step in improving an agent
- A limit on loop turns
- A tool that hangs
- The first MCP message
- What an MCP resource is
- What a good tool description says
- Naming a tool parameter
- Processing invoices every night
- Planning a long task first
- Feedback for a coding agent
- Users waiting on a slow agent
- Testing tools on their own
- A caller asks for an order address
- What agent benchmarks test
- Tokens in a 3,000-word report
- How a reply is generated
- A base model ignores the question
- What 8 billion parameters means
- Do examples in a prompt train the model
- Does the reply use context space
- Hello and hello are not the same
- What happens to a token id first
- How the model decides to stop
- Why models make things up
- Open weights or open source
- Running a model on a laptop
- Keeping a system prompt secret
- Emoji in a prompt
- Pretraining data compared with tuning data
- What greedy decoding is
- What a frequency penalty does
- Presence penalty in brief
- What a seed parameter promises
- Raising max tokens to get longer replies
- How streamed replies arrive
- Calling the LLM from the browser
- Tracking tokens per request
- Which errors to retry
- Checking prompt size in advance
- Model alias or dated version
- Every request fails after a deploy
- Reply stopped by a safety filter
- Asking for five versions at once
- Long answers fail at 10 seconds
- Input or output, which costs more
- What TTFT measures
- What p95 latency means
- Converting an API bill to rupees
- Cache entries do not last forever
- Keeping data in the country
- Hosting your own model
- Choosing between two models
- A model retirement email
- Cost of a long system prompt
- Reasoning effort for easy tasks
- Will the provider train on our data
- The same question a thousand times
- Five summaries one after another
- Guarding against a surprise bill
- Reading a photo of a bill
- What semantic search adds over keywords
- What an embedding dimension is
- What top-k means in retrieval
- Why vector search is approximate
- When a flat index is fine
- Why store metadata with each chunk
- Choosing pgvector
- Long chunks and embedding limits
- Arabic questions, English documents
- Why bi-encoders scale to big corpora
- Handling an edited source document
- Sparse versus dense vectors
- Bot quotes a withdrawn document
- Reading distance scores
- When document and query vectors are made
- Why documents are split into chunks
- Why chunks overlap
- How a recursive text splitter works
- Chunks that lost their heading
- Tables in PDFs come out garbled
- Scanned PDFs return no text
- What hybrid search means
- Rewriting the user query
- Restricting search to the right year
- Matching "refunds" and "refunded"
- Order of a RAG ingestion pipeline
- Cleaning scraped web pages
- Searching with several phrasings
- One chunk is not enough
- What semantic chunking does
- Why RAG answers show their sources
- Computing precision at 5
- What retrieval hit rate measures
- What a golden eval set contains
- What faithfulness measures
- What answer relevance measures
- Keeping salary documents private
- Personal data in the index
- The slowest step in a RAG request
- What to log for each RAG request
- Using thumbs-up and thumbs-down
- A document that gives orders
- When you may not need retrieval
- What LLM-as-a-judge means
- How BPE builds its vocabulary
- Tokens per English word
- Why Hindi text uses more tokens
- What the end-of-sequence token does
- What the embedding layer does
- Query, key and value in attention
- Why transformers need position information
- What a decoder-only model predicts
- Where BERT-style models fit
- What fills the context window
- Why transformers use residual connections
- Why use several attention heads
- Why a padding mask is needed
- Why byte-level BPE never needs UNK
- What the final layer outputs
- What the feed-forward layer sees
- Why transformers normalise activations
- The loss used in LLM pretraining
- Reading a perplexity number
- How training sees the previous tokens
- Base model versus instruct model
- What SFT data looks like
- Role of the reward model in RLHF
- What LoRA actually trains
- How a mixture-of-experts layer works
- Why training uses bf16
- What 7B in a model name means
- Memory for 7B weights in fp16
- What knowledge distillation does
- Fine-tuning for 20 epochs on 200 examples
- What greedy decoding does
- Sampling from the top 40 tokens
- What top-p sampling does
- Reply that ends mid-sentence
- Using a stop sequence
- Why chat replies arrive word by word
- What time to first token measures
- Why models are quantised
- What a repetition penalty is for
- Why LLMs state false facts
- Learning from examples in the prompt
- Why output is slower than input
- Making sampled outputs repeatable
- What logprobs tell you
- What beam search keeps
- How a vision transformer reads an image
- What CLIP learns
- What a knowledge cutoff means
- Where the system prompt lives
- Why transformers run on GPUs
- Choosing a chunking strategy
- Getting reliable JSON output
- Knowledge that changes every day
- Embeddings miss exact product codes
- Adding a reranker
- Who runs the tool
- Making prompt caching work
- Pairwise LLM judge bias
- Cosine similarity by hand
- Temperature changes probabilities
- How many tokens top-p keeps
- From logprobs to probability
- Computing recall at 5
- Computing MRR
- Estimating monthly token cost
- Savings from a cached prefix
- Why add jitter to backoff
- Tracing a retry helper
- What schema-constrained output guarantees
- Two tool calls in one turn
- Counting chunks with overlap
- Keeping tenants apart in RAG
- Tuning HNSW search breadth
- Reciprocal rank fusion scores
- Judge prefers longer answers
- Dot product on unit vectors
- Cosine of a scaled vector
- Streaming tool-call arguments
- Semantic cache gives wrong answers
- Debugging a bad agent answer
- Which rate limit binds first
- Memory for 4-bit weights
- Running SQL that an LLM wrote
- Users start asking new things
- A gate between chained steps
- Routing support tickets
- Voting with parallel calls
- When subtasks are not known ahead
- Evaluator and optimizer loop
- A tool that returns 60,000 tokens
- Writing a helpful tool error
- Two tools both called search
- IDs the model keeps getting wrong
- API error about a missing tool result
- GST totals from the model
- Meeting time from IST to Dubai
- A report that takes 20 minutes
- Where API keys should go
- Loading files only when needed
- What context compaction does
- Old tool results filling context
- Keeping progress across many hours
- Grading an agent fairly
- User writes Dubai in Arabic
- An MCP server asking for a completion
- Server needs a detail from the user
- Tools that appear after login
- Plain tools or an MCP server
- Handoff or agent as a tool
- Subagents doing duplicate work
- Two subagents edit one file
- Retrieval inside an agent loop
- Thinking between tool calls
- A clear way to finish
- Who retries a flaky API
- A payment charged twice
- The model calls a missing tool
- Prices in the wrong currency
- Letting the agent pick output detail
- Batch discounts for a chat agent
- Four lookups, one at a time
- A system prompt full of if-else rules
- Choosing examples for an agent
- An optional parameter left out
- Three tools for one booking
- Listing 40,000 contacts
- A tool with tricky input formats
- Parallel calls that depend on each other
- Agent crashes at step 37
- Previewing a bulk update
- Marking fetched content as data
- Limiting where an agent can browse
- One user running up the bill
- The current time in the system prompt
- What to track for a live agent
- Asking the agent to review itself
- An empty list that was really an error
- Telling a server which folders to use
- Says it will call a tool, but does not
- Whose permissions the agent uses
- Token counts across two models
- Why long sums go wrong
- What self-attention does
- Doubling the input length
- What the KV cache stores
- How RLHF works
- What makes DPO different
- JSON versus plain text tokens
- A larger tokenizer vocabulary
- Why transformers need positions
- Fine-tuned model lost a skill
- Training a small model from a big one
- How reasoning models are trained
- The model agrees too easily
- Cutoff and release date
- System prompt against user request
- An image in the prompt
- Feedback from AI with principles
- Pushing past the trained length
- Why a 70B model is slower
- The same sentence over and over
- Why chat models skip beam search
- How many tokens min-p keeps
- Probability after top-k filtering
- Banning one word from the output
- Changing temperature and top-p together
- Sampling several answers and voting
- Forcing output to fit a grammar
- Parsing JSON while streaming
- User clicks Stop mid-reply
- Provider overloaded at peak time
- A bulk job hitting rate limits
- Limits that refill over time
- Sending unsure labels to a person
- The model says it is 95% sure
- Starting the reply for the model
- Room to read but not to write
- Translating a 300-page manual
- Total wait across five retries
- An empty reply from a reasoning model
- An API bill with 18% GST
- Overhead before the first token
- When caching starts to pay
- A short prompt never caches
- Users in Mumbai, endpoint in the US
- Steady high traffic and rate limits
- Which task needs a reasoning model
- Tokens for one image
- How to grade model outputs
- Whole manual or retrieved parts
- Picking matches from a list
- Renting a GPU or paying per token
- A few replies take a minute
- Picking a model on cost and quality
- Latency numbers that look too good
- Summarising a 900-page report
- A batch job due in four hours
- Two calls where one would do
- Retrieved pages full of menus
- Which feature costs the most
- Do cached prompts change the reply
- Memory for one million float vectors
- Memory after int8 quantisation
- Binary quantisation with rescoring
- Truncating Matryoshka embeddings
- L2 versus cosine on unit vectors
- Squared distance from a cosine score
- Raising nprobe in an IVF index
- Raising M when building HNSW
- Forgetting the query prefix
- Short questions against long passages
- Insert fails with a dimension error
- How product quantisation saves memory
- Fine-tuning embeddings for your domain
- Batch size in contrastive training
- How ColBERT scores documents
- What SPLADE adds to keyword search
- Cost to embed a document corpus
- Shards versus replicas in a vector DB
- Index slows after many deletes
- Picking an embedding model
- What k1 controls in BM25
- Setting BM25 b to zero
- Working out an IDF weight
- How HyDE searches
- Splitting a compound question
- Retrieve small, return the parent
- Adding document context to each chunk
- What maximal marginal relevance does
- Turning words into metadata filters
- Routing questions to different sources
- Chunking well-structured documentation
- Splitting a long table
- Chunking a code repository
- Favouring newer documents
- Reranking time for 100 candidates
- Using an LLM as a reranker
- What late chunking does
- Making nightly re-indexing cheaper
- Queries full of local acronyms
- Letting the model search again
- What context recall measures
- What context precision rewards
- Eval questions generated from chunks
- Judge prefers whichever answer is first
- Can you trust the LLM judge?
- Offline versus online RAG evaluation
- Small change, broken answers
- Adding up time to first token
- Trimming retrieved chunks
- Two sources that disagree
- Cost of one RAG answer
- A deletion request for indexed data
- Spotting gaps in the knowledge base
- The bot says "I don't know" too often
- Citations users can actually check
- Arabic question, English sources
- Measuring a support bot in production
- Building an eval set from logs
- Parameters in the embedding matrix
- Tying input and output embeddings
- Working out the head dimension
- Size of one attention score matrix
- Doubling context length
- Property of sinusoidal positions
- Limit of learned position embeddings
- How ALiBi encodes position
- Where cross-attention gets its inputs
- KV cache saving from GQA
- Multi-query versus grouped-query attention
- Computing an attention output
- Model paired with the wrong tokenizer
- Chat model given raw text
- Why LLMs stumble on arithmetic
- The space before a word
- What ## means in WordPiece
- How SentencePiece handles spaces
- Choosing a vocabulary size
- Causal mask filled with zeros
- Padding side for batched generation
- Monthly input-token bill in rupees
- Parameters in one transformer block
- Why the FFN hidden size is 11,008
- RMSNorm instead of LayerNorm
- Pre-norm versus post-norm blocks
- Turning a loss into perplexity
- Loss of an untrained model
- Compute-optimal training tokens
- Estimating training FLOPs
- Memory for full fine-tuning with Adam
- LoRA parameters for one 4,096 matrix
- What QLoRA quantises
- Which tokens get loss in SFT
- How DPO differs from PPO-based RLHF
- Why RLHF adds a KL penalty
- Active parameters in an MoE model
- Why MoE training needs load balancing
- What gradient checkpointing trades
- Why training starts with warmup
- Packing short examples into one sequence
- What tensor parallelism splits
- Counting tokens in the nucleus
- Probabilities after top-k
- Which tokens min-p keeps
- Beam search for open-ended chat
- Presence versus frequency penalty
- What limits prefill and decode speed
- Upper bound on decode speed
- What continuous batching improves
- What PagedAttention solves
- Reusing a long shared system prompt
- Memory for a 70B model at 4-bit
- How speculative decoding speeds things up
- Guaranteeing valid JSON output
- Banning a token with logit bias
- Different answers at temperature 0
- Sampling several reasoning paths
- Bigger batches on an LLM server
- Why step-by-step reasoning helps
- Why 4-bit weights speed up decoding
- What the KV cache saves
- Patch tokens in a 224 × 224 image
- Doubling image resolution
- How Whisper-style speech models work
- Positives and negatives in CLIP training
- Pooling a decoder model into one vector
- Reading predictions from middle layers
- One neuron, many unrelated concepts
- What sparse autoencoders find
- Injected instructions in a web page
- Why long contexts eat GPU memory
- Stuffing 100 chunks into the prompt
- What LoRA trains
- Shipping a prompt change safely
- Agent stuck in a loop
- Upgrading the embedding model
- What streaming improves
- Sizing the KV cache
- Why attention divides by sqrt(d_k)
- What the causal mask prevents
- Counting LoRA parameters
- Where generation time goes
- Estimating response time
- Temperature 0 is not deterministic
- Counting letters in a word
- Data leaking through image links
- A judge with 90% agreement
- Computing nDCG at 3
- Is a 4-point gain real
- When a tool call fails
- A suspicious third-party MCP server
- Budgeting the context window
- How speculative decoding helps
- Continuous batching in serving
- Serving a mixture-of-experts model
- How many results to rerank
- Adding BM25 and cosine scores
- Fine-tuned model scores too well
- Field order in an output schema
- One failure in Promise.all
- Jailbreaks spread across turns
- Ten steps at 95 percent each
- Reliability across three runs
- Tool call cut off mid-arguments
- Where to enforce a refund cap
- Three risky abilities together
- Cost of one agent task
- An MCP server that breaks on logs
- Trusting a readOnly hint
- A tool that changed after approval
- Calling tools from code
- Is multi-agent worth it
- Tests passed, says the agent
- Agent changes the tests instead
- Retries at three layers
- Cheaper per call or per success
- Passing the client token onward
- Users approving everything
- An agent with a shell tool
- Noise between repeated eval runs
- Testing an agent without live APIs
- Cache misses in an agent loop
- Debugging through a framework
- Input tokens across a long loop
- Savings from caching a long prefix
- A safety check without extra delay
- Personal data in agent memory
- Old memory, new address
- Pausing to check policy mid-task
- Screen clicking or an API
- Cutting cost on easy agent steps
- Starting tools before the model asks
- A subagent summary drops the key fact
- A support ticket that gives orders
- A rule forgotten after compaction
- Is the agent cheaper than staff
- Blocking a bad agent change
- An agent asking for full Drive access
- The same email sent three times
- What an approval prompt should show
- Traces full of customer data
- Agent drifts from the goal
- Fewer key-value heads
- Training data for a 70B model
- Estimating training compute
- Upper limit on tokens per second
- Calculating perplexity
- Odd replies from a self-hosted model
- A suspiciously high benchmark score
- Choosing a quantization level
- Different answers at the same settings
- A 1M-token window in practice
- Probability of a two-token label
- Weak replies in a regional language
- Tuned model became too wordy
- Why training uses bfloat16
- Training on its own outputs
- Entropy of a next-token choice
- Temperature and top-p together
- Schema mode still returned bad JSON
- Sampling ten code solutions
- Finishing a reply that was cut off
- The bot forgets its rules
- Summarise or cut old turns
- Showing text before checks finish
- Every request waits through retries
- A fallback model that misbehaves
- How many past turns fit
- Penalties that break JSON
- Night job slows the live app
- Billed for a request that timed out
- Answers cut after one paragraph
- First token on a 100k prompt
- Requests every eight minutes
- GPUs needed for peak traffic
- Latency for a voice assistant
- Is fine-tuning a small model worth it
- Failover that breaks residency rules
- Cheaper per token, but a bigger bill
- Input cost when most tokens are cached
- Testing a new model on live traffic
- Caching and time to first token
- Sending a backup request
- A new model that refuses too often
- Twenty reviews in one request
- Fast in testing, slow at launch
- The full cost of running your own
- IVF index after a new language
- A filter that matches 0.1% of data
- All similarity scores look high
- One similarity cut-off for all queries
- One chunk in every result list
- How many candidates to rescore
- Embeddings and negated statements
- Duplicates during contrastive training
- Hinglish queries in Latin script
- Inner product with unnormalised vectors
- Storage cost of token-level vectors
- Choosing a vector index configuration
- One vector for a 40-page PDF
- A billion vectors on a budget
- Top results are copies of one page
- Answer split across two chunks
- When HyDE makes retrieval worse
- Questions about the whole corpus
- Garbled chunks from two-column PDFs
- Cost of context notes per chunk
- Reranker misses facts at the end
- MMR set too far towards diversity
- Rewritten queries change the meaning
- Setting the balance in hybrid search
- A question that needs two hops
- Relative dates break extracted filters
- Re-runs create duplicate chunks
- Parent retrieval floods the prompt
- RAG gets totals wrong
- Generating questions for each chunk
- Moved teams, still sees old documents
- Leaking data through an image link
- Cached answers cross a permission line
- Perfect faithfulness, unhappy users
- Suspiciously high eval scores
- Whole corpus in context versus RAG
- A 4-point gain on 50 questions
- Cache serves an outdated policy
- False facts planted in a wiki
- Citations to chunks that do not exist
- Better offline, flat online
- Data that must stay in the country
- List questions return partial lists
- Faithful answer, wrong document
- Extending RoPE by position interpolation
- Why YaRN scales frequencies unevenly
- Decoder with no positional encoding
- Sliding cache that drops the first tokens
- Reach of sliding-window attention
- Subtracting the max in softmax
- NaNs from a fully masked row
- Tokens that make the model behave oddly
- Prompt that ends with a space
- Changing the number of heads
- Left padding with absolute positions
- Two BOS tokens at the start
- Broken characters while streaming
- What FSDP and ZeRO-3 shard
- Loss spike in a long training run
- RLHF model becomes wordy
- Raising beta in DPO
- Doubling LoRA rank with alpha fixed
- Merge or keep LoRA adapters separate
- Teaching new facts by fine-tuning
- Gradients vanish in fp16 training
- Running out of fresh training data
- Where to place tensor parallelism
- Reducing the pipeline bubble
- Token probabilities after RLHF
- Fine-tuned model never stops talking
- Training past compute-optimal
- Sizing GPUs for an MoE model
- Tokens gained per speculative step
- Greedy decoding stuck in a loop
- High temperature combined with top-p
- Outliers in int8 activation quantisation
- Switching the KV cache to FP8
- Field order in structured output
- Long prompts slowing other users
- JSON parse errors on long outputs
- Reasoning model for simple extraction
- Beam search prefers short outputs
- What induction heads do
- Using attention maps as explanations
- Ordering prompts for cache hits
- GPU at low utilisation during decoding
- Repetition penalty and generated code
- Passing the needle test is not enough
- Steering a model through its activations
- State-space models versus attention
- Why prompt injection is hard to fix
- Adding domain tokens to a tokenizer