{"id":77101,"plugin_id":"plugins_6ab42163e9048191ab6e8c14258a48c3","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-03T00:12:26.463Z","digest":"5e7404a987b7678abc783df7826d0870c093035605fcbccfcd47242bc258834f","against":null,"payload":{"description":"Improve RAG latency, throughput, token usage and cost without silently degrading correctness or security.","included_files":[],"name":"optimize-rag","skill_md_contents":"---\nname: optimize-rag\ndescription: Improve RAG latency, throughput, token usage and cost without silently degrading correctness or security.\n---\n\n\n# Optimize production RAG\n**Trigger:** High latency, high cost, throughput bottlenecks, context bloat, unnecessary reranking, index costs.\n\n1. Establish target SLO/budget and baseline by request slice. Measure p50/p95 stage times, throughput, total tokens and cost per successful answer.\n2. Attribute cost/latency by ingest/index, embedding, retrieval, rerank, context packing, generation, citation verification and retries.\n3. Change one or a small group of parameters per experiment; evaluate quality before/after on paired holdout and protected slices.\n4. Consider caching only with source version, ACL/tenant and invalidation; test for leakage. Compare top-k reduction, rerank batch sizes, compression, model choice and timeouts.\n5. Avoid optimizing average latency while harming tail latency, no-answer performance or correctness for low-frequency users.\n6. Provide ranked experiments with expected gain, quality/security risk, measurement and rollback triggers; don't invent costs or model pricing.\n\nRead `../../references/observability-slo.md` and `../../references/evaluation-metrics.md`.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}