AIInterviewTraining logoAIInterview/Training

retrieval

AI, ML & GenAI interview questions tagged retrieval, across every topic.

51 questions · 5 unlocked for you

Concepts behind "retrieval"

The curriculum that explains the ideas these questions test.

Foundational
🧠 Foundations of LLMs & GenAI
EmbeddingsAn embedding maps text (or an image) to a dense vector so that semantic similarity turns into geometric closeness, similar meanings land near each other, measured by cosine similarity. Embeddings drive semantic search, retrieval, clustering, recommendation, and the vector index behind RAG. AI, ML, and GenAI engineer interviews probe them because they are the bridge between unstructured content and everything you can compute over it, and because their failure modes (domain mismatch, drift, the wrong similarity metric) quietly erode retrieval.
Foundational
🤖 Retrieval & Agents
The RAG PipelineRetrieval-Augmented Generation anchors an LLM in outside knowledge: when a query arrives you pull the most relevant chunks from a knowledge base into the prompt, letting the model respond from actual sources rather than memory. This is the go-to remedy for hallucination and outdated knowledge, and refreshing it needs no retraining. Its stages are ingest and chunk, embed and index, retrieve (frequently rerank), then generate with citations. AI, ML, and GenAI interviews test it because RAG is the most common production LLM architecture.
Core
🤖 Retrieval & AgentsSign in
Vector Search and ANN IndexesVector search locates the embeddings closest to a query vector. Exact nearest-neighbor runs O(n) per query and will not scale, so production relies on Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that give up a little recall for enormous speedups. In practice the hard parts are the recall-vs-latency-vs-memory trade-off, metadata filtering, and coping with updates. AI, ML, and GenAI interviews test it because it is the engine beneath RAG and semantic search, and how you tune it directly sets retrieval quality and cost.
Core
🤖 Retrieval & AgentsSign in
Choosing and Adapting Embedding ModelsChoosing an embedding model is a call about retrieval quality, cost, and operational risk on your own data, not about which model leads a public leaderboard. The hard parts are benchmarking against your own queries, weighing dimensionality against storage and latency, judging whether to fine-tune for your domain, and preparing for the re-embedding migration whenever the model changes. AI, ML, and GenAI interviews test it because candidates reach for the leaderboard winner and overlook the drift and migration costs that bite later.
Core
🤖 Retrieval & AgentsSign in
ChunkingChunking divides documents into the passages you embed and retrieve, and it ranks among the highest-leverage knobs in RAG. Make chunks too large and embeddings get diluted so retrieval turns imprecise; make them too small and chunks lose the context needed to answer. Past fixed-size splitting, structure-aware and semantic chunking hold coherent units together, while parent-child (small-to-big) retrieval matches on small chunks yet returns larger context. AI, ML, and GenAI interviews test it because weak chunking quietly caps retrieval quality.
Core
🤖 Retrieval & AgentsSign in
RerankingReranking is a two-stage retrieval design: a fast bi-encoder grabs a broad candidate set for recall, then a slower but more accurate cross-encoder rescores each (query, document) pair to reorder them for precision. The cross-encoder wins because it reads query and document jointly instead of as precomputed vectors. Reranking lets you hand the model fewer, better chunks, often the highest-ROI improvement to a RAG system. AI, ML, and GenAI interviews test it because it is the cheapest large win in retrieval quality.