179 questions
No questions match those filters.
How would you make a Retrieval‑Augmented Generation (RA...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansWhen designing a RAG pipeline that can refuse to answer, you should enumerate multiple safeguards rather than a single trick. First, similarity‑based retrieval may return documents that are topically related but contain no answer, leading the generator to hallucinate; detecting this mismatch lets the system say “I don’t know.” Second, using raw log‑probability of the generated token sequence can be skewed by formatting cues (e.g., bullet points) that inflate confidence even when the content is unsupported, so a threshold on normalized log‑probability can trigger a refusal. Third, applying self‑consistency—asking the model to generate multiple answers and checking agreement—can compound a confident error; low agreement can be used as a signal to abstain. Pair each mechanism with the type of query it mishandles to show nuanced understanding.