ai-rag

Design and implement RAG retrieval systems with hybrid search and reranking.

73|16|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill ai-rag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-rag
Source: https://github.com/vasilyu1983/AI-Agents-public/tree/main/frameworks/claude-code-kit/framework/skills/ai-rag
Command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill ai-rag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates building production-grade retrieval-augmented generation systems, reducing manual integration work, tuning, and evaluation effort for real-world knowledge apps.

Core Features & Use Cases

  • Chunking & grounding: Page-level and semantic chunking for accurate grounding.
  • Hybrid retrieval: BM25 lexical + vector search with reranking.
  • RAG evaluation: Recall@K, nDCG, groundedness metrics for quality validation.
  • Production patterns: Context injection, prompt caching, and grounded generation.

Quick Start

Use ai-rag to initialize a retrieval-augmented generation pipeline for a knowledge base and test grounding with a sample query.

Frequently Asked Questions about ai-rag

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

FAQPage Schema
How do I build a production-grade retrieval system for RAG applications?

RAG retrieval systems combine chunking strategies, hybrid search (BM25 + vector), and reranking to retrieve relevant context. This Skill designs end-to-end pipelines with semantic chunking, cross-encoder reranking, and query rewriting to ground generation on accurate, ranked results at scale.

What's the difference between hybrid retrieval and vector-only search?

Hybrid retrieval combines BM25 lexical matching with vector similarity search, capturing both exact keyword matches and semantic relevance. Vector-only search misses keyword-exact results; hybrid retrieval with reranking improves recall@K and ranking quality for production systems.

How do I evaluate retrieval quality in RAG pipelines?

Retrieval evaluation uses metrics like recall@K, nDCG, and MRR to measure ranking accuracy and groundedness. This Skill provides evaluation components to validate that your retrieval pipeline returns relevant, grounded context for generation.

Can I use reranking and query rewriting to improve retrieval accuracy?

Yes. Cross-encoder reranking re-scores retrieved results for relevance; query rewriting reformulates user queries to improve matching. Together with adaptive retrieval patterns, these techniques increase ranking precision and recall in large-scale knowledge bases.

What chunking strategies work best for semantic search and grounding?

Page-level and semantic chunking partition documents into retrievable units that preserve context. Semantic chunking groups related content; page-level maintains boundaries. This Skill supports both to ensure accurate grounding and minimal context loss in RAG applications.

How do I implement context injection and prompt caching for RAG?

Context injection embeds retrieved results into prompts; prompt caching stores repeated context to reduce latency and cost. This Skill packages both patterns with grounded generation to enable production RAG workflows at scale.