SHEN YIFull-Stack & AI

Paris • Singapore • Shanghai

RAG Formation · Lesson · Reliability & product readiness

Failure isolation and graceful degradation

Decide what the system should do when Qdrant, Meilisearch, LightRAG, embeddings, or the LLM fails.

$ lesson --status
▸ course RAG Formation
▸ lesson 13 / 16
▸ phase Reliability & product readiness
▸ status Complete
● build → measure → learn

Standalone lesson

Learn the full lesson and test your understanding here.

The 16-lesson RAG Formation curriculum is complete. This page contains the complete lesson content, local reference material, and instant browser exercises.

Today’s tangible win

By the end of this lesson you’ll have a dependency failure matrix — one that draws a clean line between “safe to serve partially” and “must refuse outright.”

Watch the walkthrough

1 · The skill

Map out a failure matrix for Qdrant, Meilisearch, graph retrieval, embeddings, the completion call, and Redis.

  • Failure isolation: Stop one broken dependency from corrupting the whole request — or from getting quietly swept under the rug.
  • Graceful degradation: When it’s safe, hand back a result that’s honestly labeled as limited — vector-only search, say, instead of pretending you still have full hybrid coverage.
  • Fail closed: Say no outright when the missing piece means you can’t trust the evidence, or can’t verify who’s asking.

Primary reading: Twelve-Factor App — Disposability and Dependencies

2 · Run the evidence loop

cd demo
python3 setup_demo.py status

For every dependency, write down what the failure looks like, the safe fallback, what gets blocked, the message the user sees, and the metric to watch.

An answer that still looks perfectly normal after you’ve lost the evidence behind it isn’t graceful degradation — it’s just unsafe.

3 · Decision worksheet

Baseline evidenceOne hypothesis/changeMetricRegression checkBounded conclusion
_________________________

4 · Retrieval practice

Question: The LLM just went down. What’s the safe response?

Mission connection

Things break in production — that part’s not up for debate. What separates a reliable chatbot is whether it owns up to it: staying honest about reduced capability instead of quietly handing back an answer that looks fine but has nothing solid behind it.

5 · Deliverable and next action

  1. Save the command output, or a short write-up of it.
  2. Fill out the decision worksheet.
  3. Write down one failure case and the next check you’d run.

A dependency failure matrix that draws a clean line between safe partial service and fail-closed behavior.

Next: Lesson 14 — Latency, cost, and observability.

Ask me follow-up questions about the evidence, the metric, the failure case, or what to try next — I’m your instructor for this course.