RAG (Retrieval-Augmented Generation)
rag
Practice Problems
RAG Chunk Eligibility
Return the first reason a retrieved chunk is excluded for a user (tenant, deletion, publication state, revision, or department), or null when the chunk is eligible.
AI Engineering
Choose long context or retrieval
Compare sending whole documents in a large context window with retrieving a few passages for two features of one product, using window fit, cost with prefix caching, latency, access, and a sliced pilot, and say what would change each choice.
Explain retrieval vs. generation
Explain how documents become evidence for a generated answer, and why an answer can be wrong even when it cites a real document.
Retrieve evidence for a follow-up question
Turn a follow-up message into a standalone retrieval query, keep access filters tied to the signed-in session on every turn, and decide which turns should not retrieve at all.
Diagnose a missing document
Trace a missing policy exception through ingestion, eligibility, and context packing without weakening access rules.
Design a cited support assistant with measurable quality
Design a support assistant that answers from help articles with citations the customer may see, or hands off to a human. Turn its requirements into metrics, plan its evaluation set, keep it fresh through updates and deletion, and check its token, cost, and latency budgets.
Design multi-tenant RAG with deletion
Design a private multi-tenant policy assistant whose answers and citations stay correct through asynchronous updates, retries, permission changes, and deletion.
Debug a partially failed re-embedding backfill
Find why a partly failed re-embedding backfill left a help-center index missing, duplicating, and mixing vectors, then plan a repair and a cutover gate you could defend in a release review.
Separate retrieval, packing, and generation failures
Use a request trace to tell retrieval, context-packing, and generation failures apart, and report answer quality with a named denominator next to operational signals.
Decide whether to fine-tune
Decide whether a feedback assistant's failures call for prompting, retrieval, or fine-tuning, and explain the reviewed data, grouped split, and baseline comparison that fine-tuning would need.
