Wrap-Up
Interview Tips
Open with the evidence contract:
“I would separate document preparation from question answering. Every answer must use current, permitted, applicable evidence. I would start with a simple read-only RAG workflow, validate source references, and buffer responses for a final authorization check.”
Then drive the interview toward the difficult parts rather than listing model vendors.
| Time in a 40-minute round | Focus |
|---|---|
| First 5 minutes | Scope, caller identity, supported questions, confidentiality |
| Next 5 minutes | Traffic, tokens, storage, and provider quota arithmetic |
| Next 10 minutes | Ingestion path and the first complete answer path |
| Next 15 minutes | Retrieval quality, atomic version activation, and release authorization |
| Final 5 minutes | Outages, evaluation, cost, and trade-offs |
Useful talking points:
- A vector database is optional. Retrieval can begin with keyword search or database vector support.
- RAG is not training. Current policy arrives as evidence during inference.
- Access is not a prompt instruction. The retrieval and release boundaries enforce it.
- Citations are not proof by themselves. Check actual source support.
- Average QPS hides model capacity. Include tokens and in-flight requests.
- A cache is another evidence consumer. Reuse needs current dependencies.
- Do not add an agent to a fixed workflow. This case has no autonomous write task.
Resiliency
| Failure | Protection | User-visible behavior |
|---|---|---|
| Application instance crash | Stateless API tier and durable request state | Retry/reconcile the same logical request |
| Worker crash | Durable queue, lease, deterministic IDs | Processing resumes or reports failure |
| Database/queue dual-write gap | Transactional outbox | Accepted upload is not silently lost |
| Poison document | Bounded retries and dead-letter handling | Administrator sees a failed job |
| Authorization authority unavailable | Fail closed | Explicit temporary error |
| Model rate limit/outage | Admission limits, bounded retries, circuit breaker | Clear retryable service error |
| Source changed during generation | Final consistent source check | No stale answer release from that snapshot |
| Search copy lags | Authoritative source eligibility check | Skip old data or report not-ready state |
| Optional cache unavailable | Run normal path within capacity limits | Slower response or explicit overload |
Avoid “fallbacks” that invent policy answers. An approved alternate model must pass quality and data-handling requirements before it becomes an outage path.
Disaster Recovery
- Back up authoritative metadata and original files with tested restoration.
- Preserve compatible source versions and preparation configurations.
- Search indexes can be rebuilt from originals and version metadata, but rebuilding takes time and embedding capacity.
- Keep authorization and deletion state authoritative during recovery; do not restore an old index and serve it without current eligibility checks.
- Define recovery point and recovery time objectives with the business. Backups and replication do not eliminate every data-loss scenario.
Observability
Service-Level Indicators
- Eligible-request completion within the 12-second deadline.
- p50/p99 time to validated answer.
- Model and embedding quota utilization.
- Source preparation/activation lag.
- Provider failure, refusal, and incomplete-output rates.
- Source-change and final-authorization rejection rates.
- Cost per successful task, including failed attempts.
Quality Indicators
- Sufficient-evidence recall by question slice.
- Correctness and support on reviewed samples.
- Citation accuracy and coverage.
- Unnecessary refusal and clarification rates.
- Cross-tenant/forbidden-source test failures as release blockers.
Do not treat a low HTTP error rate as answer correctness. A 200 response with an invented policy is still a product failure.
Tracing and Safe Logging
Propagate a request ID through admission, retrieval, generation, and validation. Record versions, timings, usage, safe source identifiers, and reason codes.
Do not put unrestricted prompts, source excerpts, employee details, or raw conversation content into default logs. Restrict trace access, bound retention, and avoid sensitive/high-cardinality metric labels.
Alerts
| Signal | Possible explanation |
|---|---|
| Empty evidence rises | Ingestion breakage, filter bug, or new unsupported questions |
| Active-version mismatch rises | Search lag or lifecycle regression |
| Provider retries rise | Quota pressure or outage |
| Input tokens rise | Redundant retrieval or history growth |
| Validation errors rise after release | Prompt/schema/model incompatibility |
| Contractor slice quality falls | Applicability or retrieval regression |
Concepts Used
- LLM fundamentals: fluent output is not evidence.
- Tokens and context: explicit input/output budgets.
- Prompt design: typed response states and validation.
- Embeddings and vector search: compatible representation and measured indexes.
- RAG: external evidence at request time.
- Ingestion and freshness: versioned preparation and retirement.
- Prompting vs tuning: choose the lever matching the failure.
- Evaluation: component metrics and release gates.
- Safety: independent authorization and data minimization.
- Serving: quotas, latency, cost, and buffering.
- Idempotency, outbox, and retry handling: durable processing.
Final Trade-offs
| Decision | Why chosen | What we give up |
|---|---|---|
| Read-only fixed workflow | Smaller, testable control surface | Autonomous task execution |
| Existing database plus search indexes | Fewer synchronization boundaries | Potential shared-resource contention |
| Immutable versions and activation | Complete reader-visible evidence | Extra storage and lifecycle work |
| Authoritative access checks | Defined revocation semantics | Availability depends on authorization |
| Buffered answer release | Final output/source checks | Immediate answer-token streaming |
| No answer cache initially | Simpler correctness baseline | Higher model-call volume |
| Managed model initially if compliant | Lower initial serving ownership | Provider dependency and quota constraints |
Test Your Understanding
These questions combine architecture, arithmetic, and failure reasoning. Try drawing the relevant request or lifecycle timeline before expanding the answer.
- Why does this design have separate ingestion and question paths?
- How do 20,000 daily users produce the 30-QPS peak estimate?
- Why is five million vectors not automatically a sharding requirement?
- Does 15.36 GB describe total database storage?
- Why does 30 requests/s also require a token-quota estimate?
- What is the assumed average number of in-flight requests at peak?
- The upload returns 202. Can the employee immediately rely on the policy being searchable?
- What prevents a database write succeeding while its queue event is lost?
- Why cannot a delayed version-2 worker replace active version 3?
- Can physical index cleanup be asynchronous after deletion?
- Why is a copied ACL in the vector index insufficient?
- A permission is revoked during model generation. What happens?
- What if revocation occurs after the final authorization snapshot?
- Why buffer answer text instead of streaming immediately?
- Can the UI still show progress while buffering?
- The model cites a real document but invents a carryover rule. Which checks matter?
- Why return a service error rather than unsupported during a provider outage?
422 provider_refused, not unsupported and not 503, when it arrives before the deadline. A timely 409 source_changed is a valid consistency result and does not count against availability; a timeout during that recheck does.