# rag-agent-builder

rag-agent-builder provides templates and scripts to build RAG pipelines with vector databases, hybrid retrieval, and response evaluation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 263 installs · ★ 50 repo stars
- Author: qodex-ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qodex-ai/ai-agent-skills/tree/HEAD/skills/rag-agent-builder/SKILL.md
- Updated: 2026-01-05
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/rag-agent-builder

## What it does

This skill equips coding assistants with blueprints for document-driven retrieval systems. It covers ingestion workflows from raw text chunking to prompt context fitting. The package includes example implementations for standard chunk-embed pipelines, multi-step agentic retrieval, and relevance reranking.

Core utilities like `vector_db_manager.py` and `embedding_management.py` handle embedding generation, cache storage, and database connectors. Supported vector stores include Pinecone, Qdrant, Weaviate, Milvus, and Chroma. It also demonstrates how to merge BM25 keyword matching with dense embeddings.

Retrieval accuracy depends directly on fragment boundaries and embedding models, making validation through `rag_evaluation.py` essential before deployment.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill rag-agent-builder -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/rag-agent-builder/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/rag-agent-builder/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill rag-agent-builder -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/rag-agent-builder/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill rag-agent-builder -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/rag-agent-builder/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install qodex-ai/ai-agent-skills skills/rag-agent-builder
```

2. **Manually: put the files in place**
- File: `.github/skills/rag-agent-builder/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill rag-agent-builder -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/qodex-ai/ai-agent-skills --path skills/rag-agent-builder
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/rag-agent-builder/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill rag-agent-builder -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qodex-ai/ai-agent-skills/tree/HEAD/skills/rag-agent-builder/SKILL.md

## When to use it
- build an agent-driven retrieval pipeline over custom docs
- configure hybrid search combining BM25 keyword scoring and vector queries
- implement semantic and hierarchical text chunking
- evaluate answer quality and context relevance with automated metrics

## Example prompts
- Design a hybrid RAG pipeline using Qdrant and BM25 reranking for technical docs
- Set up semantic chunking with overlap for PDF manuals before indexing
- Use `rag_evaluation.py` to benchmark retrieval precision on my test queries

## Similar
- [langchain-rag](https://affpapa.org/en/nevibecode/skills/langchain-rag.md) — skill · 18600 installs
- [rag-architect](https://affpapa.org/en/nevibecode/skills/borghei-rag-architect.md) — skill · 137 installs
- [rag-mcp](https://affpapa.org/en/nevibecode/mcp/rag-mcp.md) — MCP server · ★ 9 repo stars
- [rag-infrastructure](https://affpapa.org/en/nevibecode/skills/rag-infrastructure.md) — skill · 360 installs
- [rag-construction](https://affpapa.org/en/nevibecode/skills/rag-construction.md) — skill · 123 installs
- [rag](https://affpapa.org/en/nevibecode/skills/rag.md) — skill · 3900 installs

From the same set: [qodex-ai/ai-agent-skills](https://affpapa.org/en/nevibecode/by/qodex-ai/ai-agent-skills.md) — 42 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
