rag-engineer

Implements hybrid RAG pipelines with semantic chunking, reranking, and GraphRAG knowledge graphs.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/nperepichka/Antigravity --skill rag-engineer-nperepichka
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rag-engineer
Source: https://github.com/nperepichka/Antigravity/tree/main/config/skills/rag-engineer
Command: npx skills add https://github.com/nperepichka/Antigravity --skill rag-engineer-nperepichka

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pydantic.

What problem does it solve? Retrieval-Augmented Generation systems often fail in production due to poor chunking, missed exact-match terms, and hallucinated answers when retrieval returns weak context. This Skill provides engineering patterns for building RAG and GraphRAG pipelines with measurable retrieval precision and grounded generation. ## Core Features & Use Cases - Semantic Chunking & Hybrid Search: Split documents on structural boundaries and combine dense vector search with BM25 using Reciprocal Rank Fusion. - Two-Stage Retrieval with Reranking: Retrieve a high-recall candidate pool, then apply a Cross-Encoder reranker to select the highest-precision chunks for the prompt. - GraphRAG Knowledge Graphs: Extract entity-relationship triplets with Pydantic schemas, build hierarchical community summaries, and route local versus global queries. - Use Case: When building a document Q&A system over a technical knowledge base, use this Skill to design the ingestion pipeline, hybrid retrieval with reranking, and RAGAS-based evaluation of faithfulness and context precision. ## Quick Start Use the rag-engineer skill to design a hybrid search and reranking pipeline for my document Q&A system.

Frequently Asked Questions about rag-engineer

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

FAQPage Schema
How do I combine BM25 and vector search in a RAG pipeline?▼

Combine BM25 and dense vector search using Reciprocal Rank Fusion, which sums 1/(k + rank) scores from both rankings without needing score normalization. Retrieve top candidates from each method, fuse the rankings, then rerank with a Cross-Encoder.

What is the best chunking strategy for RAG documents?▼

Semantic chunking that splits on structural boundaries like Markdown headers outperforms fixed token-length splitting, which can cut sentences and code mid-way. Preserve section headers in chunk metadata so retrieved context retains its document hierarchy.

When should I use GraphRAG instead of standard vector search?▼

Use GraphRAG for global, multi-hop, or relationship-dense queries where vector search fails, such as questions spanning many documents. It extracts entity-relationship triplets into a knowledge graph and uses community summaries for broad thematic synthesis.

Why does vector search miss exact terms like error codes or product IDs?▼

Dense embeddings capture semantic similarity but fail on exact keyword matches like UUIDs, SKUs, and acronyms. The solution is hybrid search combining sparse BM25 lexical retrieval with dense vectors, fused via Reciprocal Rank Fusion.

How do I prevent hallucination when retrieval returns no relevant context?▼

Set a strict similarity threshold on retrieved chunks and instruct the model to respond with insufficient context when nothing passes. Measure faithfulness with RAGAS to verify generated claims trace back to retrieved context.

How do I evaluate RAG pipeline quality with RAGAS?▼

RAGAS evaluates retrieval and generation separately using four metrics: context precision, context recall, faithfulness, and answer relevance. Benchmark retrieval independently from LLM answer quality so you can isolate whether failures come from retrieval or generation.