Interview Q&A / AI & Generative AI
AI & Generative AI interview questions
LLMs, tokens, embeddings, RAG and prompt engineering, the questions every AI role now asks.
Prefer rapid revision? Practise AI & Generative AI short interview answers →
- What are embeddings, and how is vector similarity used to compare text?
An embedding is a list of numbers that represents the meaning of a piece of text, so texts with similar meaning get vectors that point in similar directions. Similarity measures such as cosine similarity compare these vectors to find related text.
IntermediateIn-depth3 min read - What do temperature and top-p control in an LLM?
Both control how the next token is picked from the model's probabilities. Temperature sharpens or flattens the probabilities (low means predictable, high means varied), and top-p limits sampling to the smallest set of tokens whose probabilities add up to p.
IntermediateIn-depth3 min read - What is retrieval-augmented generation (RAG), and when would you use it?
RAG first retrieves relevant passages from your own data, then gives them to the LLM along with the question so it answers from that material. Use it when answers must come from private, large or frequently changing information the model was not trained on.
IntermediateIn-depth3 min read