RAG for Everyone

← Back to exercises

Chapter 2 Practice Bank35 min practice

Practice Bank: The RAG Query Lifecycle

Each scenario asks you to map the lifecycle like a production engineer: route the request, retrieve the right evidence, protect access, generate safely, and log enough to debug.

Product Scenarios

Scenario 1

HR Leave Policy

An employee asks about parental leave after moving from the US to Germany.

Scenario 2

Customer Refund Bot

Refund eligibility depends on product tier, country, purchase date, and policy version.

Scenario 3

Contract Assistant

A PM asks whether a customer contract allows model-output logging.

Scenario 4

Sales Enablement

A seller asks if they can promise a restricted enterprise discount.

Scenario 5

Healthcare Demo

A clinician asks whether real patient data can be used in a product demo.

Scenario 6

Finance Compliance

An analyst asks whether account identifiers can be included in a report.

Platform Scenarios

Scenario 7

Security Runbook

An engineer asks what to do when a production API key is leaked.

Scenario 8

Developer Docs

A developer asks why a deployment failed after a new environment variable.

Failure Cases

Scenario 9

Stale Policy

The assistant answers from last quarter's policy after the index missed a new upload.

Scenario 10

Wrong Reranking

Hybrid search retrieves the right document, but reranking pushes it below the context cutoff.

Scenario 11

Access-Control Leak

Retrieved context includes a confidential clause the user should not see.

Scenario 12

Multi-Hop Question

The answer needs both the incident runbook and customer communication template.

1 Production judgment task

Pick four scenarios. For each, write lifecycle map, logs, metric, refusal rule, and first engineering experiment.

← ExercisesInterview Questions →