بنقرة واحدة
optimize-retrieval-latency
Reduce retrieval latency with caching, batching, and index-level optimization.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Reduce retrieval latency with caching, batching, and index-level optimization.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use this skill when building, debugging, or improving Retrieval-Augmented Generation systems, including chunking, vector database selection, hybrid search, reranking, multimodal RAG, code documentation RAG, retrieval latency, and production RAG architecture.
Chunk nested documents into parent-child levels so retrieval can move from broad sections to fine-grained passages.
Use semantic boundaries and embedding similarity to chunk text for higher-relevance retrieval.
Route RAG chunking decisions across semantic, hierarchical, sliding-window, contextual-header, and framework-selection strategies.
Use overlapping windows to preserve context across chunk boundaries while controlling retrieval size.
Route RAG performance work for latency, caching, indexing, filtering, batching, and query optimization.
| name | optimize-retrieval-latency |
| title | Optimize Retrieval Latency |
| description | Reduce retrieval latency with caching, batching, and index-level optimization. |
| allowed-tools | ["Read","Grep","Glob","Bash"] |
| category | performance-optimization |
| tags | ["latency","performance","caching","indexing","optimization"] |
Optimizing RAG retrieval latency is critical for production applications where user experience depends on fast response times. This skill covers techniques to reduce query latency at every stage: indexing, embedding generation, search execution, and result processing.
RAG systems often have latency issues:
Establish baseline measurements before optimization.
Why: You can't optimize what you don't measure. Profiling reveals the actual bottlenecks rather than assumptions.
Reduce the overhead of generating query embeddings.
Why: Embedding generation is often the bottleneck - caching reduces this overhead for repeated queries.
Tune indexing and search parameters for latency.
Why: Index parameters directly impact search latency, lower ef values reduce search time at the cost of recall.
Cache at multiple levels to reduce redundant work.
Why: Multi-level caching reduces computation for repeated queries without sacrificing freshness for unique queries.
Stream results and minimize post-processing overhead.
Why: Streaming reduces memory usage and allows users to see results sooner, improving perceived latency.
Prioritize and batch queries for better resource utilization.
Why: Query prioritization ensures important queries get resources first and reduces contention.
Useful references include the Qdrant production guide, Qdrant snapshots concept, ANN Benchmarks, and AWS caching best practices.