AI & Generative AI interview questions and quick answers
LLMs, tokens, embeddings, RAG and prompt engineering, the questions every AI role now asks.
Review 985 questions and short answers on AI & Generative AI. Start with real examples below, then search, practise and follow links to full explanations.
AI & Generative AI: questions worth revising first
These answers come from AI Tapri's existing question bank and published interview guides. Open each answer and read the linked in-depth guide for examples and context.
01Why do vector databases use approximate nearest neighbour search instead of exact search?
Exact search compares the query with every vector, which gets too slow for millions of items. Approximate nearest neighbour indexes such as graph or clustering structures check only a small part of the data and usually return the same top results, trading a little recall for large speed gains.
Read the full explanation02Why does attention cost grow quickly as the input gets longer?
Every token is compared with every other token, so the number of comparisons grows with the square of the sequence length. Doubling the input roughly quadruples the attention work and memory, which makes very long contexts expensive.
Read the full explanation03What is the difference between a base model and an instruction-tuned model?
A base model is trained only to continue text, so it may ramble or continue your question with more questions. An instruction-tuned model is further trained on examples of instructions and good answers, so it follows requests and replies helpfully.
Read the full explanation04What is the difference between a bi-encoder and a cross-encoder?
A bi-encoder embeds the query and each document separately, so document vectors can be precomputed and searched fast. A cross-encoder reads query and document together for a more accurate score, but must run for every pair, so it is used on a short candidate list.
Read the full explanation05Why are BLEU and ROUGE poor metrics for judging LLM answers?
They measure word overlap with a reference text. A correct answer worded differently scores low, while a fluent wrong answer sharing many words can score high. They suit narrow tasks like translation drafts, but not open-ended answer quality.
Read the full explanation06How does subword tokenization such as byte pair encoding work?
Byte pair encoding starts from small units like characters or bytes and repeatedly merges the most frequent adjacent pair into a new token, until a target vocabulary size is reached. Common words become single tokens, rare words split into pieces.
Read the full explanation07How would you explain "Why do vector databases use approximate nearest neighbour search instead of exact search" in an interview?
"Exact nearest neighbour is linear in collection size. ANN indexes trade a small recall loss for much lower latency. I would use exact search for small corpora and tune ANN parameters against measured recall when it grows."
Read the full explanation08What core principle about "Why do vector databases use approximate nearest neighbour search instead of exact search" can you explain briefly?
To find the closest tea stall to you in a big city, you would not measure the distance to every stall.
Read the full explanationFind your next answer.
Pick a topic, search a keyword, or open a question to reveal the answer.
AI & Generative AI quick answers
Free to practise. No account needed. Made for quick revision, not rote memorisation.
Keep preparing for AI & Generative AI
Quick answers help with recall; detailed guides explain the reasoning, examples and common mistakes behind each answer.