rag
AI, ML & GenAI interview questions tagged rag, across every topic.
57 questions · 8 unlocked for you
Concepts behind "rag"
The curriculum that explains the ideas these questions test.
Foundational
The Context WindowThe context window is the largest number of tokens a model can attend to at once, prompt plus generation. It is capped by attention's quadratic cost, the KV cache's linear memory growth, and the length the model trained on. A bigger window is neither free nor uniformly useful (models lose information in the middle), which is why retrieval often beats cramming everything into context. AI, ML, and GenAI engineer interviews probe it because it drives cost, latency, and the RAG-vs-long-context decision.🧠 Foundations of LLMs & GenAI
Foundational
HallucinationA hallucination is fluent, confident output that is wrong or unsupported. It arises because a language model is trained to produce plausible continuations, not to know what it knows; it has no built-in truth check. You reduce it with grounding (RAG), letting the model abstain, low temperature on factual tasks, and verification, and you detect it with faithfulness checks against sources. AI, ML, and GenAI engineer interviews probe it because hallucination is the number-one reason LLM features fail in production, and because the fix is system design, not a magic prompt.🧠 Foundations of LLMs & GenAI
Foundational
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.🤖 Retrieval & Agents
Foundational
Citations and GroundingGrounding means the model answers only from supplied sources; citations make each claim traceable to the exact passage backing it. Together they form RAG's trust mechanism: they let users verify, let you catch hallucination (an uncited or unsupported claim is a red flag), and are required in high-stakes domains. Applied-AI interviews cover it because 'it gave a great answer' means nothing if you cannot tell whether it is true, and citations are how production AI earns trust.🤖 Retrieval & Agents
Foundational
RAG EvaluationEvaluating a RAG system means scoring retrieval and generation separately, because a bad answer is usually a retrieval failure (the right context was never fetched) and you cannot fix what you cannot localize. Retrieval gets scored with recall@k (the ceiling for the whole system), precision, and rank metrics; generation gets scored for faithfulness (is each claim supported by the context?) and answer quality. AI, ML, and GenAI engineer interviews probe it because measuring RAG end-to-end, and knowing which half failed, is the core debugging skill.📊 Evaluation & ML Foundations
Core
Prompting vs RAG vs Fine-TuningGiven an LLM use case, the senior move is matching the technique to what is missing rather than defaulting to one. Need external or changing knowledge? RAG. Need a specific behavior, format, or skill? Fine-tuning. Need to take actions or use live systems? Tools/agents. Just need better instructions? Prompting. They combine, and you escalate from cheapest (prompting) to most involved (fine-tuning). AI, ML, and GenAI engineer interviews probe it because choosing wrong wastes months, fine-tuning to inject changing facts is the classic mistake.🧠 Foundations of LLMs & GenAISign in
