advanced-rag-pipelines

Installation
SKILL.md

Advanced RAG Pipelines (Production AI Data)


Mandatory Pre-Flight Context Inspection

Before building RAG pipelines or vector search components, you MUST inspect:

  1. Hybrid Search (RRF) → Combine Dense Vector Search with Sparse BM25 Search using Reciprocal Rank Fusion (RRF) to catch exact keyword matches (IDs, versions)
  2. Two-Stage Reranking Pipeline → Retrieve top ~50 candidate chunks, then rerank with a Cross-Encoder down to top 3-5 before feeding the LLM
  3. Vector Quantization & Indexing → Use HNSW indexes and halfvec (FP16) or scalar quantization in pgvector 0.8+ / Pinecone to reduce RAM by 50%
  4. Context XML Framing → Wrap retrieved chunks inside explicit <retrieved_context> XML tags in the prompt to prevent indirect prompt injection

Activation Boundaries

  • Activate when: Architecting RAG data pipelines, semantic chunking, vector embeddings, hybrid dense/sparse search, cross-encoder reranking, and vector database tuning.
  • DO NOT activate when: Writing pure transactional relational SQL without semantic search or basic prompt engineering.

2026 RAG Performance & Vector Invariants

Installs
2
GitHub Stars
7
First Seen
Jul 10, 2026