rag-optimization

Optimize RAG pipeline retrieval, ranking, embedding, and vector-search parameters.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/rayvoidx/creator-onboarding-agent --skill rag-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-optimization
Source: https://github.com/rayvoidx/creator-onboarding-agent/tree/main/.claude/skills/rag-optimization
Command: npx skills add https://github.com/rayvoidx/creator-onboarding-agent --skill rag-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RAG pipelines can be brittle; this Skill helps adjust search weighting, reranking, query expansion, and cache strategies to improve relevance and reduce latency.

Core Features & Use Cases

  • Search optimization: balance vector/keyword/graph weights.
  • Re-ranking: adjust Cross-Encoder thresholds; Top-K results.
  • Query expansion: Multi-query expansion counts; variation quality.
  • Caching: assess semantic cache hit rates and invalidate when needed.

Quick Start

Tune the retrieval weights (set vector_weight=0.6, keyword_weight=0.4), enable query expansion (count=5), then run a sample RAG query to compare results.

Frequently Asked Questions about rag-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve RAG search quality and reduce response latency?

RAG optimization auto-adjusts retrieval, ranking, embedding, and vector-search stages to enhance relevance and speed. Configure hybrid weights (vector, keyword, graph), rerank thresholds, top-K results, query expansion counts, and semantic caching to balance precision against latency across document QA and knowledge-base search.

What's the best way to balance vector search, keyword search, and graph-based retrieval in RAG?

Hybrid weighting combines vector, keyword, and graph search by assigning configurable weights to each. This approach captures semantic similarity, exact matches, and relational context simultaneously, improving relevance when no single retrieval method alone covers all query intents.

How do query expansion and re-ranking improve RAG results?

Query expansion generates multiple reformulations of the original query to capture varied phrasings and intents. Re-ranking uses Cross-Encoder thresholds to filter and order results by confidence, removing low-relevance matches and surfacing the most precise answers from retrieved documents.

Can I use semantic caching to reduce redundant searches in RAG pipelines?

Semantic caching stores results for similar queries and reuses them when cache hit rates are high, reducing computation. The Skill monitors cache performance and supports invalidation to ensure stale or changed document content doesn't return outdated answers.

Does RAG optimization work with multi-source information retrieval and knowledge-base search?

Yes. The Skill applies to document QA, knowledge-base search, and multi-source information retrieval by tuning shared retrieval, ranking, embedding, and vector-search stages—the common infrastructure across these scenarios.

What parameters can I adjust to improve search relevance in document QA systems?

Tune vector weight, keyword weight, graph weight, rerank threshold, top-K result count, and query expansion count. Start with vector_weight=0.6, keyword_weight=0.4, then test expanded queries and re-ranking thresholds against your corpus to balance precision and recall.