AppliedAIPrep logoAppliedAI/Prep

retrieval

Applied AI interview questions tagged retrieval, across every topic.

47 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 becomes geometric closeness, similar meanings land near each other, measured by cosine similarity. Embeddings power semantic search, retrieval, clustering, recommendation, and the vector index behind RAG. Applied-AI 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 degrade retrieval.
Foundational
🤖 Retrieval & Agents
The RAG PipelineRetrieval-Augmented Generation grounds an LLM in external knowledge: at query time you retrieve the most relevant chunks from a knowledge base and put them in the prompt, so the model answers from real sources instead of memory. It is the default fix for hallucination and stale knowledge, and it updates without retraining. The pipeline is ingest and chunk, embed and index, retrieve (often rerank), then generate with citations. Applied-AI interviews probe it because RAG is the modal production LLM architecture.
Core
🤖 Retrieval & AgentsSign in
Vector Search and ANN IndexesVector search finds the embeddings nearest to a query vector. Exact nearest-neighbor is O(n) per query and does not scale, so production uses Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that trade a little recall for massive speedups. The real-world challenges are the recall-vs-latency-vs-memory trade-off, metadata filtering, and handling updates. Applied-AI interviews probe it because it is the engine under RAG and semantic search, and its tuning directly sets retrieval quality and cost.
Core
🤖 Retrieval & AgentsSign in
Choosing and Adapting Embedding ModelsPicking an embedding model is a decision about retrieval quality, cost, and operational risk on your data, not about who tops a public leaderboard. The hard parts are benchmarking on your own queries, trading dimensionality against storage and latency, deciding whether to fine-tune for your domain, and planning for the re-embedding migration when the model changes. Applied AI interviews probe it because candidates default to the leaderboard winner and ignore the drift and migration costs that bite later.
Core
🤖 Retrieval & AgentsSign in
ChunkingChunking splits documents into the passages you embed and retrieve, and it is one of the highest-leverage knobs in RAG. Too large and embeddings are diluted so retrieval is imprecise; too small and chunks lose the context needed to answer. Beyond fixed-size splitting, structure-aware and semantic chunking keep coherent units intact, and parent-child (small-to-big) retrieval matches on small chunks but returns larger context. Applied-AI interviews probe it because poor chunking silently caps retrieval quality.
Core
🤖 Retrieval & AgentsSign in
RerankingReranking is a two-stage retrieval design: a fast bi-encoder fetches a broad candidate set for recall, then a slower but more accurate cross-encoder rescoring each (query, document) pair reorders them for precision. The cross-encoder is better because it reads query and document together rather than as precomputed vectors. Reranking lets you feed fewer, better chunks to the model, often the highest-ROI improvement to a RAG system. Applied-AI interviews probe it because it is the cheapest large win in retrieval quality.