rag

Build retrieval-augmented generation pipelines with hybrid search and reranking.

26|8|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/arbazkhan971/godmode --skill rag-arbazkhan971
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag
Source: https://github.com/arbazkhan971/godmode/tree/main/skills/rag
Command: npx skills add https://github.com/arbazkhan971/godmode --skill rag-arbazkhan971

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a prescriptive, production-ready recipe to design, build, evaluate, and operate retrieval-augmented generation systems so models answer from authoritative sources with low hallucination and measurable recall.

Core Features & Use Cases

  • Embedding & Vector Store Guidance: recommends embedding models and vector store topology based on budget and scale.
  • Chunking & Ingestion: outlines chunking strategies, loaders, and pipelines for PDFs, HTML, and code with overlap and parsing guidance.
  • Retrieval, Reranking & Hybrid Search: prescribes hybrid dense+sparse search, top-k selection, and cross-encoder reranking to improve precision.
  • Evaluation & Safety: defines metrics (Recall@K, MRR, faithfulness, hallucination rate), hard rules, stop conditions, TSV logging, and rollback behavior for autonomous runs.
  • Use Case: implement a Q&A or support bot over product docs, codebases, or institutional archives that must minimize hallucination while keeping latency acceptable.

Quick Start

Ask the rag skill to build a retrieval-augmented Q&A over the product documentation and measure recall and hallucination metrics.

Frequently Asked Questions about rag

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

FAQPage Schema
How do I build a retrieval-augmented generation pipeline to answer questions from my PDFs?

To build a retrieval-augmented generation pipeline, apply chunking strategies with overlap for PDF parsing, select an embedding model, and use hybrid dense and sparse retrieval to extract relevant document sections before generating answers.

What is the best way to minimize LLM hallucination in a knowledge base Q&A bot?

To minimize LLM hallucination in a knowledge base Q&A bot, use retrieval-augmented generation with cross-encoder reranking, enforce hard operational rules, and measure faithfulness and hallucination rate metrics during evaluation to ensure answers remain grounded in authoritative sources.

How does hybrid vector search and reranking improve retrieval precision for enterprise documents?

Hybrid vector search improves retrieval precision by combining dense and sparse retrieval methods to capture semantic and keyword matches, while cross-encoder reranking reorders top-k results to elevate the most contextually relevant documents for the query.

How do I evaluate retrieval-augmented generation systems using recall and MRR metrics?

Evaluate retrieval-augmented generation systems by calculating Recall@K to measure if relevant chunks appear in the top results, Mean Reciprocal Rank (MRR) for ranking quality, and faithfulness metrics to verify generated answers align with retrieved context.

Can I use this retrieval-augmented generation approach for a codebase or database search?

Yes, you can apply this retrieval-augmented generation approach to codebases and databases, using tailored chunking strategies and ingestion pipelines to parse and retrieve code or structured data for search-augmented features and support bots.

What chunking strategy should I use for HTML and code ingestion in a RAG pipeline?

For HTML and code ingestion in a RAG pipeline, use format-specific loaders and chunking strategies that preserve structural boundaries with text overlap, ensuring semantic context is maintained across chunks for accurate vector search and retrieval.