S
Saurav Danej
90-Day AI/ML LinkedIn Content System
← All days
70
Day 70 of 90RAG

Production RAG checklist + week 10 wrap

POST 1 of 5 MorningRAGChecklist

Production RAG checklist — 12 items

Before shipping a RAG to users, tick every box:

1. Chunk size + overlap tuned
2. Metadata on every chunk
3. Hybrid (vector + BM25) retrieval
4. Reranker in stage 2
5. Query rewrite (or HyDE) when relevant
6. Citations always shown
7. 'I don't know' escape in prompt
8. Eval set with ragas / TruLens
9. p99 latency budget set
10. Cost per query measured
11. Tool-call cap (if agentic)
12. Embedding model + version pinned

Most teams ship after 3 of these. The other 9 are why their RAG 'feels off'.
#RAG#LLM#AI#VectorSearch#100DaysOfCode#RAGProduction
POST 2 of 5 MiddayRAGDeep dive

Cost & latency budgets — the real constraints

Per-query budgets I aim for in 2026:

- p99 latency: 1.5s for chat, 5s for research mode
- Cost: ≤ $0.005 / query at average load
- Embedding: ≤ 50ms
- Retrieval (hybrid + rerank): ≤ 200ms
- LLM: ≤ 1s

If you blow these, optimise in this order:
1. Cache (rewrites, retrieval, answers)
2. Smaller LLM (gpt-4o-mini, claude-haiku)
3. Smaller embedding (384 dim)
4. Skip the reranker for easy queries

Measure first. Optimise once.
#RAG#LLM#AI#VectorSearch#100DaysOfCode#MLOps
POST 3 of 5 AfternoonRAGCode

Trace every RAG call — the one log line that matters

One log line per query. Query, top retrieved IDs + scores, rewritten query, prompt token count, model, latency, answer length. Push to a structured store.

This log is what differentiates ML team from prod team. With it, you can answer 'why did this answer go wrong' in 30 seconds. Without it, you can only re-run.
#RAG#LLM#AI#VectorSearch#100DaysOfCode#Observability
POST 4 of 5 EveningRAGTip

Cache aggressively. Then cache more.

Caches that pay for themselves in days:

1. Query → rewritten query (LRU, TTL=1d)
2. Query hash → retrieved chunk IDs (LRU, TTL=1h)
3. Final answer (LRU, TTL=1h, only if exact query match)

Cache invalidation is the hard part. When docs change, invalidate retrieval + answer caches by version tag.

A well-cached RAG can serve 50-90% of queries from cache. Effective cost drops by an order of magnitude.
#RAG#LLM#AI#VectorSearch#100DaysOfCode#Caching
POST 5 of 5 NightCareerRecap

Week 10 done — production RAG

Week 10 done. 70 days, 350 posts in.

This week:
- Hybrid (BM25 + dense)
- Rerankers — 2-stage retrieve
- Query rewriting + HyDE
- Multi-step retrieval
- Agentic RAG
- GraphRAG
- Production checklist

Next week: agents. ReAct, tool use, planning, multi-agent. The next layer of LLM apps.
#RAG#LLM#AI#VectorSearch#100DaysOfCode#90DaysOfAI