Advanced RAG Patterns

Implement advanced RAG patterns for hybrid search retrieval quality.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/Renzo-Tognella/UniversalThingsForMyAgents --skill advanced-rag-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Advanced RAG Patterns
Source: https://github.com/Renzo-Tognella/UniversalThingsForMyAgents/tree/main/skills/22_advanced_rag_patterns
Command: npx skills add https://github.com/Renzo-Tognella/UniversalThingsForMyAgents --skill advanced-rag-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires LLM, hybrid_search, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps in improving the quality of retrieval, implementing self-reflective retrieval, query transformation, reranking, semantic caching, and choosing between RAG strategies for hybrid search.

Core Features & Use Cases

  • Enhanced Retrieval Quality: Implements advanced RAG patterns like Self-RAG, Corrective RAG, and Query Transformation.
  • Self-Reflective Retrieval: Evaluates the relevance and trustworthiness of retrieved information.
  • Query Transformation: Uses techniques like HyDE and Step-Back Prompting to improve query embeddings.
  • Reranking: Applies cross-encoder reranking for final ranking of search results.
  • Adaptive RAG: Selects the appropriate RAG strategy based on query complexity.

Quick Start

Use the advanced_rag_patterns skill to improve the retrieval quality of your hybrid search results.

Frequently Asked Questions about Advanced RAG Patterns

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

FAQPage Schema
How do I improve retrieval quality in my RAG pipeline?

To improve RAG retrieval quality, implement advanced patterns like Self-RAG, Corrective RAG, and cross-encoder reranking. These strategies evaluate result relevance and refine search outputs to enhance generation accuracy.

What is query transformation in RAG and how does HyDE work?

Query transformation in RAG improves query embeddings using techniques like HyDE and Step-Back Prompting. These methods reformulate user queries to retrieve more relevant information from your vector database before generation.

How do I implement self-reflective retrieval to evaluate trustworthiness?

Self-reflective retrieval evaluates the relevance and trustworthiness of retrieved information using patterns like Self-RAG and Corrective RAG. This ensures the generation step only uses verified and highly relevant context.

Can I use cross-encoder reranking with hybrid search results?

Cross-encoder reranking can be applied to hybrid search results for final ranking. This refines initially retrieved documents by accurately scoring semantic relevance before passing context to the LLM.

What's the best way to choose between different RAG strategies?

Adaptive RAG selects the appropriate strategy based on query complexity. It dynamically routes requests between simple retrieval and advanced patterns like Self-RAG or Query Transformation to optimize performance.

Do I need an LLM and hybrid search to implement semantic caching and reranking?

Implementing semantic caching, reranking, and advanced RAG patterns requires both LLM and hybrid search dependencies. The LLM handles query transformation and evaluation while hybrid search provides the initial document retrieval.