Stage 6 · Semantic Caching & Tiered Cascading Model Routing FinOps Pattern
Production LLM FinOps architecture stacking tenant-scoped exact + semantic vector caching ahead of a complexity/confidence-gated cascading router that resolves simple traffic on fast SLMs and escalates hard edge cases to frontier models.
Best For
High-QPS customer support, multi-intent copilots, and enterprise search portals where 30-60% of queries are routine and strict token budgets apply.
Human-AI Boundary
High-stakes compliance tasks or explicit 'Deep Mode' user toggles bypass semantic caching and SLM downgrades, pinning directly to verified frontier routes.
Anti-Patterns to Avoid
- Sharing a global semantic cache across tenants or ACL groups without tenant_id + acl_hash pre-filtering (causes catastrophic cross-tenant data leakage)
- Using raw cosine similarity > 0.90 blindly on negated/numeric queries ('refund policy for $50' vs '$500' or 'is X allowed' vs 'is X not allowed')
Latency/Cost Profile & Eval Metrics
Semantic cache hit < 35ms; SLM fast-path < 350ms; frontier cascade escalation < 2.4s · Embedding lookup + lightweight router classifier vs 40-70% reduction in frontier model token spend
- Blended Cost per Successful Resolution & Quality Parity: >= 45% token cost reduction at <= 1.5% quality delta vs always-frontier baseline (Measure Cost-Quality Pareto frontier across routing threshold sweep on Stage 5 golden benchmark)
- Semantic Cache False-Hit Rate: < 0.2% false cache hits across adversarial paraphrase + negation test pairs (Audit sampled cache hits weekly with LLM-as-a-Judge equivalence verification)
💰 Business ROI Model & Evidence Level
production_practice🏗️ End-to-End Architecture Pipeline
Filter cache lookups strictly by `(tenant_id, acl_hash, prompt_version)` and verify numeric/negation parity before serving a cached completion.
Score query complexity, required tool depth, and tenant quota posture to route routine tasks to 8B SLMs and multi-hop reasoning to frontier models.
If the fast tier fails schema validation or confidence scoring, silently escalate to the frontier tier and log per-tenant marginal cost telemetry.
🚨 Production Failure Modes & Signatures
- Prompt template or knowledge-base version bump without cache key invalidation serving outdated pre-update answers
- Cascading escalation loop doubling latency and paying twice when router threshold is poorly calibrated on hard domain queries
🎤 Interview Defense & System Design Deep-Dive Q&A
- How do you prevent cross-tenant data leakage and negation/number mismatches ('5 days' vs '50 days') in a production semantic cache?
- When does cascading routing (SLM -> Frontier fallback) actually cost MORE or hurt p95 TTFT compared to an upfront classifier router?
Bidirectional Taxonomy Links
Internal Tools & Primary Sources
- LMSYS RouteLLM — Learning to Route LLMs with Preference Data (official_docs, 2026-11-30)
- FrugalGPT — How to Use Large Language Models While Reducing Cost and Improving Performance (paper, 2026-11-30)